Skip to content

Get rid of QueryVTable::call_query_method_fn#153387

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Zalathar:call-query
Mar 7, 2026
Merged

Get rid of QueryVTable::call_query_method_fn#153387
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Zalathar:call-query

Conversation

@Zalathar
Copy link
Member

@Zalathar Zalathar commented Mar 4, 2026

View all comments

Calling the query method to promote a value is equivalent to doing a cache lookup and then calling execute_query_fn, so we can just do that manually instead.

There are two “functional” differences here: If a cache hit occurs, we don't record the hit for self-profiling, and we don't register a read of the dep node. In the context of promotion, which touches all eligible cache entries just before writing the memory-cached values to disk, those two steps should be unnecessary overhead anyway.

r? nnethercote (or compiler)

@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 4, 2026
@Zalathar
Copy link
Member Author

Zalathar commented Mar 4, 2026

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Mar 4, 2026
Get rid of `QueryVTable::call_query_method_fn`
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 4, 2026
@Zalathar Zalathar mentioned this pull request Mar 4, 2026
@nnethercote
Copy link
Contributor

Seems fine, good to get rid of this fn. r=me once perf results come back ok.

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 4, 2026

☀️ Try build successful (CI)
Build commit: 5bc0460 (5bc04606b33438d872679e82b473662e1bdaefcf, parent: d933cf483edf1605142ac6899ff32536c0ad8b22)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5bc0460): comparison URL.

Overall result: ✅ improvements - no action needed

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

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

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.3%, -0.1%] 9
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.1%] 6
All ❌✅ (primary) -0.3% [-0.3%, -0.1%] 9

Max RSS (memory usage)

Results (secondary -5.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.2% [-5.2%, -5.2%] 1
All ❌✅ (primary) - - 0

Cycles

Results (primary 2.4%, secondary -2.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.4% [2.3%, 2.4%] 2
Regressions ❌
(secondary)
5.3% [3.0%, 7.6%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-17.2% [-17.2%, -17.2%] 1
All ❌✅ (primary) 2.4% [2.3%, 2.4%] 2

Binary size

Results (primary 0.1%, secondary 0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.1%] 23
Regressions ❌
(secondary)
0.1% [0.0%, 0.1%] 54
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.0%, 0.1%] 23

Bootstrap: 481.183s -> 478.983s (-0.46%)
Artifact size: 394.90 MiB -> 394.84 MiB (-0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 4, 2026
@Zalathar
Copy link
Member Author

Zalathar commented Mar 4, 2026

@bors r=nnethercote

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 4, 2026

📌 Commit bab6f12 has been approved by nnethercote

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 4, 2026
@rust-bors

This comment has been minimized.

Calling the query method is equivalent to doing a cache lookup and then calling
`execute_query_fn`, so we can just do that manually instead.
@rustbot
Copy link
Collaborator

rustbot commented Mar 5, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@Zalathar
Copy link
Member Author

Zalathar commented Mar 5, 2026

Rebased.

@bors r=nnethercote

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 5, 2026

📌 Commit 9012d4e has been approved by nnethercote

It is now in the queue for this repository.

@rust-bors rust-bors bot 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 5, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors bot 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 7, 2026
@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Mar 7, 2026
Get rid of `QueryVTable::call_query_method_fn`



Calling the query method to promote a value is equivalent to doing a cache lookup and then calling `execute_query_fn`, so we can just do that manually instead.

There are two “functional” differences here: If a cache hit occurs, we don't record the hit for self-profiling, and we don't register a read of the dep node. In the context of promotion, which touches *all* eligible cache entries just before writing the memory-cached values to disk, those two steps should be unnecessary overhead anyway.

r? nnethercote (or compiler)
@rust-bors rust-bors bot 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 7, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 7, 2026

💔 Test for 23fc7dc failed: CI. Failed job:

@Zalathar
Copy link
Member Author

Zalathar commented Mar 7, 2026

@bors retry (network errors)

@rust-bors rust-bors bot 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 7, 2026
@rust-bors

This comment has been minimized.

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
/dev/sda15      105M  6.2M   99M   6% /boot/efi
tmpfs           1.6G   12K  1.6G   1% /run/user/1001
================================================================================

Sufficient disk space available (94882404KB >= 52428800KB). Skipping cleanup.
##[group]Run src/ci/scripts/setup-environment.sh
src/ci/scripts/setup-environment.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}

@rust-bors rust-bors bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 7, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 7, 2026

☀️ Test successful - CI
Approved by: nnethercote
Duration: 3h 8m 51s
Pushing 085c58f to main...

@rust-bors rust-bors bot merged commit 085c58f into rust-lang:main Mar 7, 2026
12 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 7, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2026

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 ea5573a (parent) -> 085c58f (this PR)

Test differences

Show 2 test diffs

2 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 085c58f2c0c7db692a2eaf2b8970ff474eed9183 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. pr-check-2: 46m 36s -> 35m 57s (-22.8%)
  2. aarch64-apple: 3h 36m -> 3h 2m (-15.9%)
  3. x86_64-gnu-aux: 2h 20m -> 1h 58m (-15.2%)
  4. pr-check-1: 33m 39s -> 28m 35s (-15.1%)
  5. x86_64-rust-for-linux: 53m -> 45m 8s (-14.8%)
  6. i686-gnu-2: 1h 43m -> 1h 28m (-14.6%)
  7. aarch64-gnu-llvm-20-2: 52m 24s -> 44m 58s (-14.2%)
  8. x86_64-gnu-gcc: 1h 10m -> 1h (-14.1%)
  9. aarch64-msvc-2: 1h 52m -> 1h 37m (-12.9%)
  10. i686-gnu-1: 2h 22m -> 2h 6m (-11.4%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (085c58f): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.3%, -0.2%] 15
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 5
All ❌✅ (primary) -0.3% [-0.3%, -0.2%] 15

Max RSS (memory usage)

Results (primary 2.4%, secondary 6.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.4% [2.4%, 2.5%] 2
Regressions ❌
(secondary)
6.3% [6.3%, 6.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.4% [2.4%, 2.5%] 2

Cycles

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

Binary size

Results (primary 0.1%, secondary 0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.1% [0.1%, 0.1%] 1
Regressions ❌
(secondary)
0.1% [0.1%, 0.2%] 9
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.1%, 0.1%] 1

Bootstrap: 480.191s -> 478.289s (-0.40%)
Artifact size: 395.10 MiB -> 395.07 MiB (-0.01%)

@Zalathar Zalathar deleted the call-query branch March 7, 2026 22:51
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 21, 2026
…lacrum

Remove a flaky `got_timeout` assert from two channel tests

In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs.

One of these tests actually failed in rust-lang#153387 (comment).

Earlier failures:
- rust-lang#150365 (comment)
- rust-lang#147775 (comment)

---

- Prior art: rust-lang#152878
Zalathar added a commit to Zalathar/rust that referenced this pull request Mar 22, 2026
…lacrum

Remove a flaky `got_timeout` assert from two channel tests

In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs.

One of these tests actually failed in rust-lang#153387 (comment).

Earlier failures:
- rust-lang#150365 (comment)
- rust-lang#147775 (comment)

---

- Prior art: rust-lang#152878
Zalathar added a commit to Zalathar/rust that referenced this pull request Mar 22, 2026
…lacrum

Remove a flaky `got_timeout` assert from two channel tests

In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs.

One of these tests actually failed in rust-lang#153387 (comment).

Earlier failures:
- rust-lang#150365 (comment)
- rust-lang#147775 (comment)

---

- Prior art: rust-lang#152878
Zalathar added a commit to Zalathar/rust that referenced this pull request Mar 22, 2026
…lacrum

Remove a flaky `got_timeout` assert from two channel tests

In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs.

One of these tests actually failed in rust-lang#153387 (comment).

Earlier failures:
- rust-lang#150365 (comment)
- rust-lang#147775 (comment)

---

- Prior art: rust-lang#152878
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 22, 2026
…lacrum

Remove a flaky `got_timeout` assert from two channel tests

In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs.

One of these tests actually failed in rust-lang#153387 (comment).

Earlier failures:
- rust-lang#150365 (comment)
- rust-lang#147775 (comment)

---

- Prior art: rust-lang#152878
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 22, 2026
…lacrum

Remove a flaky `got_timeout` assert from two channel tests

In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs.

One of these tests actually failed in rust-lang#153387 (comment).

Earlier failures:
- rust-lang#150365 (comment)
- rust-lang#147775 (comment)

---

- Prior art: rust-lang#152878
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 22, 2026
…lacrum

Remove a flaky `got_timeout` assert from two channel tests

In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs.

One of these tests actually failed in rust-lang#153387 (comment).

Earlier failures:
- rust-lang#150365 (comment)
- rust-lang#147775 (comment)

---

- Prior art: rust-lang#152878
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. 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.

5 participants