-
Notifications
You must be signed in to change notification settings - Fork 48
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
v9 format: Increase StringId and Addr size to u64, fixing ICEs during self-profiling #216
Conversation
Thanks a lot for the PR, @smklein! I'll try to review next week. I'll need to page in how most of this works too 🙂 |
Do you mean: how can one get tools and a Rust compiler with the measureme version in this PR? If so, the following steps should do the trick:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, almost done 🙂
I've left a few comments below. Regarding the v9 test data, I think it best to generate that using a locally built compiler version that already produces the new data format. Let me know if you need any help with that.
I'm running into an odd issue when building a rust toolchain manually. I can check out Rust, run
With
In all the Cargo.toml files, I'm suddenly seeing the following errors pop up (on Linux, x86-64, if it matters):
I see these cfg statements within measureme, but I'm not sure where they'd normally come from. |
Adding |
Related: I really don't grok those configuration flags! measureme/measureme/src/counters.rs Line 424 in 2371077
if (x || true) && pmc_width != 48 {
->
if pmc_width != 48 { ... Okay, reading comments like this: #143 (comment) I suspect these aren't intended to be exposed anywhere, and perhaps the warning is new? This makes me believe that intentionally ignoring those errors in |
The "unexpected We can add |
I'll do this as part of the 10.1.2 release. |
☔ The latest upstream changes (presumably #217) made this pull request unmergeable. Please resolve the merge conflicts. |
I've done the 10.1.2 release, so the PR will need a rebase now. |
I went ahead and added a v9 format test with cdd29c6 ! I was also able to successfully build a bespoke rust toolchain using this PR, and I'm able to produce very large profiles (~20 GiB) without panicking, where I was previously seeing panics at the ~4 GiB mark. Thanks for all the great feedback, @michaelwoerister ! |
Awesome! (and kind of terrifying 😅) |
I left a few minor comments that would be nice to fix, but this is basically good to go. Thank you so much for working on this! The only thing that's really left to do is cleaning up the git history. Can you rebase all your changes on top of the main branch? It might be easiest to squash everything into a single commit. |
I'm happy to do this, but fwiw, I usually do work in another repo that uses the "Squash and Merge" option on Github: The advantage is that the I'm happy to smush all these commits together into a single commit, but I like this config option because it does what you're describing without making review history hard to navigate. Your call! |
Yeah, that does make sense. In other context I'm using that approach too. However, for the Rust project, rebasing is the standard and the only thing that bors, the build bot, is capable of. |
I've gone ahead and collapsed this whole thing into a single commit |
☀️ Test successful - checks-actions |
This PR introduces a new "v9" format for profdata files, which uses u64s for addressing into files instead of u32s. This avoids ICEs which were possible with large traces, mentioned in the attached issues.
Fixes: #214, rust-lang/rust#99282
This is my first contribution to this repo, so I've made sure that tests are passing, but I'm interested in ensuring the following work:
can_read_v8_profdata_files
) -- I'd be interested in creating one for v9 too, but I'm not actually that familiar with "how to generate a new.mm_profdata
file" without the whole toolchain built to help me. I'm interested in fixing this before merging, but would appreciate pointers! EDIT: This is done -- I added a v9 format test after tracing a minimal rust binary created viacargo new
.