Skip to content

Conversation

@zetanumbers
Copy link
Contributor

@zetanumbers zetanumbers commented Jun 18, 2025

Issues happen when trying to use incremental_info with compiler's debug_assertions enabled to access more info, like the "Total Duplicate Edge Reads" counter.

@rustbot
Copy link
Collaborator

rustbot commented Jun 18, 2025

r? @lcnr

rustbot has assigned @lcnr.
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 Jun 18, 2025
@lcnr
Copy link
Contributor

lcnr commented Jun 23, 2025

I lack a lot of context to understand these changes. Can you go into more detail for how things are going wrong/what this is fixed

@lcnr lcnr added 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. labels Jul 3, 2025
@alex-semenyuk
Copy link
Member

@zetanumbers
Thanks for your contribution
From wg-triage. Could you please handle suggestion from comment above

@rustbot
Copy link
Collaborator

rustbot commented Sep 16, 2025

This PR was rebased onto a different master 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.

@zetanumbers
Copy link
Contributor Author

So if you use -Zincremental-info flag compiler will print out DepGraph statistics like this:

[incremental]
[incremental] DepGraph Statistics
[incremental] ------------------------------------------------------------------------------------------
[incremental]
[incremental] Total Node Count: 373217
[incremental] Total Edge Count: 2793009
[incremental]
[incremental]  Node Kind                           | Node Frequency   | Node Count  | Avg. Edge Count  |
[incremental] ------------------------------------------------------------------------------------------
[incremental]  def_kind                            |             3.3% |       12249 |              1.0 |
[incremental]  def_span                            |             3.0% |       11339 |              2.0 |
[incremental]  def_ident_span                      |             2.9% |       10906 |              2.0 |
[incremental]  local_def_id_to_hir_id              |             2.9% |       10699 |              1.0 |
[incremental]  evaluate_obligation                 |             2.8% |       10579 |              3.1 |
[incremental]  generics_of                         |             2.7% |       10125 |              4.0 |
...
[incremental]  entry_fn                            |             0.0% |           1 |              0.0 |
[incremental]  crate_inherent_impls_validity_check |             0.0% |           1 |              1.0 |
[incremental] ------------------------------------------------------------------------------------------
[incremental]

But if you build rustc with rust.debug = true in the bootstrap.toml, which enables cfg(debug_assertions) in rustc code, then it would also include:

[incremental] Total Edge Reads: 10273855
[incremental] Total Duplicate Edge Reads: 7101859

@zetanumbers
Copy link
Contributor Author

However now master behaves correctly so I'm closing this PR.

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 16, 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) 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.

4 participants