-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Span tweaks #115594
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
Span tweaks #115594
Conversation
There are a couple of |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit c1ed001 with merge 763c9690726b89db9e879e72cb326e6dacc79ccc... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (763c9690726b89db9e879e72cb326e6dacc79ccc): 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 627.677s -> 626.896s (-0.12%) |
/// njn: this comment is nonsensical, what is it supposed to say? | ||
/// In order to reliably use parented spans in incremental compilation, | ||
/// the dependency to the parent definition's span. This is performed | ||
/// using the callback `SPAN_TRACK` to access the query engine. | ||
/// |
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.
in relative span mode, we hide part of the information contained in the span from the query system. The Span
actually holds lo
, hi
and ctxt
, but the query system thinks it only holds offset from parent's span lo
, hi - lo
and ctxt
. This file is responsible for the encapsulation. The conversion is meant to happen in data_untracked
(untracked by the query system), and data
which tracks it for the query system by calling SPAN_TRACK
. No code should access lo
or hi
other that through one of these methods.
`Span` has undergone some changes over the years (addition of an optional parent, and possible inlining of the context in interned spans) but the comments and identifiers used haven't kept up. As a result, I find it harder to understand than I should. This commit reworks the comments, renames some identifiers, and restructures the code slightly, all to make things clearer. I now feel like I understand this code again.
It's quite hot, and worth having a version that works directly at the `Span` level, rather than first converting to the `SpanData` level.
c1ed001
to
5790372
Compare
@cjgillot: I have updated to remove the |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (6cc1898): comparison URL. Overall result: ✅ improvements - no action needed@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. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 628.91s -> 627.323s (-0.25%) |
Some minor improvements to code clarity.
r? @cjgillot