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

Add cfg(debug_assertions) to CurrentDepGraph debug fields #135449

Closed

Conversation

mzacho
Copy link
Contributor

@mzacho mzacho commented Jan 13, 2025

The change cascades down to the use sites of the fields.

After the change then dep_graph::serialized::Stat.kind is
dead code in non-debug builds, and it turns out it can be removed
entirely, since its value can be read from a HashMap key at the
only use site of the field.

@rustbot
Copy link
Collaborator

rustbot commented Jan 13, 2025

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Jan 13, 2025
@jieyouxu
Copy link
Member

I'm missing context for this, so r? incremental

@rustbot rustbot assigned wesleywiser and unassigned jieyouxu Jan 13, 2025
@compiler-errors
Copy link
Member

@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 Jan 13, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 13, 2025
…ssert, r=<try>

Add cfg(debug_assertions) to CurrentDepGraph debug fields

The change cascades down to the use sites of the fields.

After the change then `dep_graph::serialized::Stat.kind` is
dead code in non-debug builds, and it turns out it can be removed
entirely, since its value can be read from a HashMap key at the
only use site of the field.
@bors
Copy link
Contributor

bors commented Jan 13, 2025

⌛ Trying commit a4ef424 with merge 12a17c2...

@klensy
Copy link
Contributor

klensy commented Jan 13, 2025

Is -Zincremental-info=yes works after this pr?

@lqd
Copy link
Member

lqd commented Jan 13, 2025

not without debug assertions

@klensy
Copy link
Contributor

klensy commented Jan 13, 2025

not without debug assertions

Then this pr breaks nightly flag. Wrong cfg's or this was intended?

@bors
Copy link
Contributor

bors commented Jan 13, 2025

☀️ Try build successful - checks-actions
Build commit: 12a17c2 (12a17c2edf248310b207a5dc0c9c7ca2584ba2b7)

@rust-timer

This comment has been minimized.

@mzacho mzacho force-pushed the current-dep-graph-cfg-debug-assert branch from a4ef424 to ff296f4 Compare January 13, 2025 21:24
@mzacho
Copy link
Contributor Author

mzacho commented Jan 13, 2025

Then this pr breaks nightly flag. Wrong cfg's or this was intended?

Unintended, thanks. Updated the PR so -Z incremental-info should work as before.

@lqd
Copy link
Member

lqd commented Jan 13, 2025

Won’t there be no data without debug assertions?

@mzacho
Copy link
Contributor Author

mzacho commented Jan 13, 2025

For the total edge reads and total duplicate edge reads, yes, but those fields are currently also only written to (and printed) when cfg!(debug_assertions) :)

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (12a17c2): 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 (secondary 1.6%)

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.6% [1.6%, 1.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (secondary 6.7%)

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)
6.7% [6.7%, 6.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 763.215s -> 764.132s (0.12%)
Artifact size: 326.11 MiB -> 326.07 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 13, 2025
@bors
Copy link
Contributor

bors commented Feb 6, 2025

☔ The latest upstream changes (presumably #136471) made this pull request unmergeable. Please resolve the merge conflicts.

@mzacho mzacho closed this Feb 6, 2025
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) 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants