Skip to content
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

Avoid invoking the intrinsic query for DefKinds other than Fn or AssocFn #122010

Merged
merged 1 commit into from
Mar 9, 2024

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Mar 5, 2024

fixes the perf regression from #120675 by only invoking (and thus inserting into the dep graph) the intrinsic query if the DefKind matches items that can actually be intrinsics

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 5, 2024
@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 5, 2024

@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 Mar 5, 2024
@bors
Copy link
Contributor

bors commented Mar 5, 2024

⌛ Trying commit b0f71f1 with merge 07f7a74...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 5, 2024
[PERF-TEST] Avoid invoking the `intrinsic` query for DefKinds other than `Fn` or `AssocFn`

r? `@ghost`
@bors
Copy link
Contributor

bors commented Mar 5, 2024

☀️ Try build successful - checks-actions
Build commit: 07f7a74 (07f7a740efc4bd26ed2ab5b3a8b8be01dec4bc7e)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (07f7a74): comparison URL.

Overall result: ❌✅ regressions and improvements - 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)
- - 0
Regressions ❌
(secondary)
4.5% [4.5%, 4.5%] 1
Improvements ✅
(primary)
-0.5% [-1.0%, -0.2%] 83
Improvements ✅
(secondary)
-0.7% [-2.2%, -0.2%] 25
All ❌✅ (primary) -0.5% [-1.0%, -0.2%] 83

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)
2.4% [1.1%, 3.9%] 5
Regressions ❌
(secondary)
3.2% [2.2%, 4.4%] 4
Improvements ✅
(primary)
-4.4% [-14.3%, -0.9%] 5
Improvements ✅
(secondary)
-6.3% [-11.3%, -1.6%] 5
All ❌✅ (primary) -1.0% [-14.3%, 3.9%] 10

Cycles

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

Binary size

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

Bootstrap: 644.326s -> 643.806s (-0.08%)
Artifact size: 174.98 MiB -> 175.06 MiB (0.04%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Mar 5, 2024
@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 5, 2024

r? @pnkfelix found a way to fix the regression 😆 sorry should've tried this on the original PR

@oli-obk oli-obk marked this pull request as ready for review March 5, 2024 08:48
@oli-obk oli-obk changed the title [PERF-TEST] Avoid invoking the intrinsic query for DefKinds other than Fn or AssocFn Avoid invoking the intrinsic query for DefKinds other than Fn or AssocFn Mar 5, 2024
@pnkfelix
Copy link
Member

pnkfelix commented Mar 5, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Mar 5, 2024

📌 Commit b0f71f1 has been approved by pnkfelix

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 5, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 8, 2024
Avoid invoking the `intrinsic` query for DefKinds other than `Fn` or `AssocFn`

fixes the perf regression from rust-lang#120675 by only invoking (and thus inserting into the dep graph) the `intrinsic` query if the `DefKind` matches items that can actually be intrinsics
@bors
Copy link
Contributor

bors commented Mar 8, 2024

⌛ Testing commit b0f71f1 with merge 75c20de...

@rust-log-analyzer
Copy link
Collaborator

The job armhf-gnu failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
failures:

---- [ui] tests/ui/mir/alignment/misaligned_lhs.rs stdout ----

error: error pattern ' misaligned pointer dereference: address must be a multiple of 0x4 but is' not found!
command: RUST_TEST_THREADS="8" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/remote-test-client" "run" "0" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/mir/alignment/misaligned_lhs/a"
--- stdout -------------------------------
--- stdout -------------------------------
uploaded "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/mir/alignment/misaligned_lhs/a", waiting for result
--- stderr -------------------------------
thread 'main' panicked at src/tools/remote-test-client/src/main.rs:310:9:
client.read_exact(&mut header) failed with Connection reset by peer (os error 104)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@bors
Copy link
Contributor

bors commented Mar 8, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 8, 2024
@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 8, 2024

@bors retry client.read_exact(&mut header) failed with Connection reset by peer (os error 104)

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 8, 2024
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 8, 2024
@bors
Copy link
Contributor

bors commented Mar 8, 2024

⌛ Testing commit b0f71f1 with merge aac29d1...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 8, 2024
Avoid invoking the `intrinsic` query for DefKinds other than `Fn` or `AssocFn`

fixes the perf regression from rust-lang#120675 by only invoking (and thus inserting into the dep graph) the `intrinsic` query if the `DefKind` matches items that can actually be intrinsics
@bors
Copy link
Contributor

bors commented Mar 8, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 8, 2024
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  SDKROOT: /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk
  AR: ar
##[endgroup]
curl: (28) Operation too slow. Less than 100 bytes/sec transferred the last 5 seconds
Error: Failure while executing; `/usr/bin/env /usr/local/Homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --user-agent Homebrew/4.2.9\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 13.6.4\)\ curl/8.4.0 --header Accept-Language:\ en --fail --progress-bar --silent --remote-time --output /Users/runner/Library/Caches/Homebrew/api/formula.jws.json --location --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.2.9\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 13.6.4\)\ curl/8.4.0 --header Accept-Language:\ en --fail --progress-bar --silent --compressed --speed-limit 100 --speed-time 5 https://formulae.brew.sh/api/formula.jws.json` exited with 28. Here's the output:

##[error]Process completed with exit code 1.
Post job cleanup.
[command]/usr/local/bin/git version

@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 8, 2024

@bors retry curl: (28) Operation too slow. Less than 100 bytes/sec transferred the last 5 seconds

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 8, 2024
@bors
Copy link
Contributor

bors commented Mar 9, 2024

⌛ Testing commit b0f71f1 with merge 4d4bb49...

@bors
Copy link
Contributor

bors commented Mar 9, 2024

☀️ Test successful - checks-actions
Approved by: pnkfelix
Pushing 4d4bb49 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 9, 2024
@bors bors merged commit 4d4bb49 into rust-lang:master Mar 9, 2024
12 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Mar 9, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4d4bb49): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.5% [-1.0%, -0.2%] 74
Improvements ✅
(secondary)
-0.7% [-2.1%, -0.2%] 26
All ❌✅ (primary) -0.5% [-1.0%, -0.2%] 74

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)
1.4% [1.3%, 1.5%] 2
Regressions ❌
(secondary)
3.6% [3.6%, 3.6%] 1
Improvements ✅
(primary)
-4.7% [-13.8%, -0.9%] 5
Improvements ✅
(secondary)
-6.6% [-11.3%, -1.6%] 4
All ❌✅ (primary) -3.0% [-13.8%, 1.5%] 7

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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.8% [-3.3%, -2.5%] 4
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 649.157s -> 650.25s (0.17%)
Artifact size: 172.55 MiB -> 172.57 MiB (0.01%)

@rustbot rustbot removed the perf-regression Performance regression. label Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

6 participants