Skip to content

Conversation

@Zalathar
Copy link
Member

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_backtrace helper inside a closure.

r? ghost

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 27, 2026
@Zalathar
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 27, 2026
rust-bors bot pushed a commit that referenced this pull request Jan 27, 2026
[EXPERIMENT] Reduce short-backtrace overhead in some query plumbing call stacks
@rust-bors

This comment has been minimized.

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 27, 2026

☀️ Try build successful (CI)
Build commit: 08c6172 (08c6172ecbd9deca8c72dba3a24e97cd650528d5, parent: b3cda168c8afd5c4240a9477f6a7f54e70e2589a)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (08c6172): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

Benchmarking 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
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.1% [-0.2%, -0.0%] 2
All ❌✅ (primary) - - 0

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.

mean range count
Regressions ❌
(primary)
1.8% [0.8%, 3.3%] 4
Regressions ❌
(secondary)
4.9% [2.1%, 6.3%] 8
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.8% [-2.8%, -2.8%] 1
All ❌✅ (primary) 1.8% [0.8%, 3.3%] 4

Cycles

Results (secondary -0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.9% [2.0%, 4.7%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.7% [-4.9%, -4.5%] 2
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 472.506s -> 471.789s (-0.15%)
Artifact size: 383.60 MiB -> 383.50 MiB (-0.03%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 27, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 27, 2026

☔ The latest upstream changes (presumably #151727) made this pull request unmergeable. Please resolve the merge conflicts.

@Zalathar
Copy link
Member Author

No significant perf gain (or loss), but shaving half a second off rustc_query_impl looks like it could potentially be real.

@Zalathar
Copy link
Member Author

Anyhow, I think I'll polish this up into a fresh PR that's independent of #151666.

@Zalathar Zalathar closed this Jan 27, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jan 27, 2026
@Zalathar Zalathar deleted the short-backtrace branch January 27, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants