[EXPERIMENT] Reduce short-backtrace overhead in some query plumbing call stacks#151719
[EXPERIMENT] Reduce short-backtrace overhead in some query plumbing call stacks#151719Zalathar wants to merge 3 commits intorust-lang:mainfrom
Conversation
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
[EXPERIMENT] Reduce short-backtrace overhead in some query plumbing call stacks
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (08c6172): comparison URL. Overall result: ❌✅ regressions and improvements - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.8%, secondary 4.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 472.506s -> 471.789s (-0.15%) |
|
☔ The latest upstream changes (presumably #151727) made this pull request unmergeable. Please resolve the merge conflicts. |
|
No significant perf gain (or loss), but shaving half a second off |
|
Anyhow, I think I'll polish this up into a fresh PR that's independent of #151666. |
Use fewer intermediate functions for short backtraces in queries If we make sure that `compute_fn` in the query's vtable is actually named `__rust_begin_short_backtrace`, we can avoid the need for some additional intermediate functions and stack frames. This is similar to how the `get_query_incr` and `get_query_non_incr` functions are actually named `__rust_end_short_backtrace`. --- Before/after comparison: #151739 (comment) --- - Earlier draft of this PR: #151719 - Introduction of this backtrace-trimming: #108938
Use fewer intermediate functions for short backtraces in queries If we make sure that `compute_fn` in the query's vtable is actually named `__rust_begin_short_backtrace`, we can avoid the need for some additional intermediate functions and stack frames. This is similar to how the `get_query_incr` and `get_query_non_incr` functions are actually named `__rust_end_short_backtrace`. --- Before/after comparison: #151739 (comment) --- - Earlier draft of this PR: #151719 - Introduction of this backtrace-trimming: #108938
Building on top of #151666, this PR tries to eliminate some layers in query plumbing call stacks that come from using a
__rust_begin_short_backtracehelper inside a closure.r? ghost