-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
self-profiling: Support recording query keys #67397
self-profiling: Support recording query keys #67397
Conversation
Can we add something to rustc (e.g., an unstable Essentially I'd like to for now be able to add some code to perf.rlo which will essentially build the summarize from the repo via |
This comment has been minimized.
This comment has been minimized.
@Mark-Simulacrum I would prefer making the measureme tools available as a rustup component. That would be a more general solution (and something we want to do anyway). What do you think? |
That would definitely be better! I don't personally have much time to spend figuring out how to hook that up; I can help review such a patch though. |
This comment has been minimized.
This comment has been minimized.
The one downside of any approach that relies on |
656ea78
to
37d17cc
Compare
Back collection passively works by just having an older summarize in PATH whereas the new one would be "optionally" in PATH, so that should mostly just naturally fall out :) |
This comment has been minimized.
This comment has been minimized.
37d17cc
to
ff5a81d
Compare
Since this touches some of the query infrastructure, let's do a perf run just to make sure we don't accidentally regress performance. @bors try |
Awaiting bors try build completion |
… r=<try> self-profiling: Support recording query keys This PR makes self-profiling able to record query keys. The implementation is not as efficient as it could be yet (all query keys except for `DefId`s cause string data to be duplicated) and the rendered strings could be nicer too. But the implementation is functional and introduces the basic framework for emitting per-query-invocation event data. I tried to add proper documentation on how everything works. Let me know if more documentation is needed. r? @wesleywiser @Mark-Simulacrum, heads up: This updates `measureme` to 0.7.0 which means that `summarize` on perf.rlo needs to be update accordingly once this is merged.
Yes, good idea! The self-profiling code exercised by |
Hm, I suspect that perf will fail to run due to the summarize incompatibility, but we can try I guess! Certainly the try build will help a future run if I find some time to do it manually. |
We should still get correct instruction counts and wall-times, right? Just no self-profiling data. |
I think perf today just dies if self profile fails to work (which is probably not ideal, but perf leans on fail fast today a bit too hard probably). |
☀️ Try build successful - checks-azure |
Queued fbe42f6 with parent c605199, future comparison URL. |
Finished benchmarking try commit fbe42f6, comparison URL. |
Looks like @Mark-Simulacrum was right. |
Yeah, making that more resilient would be a nice to have. |
I don't think I'll have time to implement the Rustup component approach at the moment (I'll be afk for the rest of the year). What's the quickest way to unblock this? Doing one last manual update of |
Looking at the trace file generated while compiling @bors r+ rollup=never |
📌 Commit ff5a81d has been approved by |
🌲 The tree is currently closed for pull requests below priority 100, this pull request will be tested once the tree is reopened |
This is intended to ease the transition over rust-lang/rust#67397.
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
ff5a81d
to
0e6850d
Compare
☔ The latest upstream changes (presumably #67777) made this pull request unmergeable. Please resolve the merge conflicts. |
…bles query-invocation-specific event_ids.
0e6850d
to
1d555cd
Compare
1d555cd
to
ad65e3e
Compare
This is rebased now. I did not add support for function parameters (as might be used by e.g. |
@bors r=wesleywiser |
📌 Commit ad65e3e has been approved by |
… r=wesleywiser self-profiling: Support recording query keys This PR makes self-profiling able to record query keys. The implementation is not as efficient as it could be yet (all query keys except for `DefId`s cause string data to be duplicated) and the rendered strings could be nicer too. But the implementation is functional and introduces the basic framework for emitting per-query-invocation event data. I tried to add proper documentation on how everything works. Let me know if more documentation is needed. r? @wesleywiser @Mark-Simulacrum, heads up: This updates `measureme` to 0.7.0 which means that `summarize` on perf.rlo needs to be update accordingly once this is merged.
☀️ Test successful - checks-azure |
@Mark-Simulacrum: seems like this broke perf.rlo after all. Maybe something is wrong with the fallback logic for summarize? |
Hm, we were on 0.7.0 and not 0.7.1 -- I've now changed that. Is that a possible cause? I suppose probably no. It also turns out I think I may have forgotten to actually deploy the change, which I've now done :) |
No, 0.7.1 just fixes a compilation error on big endian platforms.
Yes, that would explain it |
This PR makes self-profiling able to record query keys. The implementation is not as efficient as it could be yet (all query keys except for
DefId
s cause string data to be duplicated) and the rendered strings could be nicer too. But the implementation is functional and introduces the basic framework for emitting per-query-invocation event data.I tried to add proper documentation on how everything works. Let me know if more documentation is needed.
r? @wesleywiser
@Mark-Simulacrum, heads up: This updates
measureme
to 0.7.0 which means thatsummarize
on perf.rlo needs to be update accordingly once this is merged.