Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record more artifact sizes during self-profiling. #90701

Merged
merged 1 commit into from
Nov 9, 2021

Conversation

michaelwoerister
Copy link
Member

@michaelwoerister michaelwoerister commented Nov 8, 2021

This PR adds artifact size recording for

  • "linked artifacts" (executables, RLIBs, dylibs, static libs)
  • object files
  • dwo files
  • assembly files
  • crate metadata
  • LLVM bitcode files
  • LLVM IR files
  • codegen unit size estimates

Currently the identifiers emitted for these are hard-coded as string literals. Is it worth adding constants to https://github.com/rust-lang/measureme/blob/master/measureme/src/rustc.rs instead? We don't do that for query names and the like -- but artifact kinds might be more stable than query names.

@rust-highfive
Copy link
Collaborator

r? @davidtwco

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 8, 2021
@michaelwoerister
Copy link
Member Author

@rylev, did I forget any artifact kind we talked about?

@rylev
Copy link
Member

rylev commented Nov 8, 2021

@michaelwoerister the only one that comes to mind is final binary size. Is there a convenient place for recording that after the linker has done its thing?

Totally missed the first bullet point. Looks good!

Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the identifiers emitted for these are hard-coded as string literals. Is it worth adding constants to https://github.com/rust-lang/measureme/blob/master/measureme/src/rustc.rs instead? We don't do that for query names and the like -- but artifact kinds might be more stable than query names.

I don't think it would hurt, if you want to do this, feel free, don't think it's strictly necessary, within the compiler each of these constants would probably only be used once? r=me regardless.

@michaelwoerister
Copy link
Member Author

I don't think it would hurt, if you want to do this, feel free, don't think it's strictly necessary, within the compiler each of these constants would probably only be used once?

Yes they would only be used once in the compiler. However, it would be useful for keeping the compiler and measureme-based tooling in sync. I opened rust-lang/measureme#191 so we don't forget. But it's not worth doing a new measureme release for that, I'd say.

Thanks for the reviews, @davidtwco & @rylev!

@bors r=davidtwco

@bors
Copy link
Contributor

bors commented Nov 9, 2021

📌 Commit fefe1e9 has been approved by davidtwco

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 9, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 9, 2021
…s, r=davidtwco

Record more artifact sizes during self-profiling.

This PR adds artifact size recording for

- "linked artifacts" (executables, RLIBs, dylibs, static libs)
- object files
- dwo files
- assembly files
- crate metadata
- LLVM bitcode files
- LLVM IR files
- codegen unit size estimates

Currently the identifiers emitted for these are hard-coded as string literals. Is it worth adding constants to https://github.com/rust-lang/measureme/blob/master/measureme/src/rustc.rs instead? We don't do that for query names and the like -- but artifact kinds might be more stable than query names.
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 9, 2021
…askrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#89561 (Type inference for inline consts)
 - rust-lang#90035 (implement rfc-2528 type_changing-struct-update)
 - rust-lang#90613 (Allow to run a specific rustdoc-js* test)
 - rust-lang#90683 (Make `compiler-docs` only control the default instead of being a hard off-switch)
 - rust-lang#90685 (x.py: remove fixme by deleting code)
 - rust-lang#90701 (Record more artifact sizes during self-profiling.)
 - rust-lang#90723 (Better document `Box` and `alloc::alloc::box_free` connection)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit fd5a4f4 into rust-lang:master Nov 9, 2021
@rustbot rustbot added this to the 1.58.0 milestone Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants