-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Also hash spans inside the same file as relative (V2) #150540
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
Conversation
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Improve relative hashing of spans
This comment has been minimized.
This comment has been minimized.
|
@bors try cancel |
|
Try build cancelled. Cancelled workflows: |
70a570d to
5a3b9bc
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
Improve relative hashing of spans
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
5a3b9bc to
3730e30
Compare
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Improve relative hashing of spans
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (5702844): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking 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. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @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 -0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 4.7%, secondary 18.3%)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: 475.256s -> 475.638s (0.08%) |
|
That's a funny race condition in rustbot, fixed it manually :) |
|
@bors try @rust-timer queue The cycle results looked quite weird, rerunning to see if it was noise or not. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Also hash spans inside the same file as relative (V2)
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (5b25251): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking 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. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @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 (secondary -3.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -4.9%, secondary 5.2%)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: 473.485s -> 472.607s (-0.19%) |
|
The cycles look better this time I think, so was spurious :) |
Do you mind explaining what are those minor changes? |
Co-authored-by: Camille Gillot <gillot.camille@gmail.com>
4ce96aa to
dc505a5
Compare
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.
@cjgillot Yes ofc, should've explained the changes, sorry :)
Explained the changes in some comments on the code
| if let Some(parent) = parent | ||
| && file_lo.contains(parent.lo) | ||
| { | ||
| TAG_RELATIVE_SPAN.encode(self); |
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.
Your PR introduces a new TAG_RELATIVE_OUTER_SPAN tag here for encoding spans which are outside their parent span, this PR instead reuses the TAG_RELATIVE_SPAN tag. This can be done by encoding the positions in the span (which are u32s) subtracted from their parent, wrapping if necessary. This change seems to be most of the performance gained relative to your PR.
| // This span is relative to another span in the same file, | ||
| // only hash the relative position. | ||
| Hash::hash(&TAG_RELATIVE_SPAN, hasher); | ||
| Hash::hash(&(span.lo.0.wrapping_sub(parent.lo.0)), hasher); |
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.
When hashing, your PR hashes an isize here, this PR instead hashes a u32 by using a wrapping_sub. Haven't explored if this makes any perf difference
|
|
||
| Hash::hash(&TAG_VALID_SPAN, hasher); | ||
| Hash::hash(&file, hasher); | ||
| Hash::hash(&file.stable_id, hasher); |
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.
Your PR hashed the TAG_VALID_SPAN and stable_id if file.contains(parent.lo), this PR doesn't. Again, Haven't explored if this makes any perf difference
|
Great! I agree, we did not need to make much more of a difference in hashing and encoding between the "contained in parent span" and the "in same file" cases. @bors r+ rollup=never |
|
Scheduling: Encourage a mixture of rollup and non-rollup PRs. @bors p=5 |
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 9bc8b40 (parent) -> 08f833a (this PR) Test differencesShow 3 test diffs3 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 08f833aa179952037d5d0c5d949d4c3ec18ec212 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (08f833a): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary -2.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -3.2%, secondary -2.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: 473.122s -> 474.227s (0.23%) |
|
@rustbot label: +perf-regression-triaged |
Hashes spans relatively to their parent, even if they are not contained inside their parent.
Fixes #150400
Closes #143882, as this is a successor PR
This PR is very closely based on that PR with a few minor changes, so to give proper credit I made @cjgillot coauthor of the commit.