-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
collector: always consider all monomorphic functions to be 'mentioned' #122862
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
collector: always consider all monomorphic functions to be 'mentioned' This would fix rust-lang#122814. But it's probably not going to be cheap... Ideally we'd avoid building the optimized MIR for these new roots, and only request `mir_drops_elaborated_and_const_checked` -- but that MIR is often getting stolen so I don't see a way to do that. TODO before landing: - [ ] Figure out if there is a testcase [here](rust-lang#122814 (comment)). r? `@oli-obk` `@tmiasko`
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (d0df954): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 667.777s -> 669.759s (0.30%) |
It's again mostly This seems to affect different benchmarks than #122568. Would be interesting to figure out where the extra time is spent; this time it can't be metadata (de)serialization. I wonder if skipping MIR opts would help or if the actual cost is elsewhere. @saethlin I think you had a working setup for getting cachegrind diffs? |
Oli made a suggestion for how to about the MIR opts here; that should probably be the next step. I have to put this on hold for now though. |
FWIW, it you click on a row with a specific benchmark result, it will show you a command that you can copy paste to get a cachegrind diff. |
Yeah and last time I tried that Debian's valgrind was too old and that command did not work. Maybe I should check if it has been updated in the mean time.
|
Here's the top of the most-regressed primary benchmark (unicode-normalization debug incr-unchanged)
I looked at a few other of the top primary regressions and they all look almost exactly the same in cachegrind |
Thanks!
Hm... Mir opts don't seem to show up there as far as I can tell. Strange.
|
If MIR opts were significant, you'd probably see them in this view: https://perf.rust-lang.org/detailed-query.html?commit=d0df954d8bedc6b4baa80485170b02fda0e0042f&benchmark=unicode-normalization-0.1.19-debug&scenario=incr-unchanged&base_commit=cdb683f6e4b0774b85c60eebe12af87f29d8ee4d&sort_idx=-11 they're all called |
I do see |
Yup, that would be my first guess. |
In that case maybe a dedicated query for "mentioned and required items" would indeed help as it would not have to load the entire MIR for that. (This was proposed by Oli.) |
59803ef
to
a84f508
Compare
I have zero knowledge about the crate metadata handling and I'm unlikely to have the time to learn about it any time soon -- so if anyone wants to pick this up, please feel free to do so. Meanwhile I will close this PR as I'm not currently working on this. |
Create a separate query for required and mentioned items instead of tracking them in the MIR body implements rust-lang#122862 (comment) May permit further improvements without sacrificing perf... iff this PR isn't horrible for perf 🙃
Create a separate query for required and mentioned items instead of tracking them in the MIR body implements rust-lang#122862 (comment) May permit further improvements without sacrificing perf... iff this PR isn't horrible for perf 🙃
Create a separate query for required and mentioned items instead of tracking them in the MIR body implements rust-lang#122862 (comment) May permit further improvements without sacrificing perf... iff this PR isn't horrible for perf 🙃
Create a separate query for required and mentioned items instead of tracking them in the MIR body implements rust-lang#122862 (comment) May permit further improvements without sacrificing perf... iff this PR isn't horrible for perf 🙃
This would fix #122814. But it's probably not going to be cheap...
Ideally we'd avoid building the optimized MIR for these new roots, and only request
mir_drops_elaborated_and_const_checked
-- but that MIR is often getting stolen so I don't see a way to do that. (Zulip)r? @oli-obk @tmiasko