-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Optimize query_cache_hit to reduce code size of the query hot path. #107529
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 0f85685e521956584bd60923e614d68353f6fe38 with merge f8c1f62c53f582f5eacfa08617ed8e6fb1385ffd... |
@@ -393,7 +393,7 @@ impl SelfProfilerRef { | |||
} | |||
|
|||
/// Record a query in-memory cache hit. | |||
#[inline(always)] | |||
#[inline(never)] | |||
pub fn query_cache_hit(&self, query_invocation_id: QueryInvocationId) { |
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.
The same should probably be done for the other profiling events as well
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.
The problem was that it generated code for TimingGuard
which was unused. The other events do make use of it so it outlining doesn't help.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (f8c1f62c53f582f5eacfa08617ed8e6fb1385ffd): comparison URL. Overall result: ❌✅ regressions and improvements - 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.
|
It makes sense that perf regresses since it runs with the profiler enabled. I've optimized |
☔ The latest upstream changes (presumably #107667) made this pull request unmergeable. Please resolve the merge conflicts. |
f9aa140
to
4117898
Compare
It looks like this is a bigger win after #107667:
|
4117898
to
9539737
Compare
@bors r+ |
☀️ Test successful - checks-actions |
1 similar comment
☀️ Test successful - checks-actions |
Finished benchmarking commit (a00e24d): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression 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.
CyclesThis benchmark run did not return any relevant results for this metric. |
Calling this triaged as the regression is small @rustbot label: perf-regression-triaged |
A small tweak which improves performance on check builds by 0.33% and reduces
rustc_driver
size by 1%.r? @cjgillot