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

Refactor try_execute_query #109100

Merged
merged 1 commit into from
Mar 25, 2023
Merged

Refactor try_execute_query #109100

merged 1 commit into from
Mar 25, 2023

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Mar 13, 2023

This merges JobOwner::try_start into try_execute_query, removing TryGetJob in the processes. 3 new functions are extracted from try_execute_query: execute_job, cycle_error and wait_for_query. This makes the control flow a bit clearer and improves performance.

Based on #109046.

BenchmarkBeforeAfter
TimeTime%
🟣 clap:check1.7134s1.7061s -0.43%
🟣 hyper:check0.2519s0.2510s -0.35%
🟣 regex:check0.9517s0.9481s -0.38%
🟣 syn:check1.5389s1.5338s -0.33%
🟣 syntex_syntax:check5.9488s5.9258s -0.39%
Total10.4048s10.3647s -0.38%
Summary1.0000s0.9962s -0.38%

r? @cjgillot

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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 13, 2023
@Kobzol
Copy link
Contributor

Kobzol commented Mar 14, 2023

@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 14, 2023
@bors
Copy link
Contributor

bors commented Mar 14, 2023

⌛ Trying commit 089a37253c982042d3a9ef64d1dd4c947480f5cb with merge 59af7c98016d38ed9f14e4ed4770cacb57e1a072...

@bors
Copy link
Contributor

bors commented Mar 14, 2023

☀️ Try build successful - checks-actions
Build commit: 59af7c98016d38ed9f14e4ed4770cacb57e1a072 (59af7c98016d38ed9f14e4ed4770cacb57e1a072)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (59af7c98016d38ed9f14e4ed4770cacb57e1a072): comparison URL.

Overall result: no relevant changes - no 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.

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

Instruction count

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

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.5% [2.5%, 2.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.1% [-3.9%, -2.5%] 3
All ❌✅ (primary) 2.5% [2.5%, 2.5%] 1

Cycles

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

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 14, 2023
@cjgillot
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Mar 25, 2023

📌 Commit ced33ad has been approved by cjgillot

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 25, 2023
@bors
Copy link
Contributor

bors commented Mar 25, 2023

⌛ Testing commit ced33ad with merge b72e896...

@bors
Copy link
Contributor

bors commented Mar 25, 2023

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing b72e896 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 25, 2023
@bors bors merged commit b72e896 into rust-lang:master Mar 25, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 25, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b72e896): 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)
0.7% [0.7%, 0.8%] 4
Regressions ❌
(secondary)
0.5% [0.3%, 0.7%] 8
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.7% [0.7%, 0.8%] 4

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.1% [2.4%, 3.9%] 6
Regressions ❌
(secondary)
2.5% [0.7%, 4.7%] 100
Improvements ✅
(primary)
-1.9% [-1.9%, -1.9%] 1
Improvements ✅
(secondary)
-0.5% [-0.5%, -0.4%] 2
All ❌✅ (primary) 2.4% [-1.9%, 3.9%] 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)
1.3% [0.5%, 2.1%] 2
Improvements ✅
(primary)
-1.1% [-1.1%, -1.1%] 1
Improvements ✅
(secondary)
-0.5% [-0.6%, -0.4%] 3
All ❌✅ (primary) -1.1% [-1.1%, -1.1%] 1

@rustbot rustbot added the perf-regression Performance regression. label Mar 25, 2023
@Zoxc Zoxc deleted the merge-query-try branch March 25, 2023 19:39
@rylev
Copy link
Member

rylev commented Mar 28, 2023

hello-world (the only benchmark impacted here) has been noisy lately unfortunately...

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Mar 28, 2023
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) merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. 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.

7 participants