Skip to content

Allow pretty printing paths with -Zself-profile-events=args #144462

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

Merged
merged 1 commit into from
Jul 26, 2025

Conversation

Kobzol
Copy link
Member

@Kobzol Kobzol commented Jul 25, 2025

-Zself-profile-events=args is pretty heavy and can pretty print a lot of stuff. Rather than hunting down specific cases where this happens, I'd just allow calling trimmed_def_paths in this mode.

Fixes: #144457

r? @RalfJung

@rustbot rustbot added 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 Jul 25, 2025
@Kobzol Kobzol force-pushed the pretty-print-self-profile-args branch from 11419b3 to e9af28e Compare July 25, 2025 18:47
@RalfJung
Copy link
Member

LGTM, thanks! r=me with CI green.

//
// Issue: <https://github.com/rust-lang/rust/issues/144457>.

//@ compile-flags: -Zself-profile -Zself-profile-events=args
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is going to put the .mm_profdata files in the root and not in the temporary build test paths.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhh, I'm used to run-make tests that have properly scoped working directories. You're right. Do you know if there's a way in the test header to use some temporary dir? It should be enough to say -Zself-profile=foo.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, got it, {{build-base}}.

@Kobzol Kobzol force-pushed the pretty-print-self-profile-args branch from e9af28e to 4ef18ab Compare July 25, 2025 20:24
@Kobzol
Copy link
Member Author

Kobzol commented Jul 25, 2025

@bors r=RalfJung

@bors
Copy link
Collaborator

bors commented Jul 25, 2025

📌 Commit 4ef18ab has been approved by RalfJung

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 Jul 25, 2025
bors added a commit that referenced this pull request Jul 26, 2025
Rollup of 10 pull requests

Successful merges:

 - #144331 (Disable non_exhaustive_omitted_patterns within matches! macro)
 - #144376 (Suggest unwrapping when private method name is available in inner type)
 - #144421 (Call `is_parsed_attribute` rather than keeping track of a list of parsed attributes manually)
 - #144424 (Allow setting `release-blog-post` label with rustbot)
 - #144427 (rename ext_tool_checks to extra_checks and use mod.rs)
 - #144435 (rustc-dev-guide subtree update)
 - #144448 (Limit defaultness query to impl of trait)
 - #144462 (Allow pretty printing paths with `-Zself-profile-events=args`)
 - #144463 (change_tracker: fix a typo)
 - #144468 (resolve: Do not create `NameResolutions` on access unless necessary)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 576af9b into rust-lang:master Jul 26, 2025
10 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 26, 2025
rust-timer added a commit that referenced this pull request Jul 26, 2025
Rollup merge of #144462 - Kobzol:pretty-print-self-profile-args, r=RalfJung

Allow pretty printing paths with `-Zself-profile-events=args`

`-Zself-profile-events=args` is pretty heavy and can pretty print a lot of stuff. Rather than hunting down specific cases where this happens, I'd just allow calling `trimmed_def_paths` in this mode.

Fixes: #144457

r? `@RalfJung`
@Kobzol Kobzol deleted the pretty-print-self-profile-args branch July 26, 2025 17:52
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Jul 28, 2025
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#144331 (Disable non_exhaustive_omitted_patterns within matches! macro)
 - rust-lang/rust#144376 (Suggest unwrapping when private method name is available in inner type)
 - rust-lang/rust#144421 (Call `is_parsed_attribute` rather than keeping track of a list of parsed attributes manually)
 - rust-lang/rust#144424 (Allow setting `release-blog-post` label with rustbot)
 - rust-lang/rust#144427 (rename ext_tool_checks to extra_checks and use mod.rs)
 - rust-lang/rust#144435 (rustc-dev-guide subtree update)
 - rust-lang/rust#144448 (Limit defaultness query to impl of trait)
 - rust-lang/rust#144462 (Allow pretty printing paths with `-Zself-profile-events=args`)
 - rust-lang/rust#144463 (change_tracker: fix a typo)
 - rust-lang/rust#144468 (resolve: Do not create `NameResolutions` on access unless necessary)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

ICE with -Zself-profile-events=args
5 participants