rust icon indicating copy to clipboard operation
rust copied to clipboard

Verify that query keys result in unique dep nodes

Open Zoxc opened this issue 1 year ago • 14 comments

This implements checking that query keys result into unique dep nodes as mentioned in https://github.com/rust-lang/rust/pull/112469.

We could do a perf check to see how expensive this is.

r? @michaelwoerister

Zoxc avatar Mar 09 '24 08:03 Zoxc

@bors try @rust-timer queue

oli-obk avatar Mar 09 '24 14:03 oli-obk

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

rust-timer avatar Mar 09 '24 14:03 rust-timer

:hourglass: Trying commit eae7593bfac74d9e2ea1b4ff92db0f2109e262ca with merge d8a5ccf04db2dbce42c32925c5651bd56b6852b1...

bors avatar Mar 09 '24 14:03 bors

:sunny: Try build successful - checks-actions Build commit: d8a5ccf04db2dbce42c32925c5651bd56b6852b1 (d8a5ccf04db2dbce42c32925c5651bd56b6852b1)

bors avatar Mar 09 '24 15:03 bors

Queued d8a5ccf04db2dbce42c32925c5651bd56b6852b1 with parent 9d272a1b0501f96da0ed10caa1b2eb6dbb653686, future comparison URL. There is currently 1 preceding artifact in the queue. It will probably take at least ~1.6 hours until the benchmark run finishes.

rust-timer avatar Mar 09 '24 15:03 rust-timer

Finished benchmarking commit (d8a5ccf04db2dbce42c32925c5651bd56b6852b1): comparison URL.

Overall result: ❌ regressions - ACTION NEEDED

Benchmarking 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 @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never @rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.0% [0.2%, 7.6%] 200
Regressions ❌
(secondary)
2.4% [0.2%, 7.9%] 146
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.0% [0.2%, 7.6%] 200

Max RSS (memory usage)

Results

This 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.

mean range count
Regressions ❌
(primary)
3.6% [0.9%, 7.5%] 32
Regressions ❌
(secondary)
4.7% [2.2%, 9.2%] 31
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.2%, -2.2%] 1
All ❌✅ (primary) 3.6% [0.9%, 7.5%] 32

Cycles

Results

This 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.

mean range count
Regressions ❌
(primary)
2.4% [0.9%, 7.4%] 86
Regressions ❌
(secondary)
3.9% [1.1%, 7.6%] 55
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) 2.4% [0.9%, 7.4%] 86

Binary size

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

Bootstrap: 649.534s -> 651.184s (0.25%) Artifact size: 172.59 MiB -> 173.04 MiB (0.26%)

rust-timer avatar Mar 09 '24 17:03 rust-timer

I've made -Z incremental_verify_ich or cfg!(debug_assertions) enable these checks.

Zoxc avatar Mar 10 '24 08:03 Zoxc

@bors try @rust-timer queue

oli-obk avatar Mar 10 '24 09:03 oli-obk

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

rust-timer avatar Mar 10 '24 09:03 rust-timer

:hourglass: Trying commit 80992069e212e12a18910bef7ab43213e87135c9 with merge 8455f36495442921566585d0db4fd9d0b344e255...

bors avatar Mar 10 '24 09:03 bors

:sunny: Try build successful - checks-actions Build commit: 8455f36495442921566585d0db4fd9d0b344e255 (8455f36495442921566585d0db4fd9d0b344e255)

bors avatar Mar 10 '24 10:03 bors

Queued 8455f36495442921566585d0db4fd9d0b344e255 with parent 094a6204f590e6b4770b5f26359dd17a07897adf, future comparison URL. There is currently 1 preceding artifact in the queue. It will probably take at least ~1.9 hours until the benchmark run finishes.

rust-timer avatar Mar 10 '24 10:03 rust-timer

Finished benchmarking commit (8455f36495442921566585d0db4fd9d0b344e255): comparison URL.

Overall result: ❌ regressions - ACTION NEEDED

Benchmarking 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 @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never @rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.0% [0.2%, 7.8%] 193
Regressions ❌
(secondary)
2.7% [0.4%, 7.8%] 129
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.0% [0.2%, 7.8%] 193

Max RSS (memory usage)

Results

This 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.

mean range count
Regressions ❌
(primary)
3.6% [0.8%, 9.2%] 42
Regressions ❌
(secondary)
4.3% [0.9%, 15.1%] 115
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.6% [0.8%, 9.2%] 42

Cycles

Results

This 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.

mean range count
Regressions ❌
(primary)
2.3% [0.9%, 8.4%] 98
Regressions ❌
(secondary)
4.2% [1.2%, 8.5%] 61
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.3% [0.9%, 8.4%] 98

Binary size

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

Bootstrap: 648.949s -> 648.36s (-0.09%) Artifact size: 310.01 MiB -> 310.47 MiB (0.15%)

rust-timer avatar Mar 10 '24 12:03 rust-timer

(random passerby note about these last results, they show the worst case: for stability reasons the perf runs are done with incremental hash verification turned on all the time, instead of the default lower verification frequency)

lqd avatar Mar 10 '24 13:03 lqd

(random passerby note about these last results, they show the worst case: for stability reasons the perf runs are done with incremental hash verification turned on all the time, instead of the default lower verification frequency)

Thanks for the hint, @lqd! That's really good to know.

michaelwoerister avatar Mar 11 '24 07:03 michaelwoerister

One thing we could try to reduce the perf impact

Not sure if it's worth optimizing given that it's opt-in.

Zoxc avatar Mar 12 '24 10:03 Zoxc

Yes, I agree. The overall perf impact is low enough not to make a real difference for compilers with debug assertions enabled and regular compilers won't be affected at all.

@bors r+

As per @lqd's comment, the performance cost will be visible to perf.rlo but that is an artificial side effect of perf.rlo enabling fingerprint verification. Regular users of the compiler won't be affected.

@rustbot label: +perf-regression-triaged

michaelwoerister avatar Mar 12 '24 11:03 michaelwoerister

:pushpin: Commit 55ba7a7c622fb1ac95ef05e4a652cedf923a8164 has been approved by michaelwoerister

It is now in the queue for this repository.

bors avatar Mar 12 '24 11:03 bors

:hourglass: Testing commit 55ba7a7c622fb1ac95ef05e4a652cedf923a8164 with merge d3555f3d8e555ce488bbf8eee5eccdb66a464e14...

bors avatar Mar 13 '24 02:03 bors

:sunny: Test successful - checks-actions Approved by: michaelwoerister Pushing d3555f3d8e555ce488bbf8eee5eccdb66a464e14 to master...

bors avatar Mar 13 '24 04:03 bors

Finished benchmarking commit (d3555f3d8e555ce488bbf8eee5eccdb66a464e14): comparison URL.

Overall result: ❌ regressions - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression cc @rust-lang/wg-compiler-performance

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.0% [0.2%, 7.8%] 193
Regressions ❌
(secondary)
2.4% [0.3%, 7.8%] 153
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.3% [-1.3%, -1.3%] 1
All ❌✅ (primary) 2.0% [0.2%, 7.8%] 193

Max RSS (memory usage)

Results

This 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.

mean range count
Regressions ❌
(primary)
3.3% [0.9%, 7.2%] 30
Regressions ❌
(secondary)
7.1% [2.4%, 11.7%] 10
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.3% [0.9%, 7.2%] 30

Cycles

Results

This 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.

mean range count
Regressions ❌
(primary)
2.3% [0.7%, 7.9%] 117
Regressions ❌
(secondary)
4.3% [1.4%, 8.1%] 60
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.3% [0.7%, 7.9%] 117

Binary size

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

Bootstrap: 673.298s -> 674.552s (0.19%) Artifact size: 310.29 MiB -> 310.77 MiB (0.15%)

rust-timer avatar Mar 13 '24 06:03 rust-timer