-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Add annotations to the graphviz region graph on region origins #144988
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 annotations to the graphviz region graph on region origins #144988
Conversation
This adds - (ex) for regions whose origin is existential, - (p) for regoins whose origin is a placeholder, and - (p for <name>) if the originating placeholder is named. This has helped _my_ debugging and it doesn't create too bad clutter, I feel. The change is ridiculously small, but I turned it into a separate PR so we can bikeshed the format.
rustbot has assigned @matthewjasper. Use |
👍 on adding this to the graph in some form maybe even
|
I guess I don't know whether using |
Nice, just the discussion I wanted to have! |
Yeah, not having to look up what sigils means is... a good idea. I'll make that change! |
...and now the names for existentials are in there too, if we have them! |
@bors2 try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…try> Add annotations to the graphviz region graph on region origins
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (ad601d7): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking 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 Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 3.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 464.27s -> 466.698s (0.52%) |
@bors rollup the only perf change looks spurious to me |
Rollup of 23 pull requests Successful merges: - #141658 (rustdoc search: prefer stable items in search results) - #141828 (Add diagnostic explaining STATUS_STACK_BUFFER_OVERRUN not only being used for stack buffer overruns if link.exe exits with that exit code) - #144823 (coverage: Extract HIR-related helper code out of the main module) - #144883 (Remove unneeded `drop_in_place` calls) - #144923 (Move several more float tests to floats/mod.rs) - #144988 (Add annotations to the graphviz region graph on region origins) - #145010 (Couple of minor abi handling cleanups) - #145017 (Explicitly disable vector feature on s390x baseline of bad-reg test) - #145027 (Optimize `char::is_alphanumeric`) - #145050 (add member constraints tests) - #145073 (update enzyme submodule to handle llvm 21) - #145080 (Escape diff strings in MIR dataflow graphviz) - #145082 (Fix some bad formatting in `-Zmacro-stats` output.) - #145083 (Fix cross-compilation of Cargo) - #145096 (Fix wasm target build with atomics feature) - #145097 (remove unnecessary `TypeFoldable` impls) - #145100 (Rank doc aliases lower than equivalently matched items) - #145103 (rustc_metadata: remove unused private trait impls) - #145115 (defer opaque type errors, generally greatly reduce tainting) - #145119 (rustc_public: fix missing parenthesis in pretty discriminant) - #145124 (Recover `for PAT = EXPR {}`) - #145132 (Refactor map_unit_fn lint) - #145134 (Reduce indirect assoc parent queries) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 23 pull requests Successful merges: - #141658 (rustdoc search: prefer stable items in search results) - #141828 (Add diagnostic explaining STATUS_STACK_BUFFER_OVERRUN not only being used for stack buffer overruns if link.exe exits with that exit code) - #144823 (coverage: Extract HIR-related helper code out of the main module) - #144883 (Remove unneeded `drop_in_place` calls) - #144923 (Move several more float tests to floats/mod.rs) - #144988 (Add annotations to the graphviz region graph on region origins) - #145010 (Couple of minor abi handling cleanups) - #145017 (Explicitly disable vector feature on s390x baseline of bad-reg test) - #145027 (Optimize `char::is_alphanumeric`) - #145050 (add member constraints tests) - #145073 (update enzyme submodule to handle llvm 21) - #145080 (Escape diff strings in MIR dataflow graphviz) - #145082 (Fix some bad formatting in `-Zmacro-stats` output.) - #145083 (Fix cross-compilation of Cargo) - #145096 (Fix wasm target build with atomics feature) - #145097 (remove unnecessary `TypeFoldable` impls) - #145100 (Rank doc aliases lower than equivalently matched items) - #145103 (rustc_metadata: remove unused private trait impls) - #145115 (defer opaque type errors, generally greatly reduce tainting) - #145119 (rustc_public: fix missing parenthesis in pretty discriminant) - #145124 (Recover `for PAT = EXPR {}`) - #145132 (Refactor map_unit_fn lint) - #145134 (Reduce indirect assoc parent queries) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #144988 - amandasystems:more-detailed-region-graph, r=lcnr Add annotations to the graphviz region graph on region origins This adds - `(ex<'e>)` for regions whose origin is existential, with name if one exists, - `(for<'p>)` for regions whose origin is a placeholder, with name if one exists For any region whose name we don't know, use `'_`. This has helped _my_ debugging and it doesn't create too bad clutter, I feel. The change ~~is~~was ridiculously small, but I turned it into a separate PR so we can bikeshed the format. The following snippet: ```rust struct Co<'a>(&'a ()); struct Contra<'a>(fn(&'a ())); // `exists<'e> forall<'p> 'p: 'e` -> ERROR fn p_outlives_e( x: for<'e> fn(for<'p> fn(fn(fn(Contra<'e>, Co<'p>)))), ) -> fn(fn(fn(for<'unify> fn(Contra<'unify>, Co<'unify>)))) { x ``` Gives this graph: 
Hi bors this already merged |
@rustbot label: -S-waiting-on-author +S-waiting-on-bors +merged-by-bors |
This adds
(ex<'e>)
for regions whose origin is existential, with name if one exists,(for<'p>)
for regions whose origin is a placeholder, with name if one existsFor any region whose name we don't know, use
'_
.This has helped my debugging and it doesn't create too bad clutter, I feel.
The change
iswas ridiculously small, but I turned it into a separate PR so we can bikeshed the format.The following snippet:
Gives this graph:
