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 -Zmetrics-dir=PATH to save diagnostic metadata to disk #128702

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

yaahc
Copy link
Member

@yaahc yaahc commented Aug 5, 2024

Part of the Metrics Initiative: #128914

r? @estebank

@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 Aug 5, 2024
Copy link
Contributor

@estebank estebank left a comment

Choose a reason for hiding this comment

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

Only comment I have is to extend the make test to

  • exercise the new nightly flag
  • verify what happens when both the nightly flag and env variable are set
  • test the RUST_BACKTRACE=0 behavior against the file creation

Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

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

I've got a comment about this initialization procedure's interaction with pre-session-init ICEs.

compiler/rustc_driver_impl/src/lib.rs Show resolved Hide resolved
compiler/rustc_driver_impl/src/lib.rs Show resolved Hide resolved
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the A-run-make Area: port run-make Makefiles to rmake.rs label Aug 5, 2024
@rustbot
Copy link
Collaborator

rustbot commented Aug 5, 2024

This PR modifies tests/run-make/. If this PR is trying to port a Makefile
run-make test to use rmake.rs, please update the
run-make port tracking issue
so we can track our progress. You can either modify the tracking issue
directly, or you can comment on the tracking issue and link this PR.

cc @jieyouxu

@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Test changes looks good

tests/run-make/dump-ice-to-disk/rmake.rs Outdated Show resolved Hide resolved
@yaahc yaahc force-pushed the metrics-flag branch 2 times, most recently from a98d81e to 2bd3523 Compare August 5, 2024 23:41
@rust-log-analyzer

This comment has been minimized.

@yaahc yaahc force-pushed the metrics-flag branch 3 times, most recently from 24c915f to 8112b54 Compare August 6, 2024 20:17
@rust-log-analyzer

This comment has been minimized.

@@ -1714,6 +1714,8 @@ options! {
"emit the bc module with thin LTO info (default: yes)"),
enforce_type_length_limit: bool = (false, parse_bool, [TRACKED],
"enforce the type length limit when monomorphizing instances in codegen"),
error_metrics: Option<PathBuf> = (None, parse_opt_pathbuf, [UNTRACKED],
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets rename this flag to something more general, like just metrics or metrics_directory, as it will be used for more things beyond "errors".

Copy link
Contributor

@estebank estebank left a comment

Choose a reason for hiding this comment

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

r=me after flag rename to metrics-dir

@yaahc
Copy link
Member Author

yaahc commented Aug 7, 2024

@bors r=estebank

@bors
Copy link
Contributor

bors commented Aug 7, 2024

📌 Commit 5212c75 has been approved by estebank

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 Aug 7, 2024
@yaahc yaahc changed the title Add -Zerror-metrics=PATH to save diagnostic metadata to disk Add -Zmetrics-dir=PATH to save diagnostic metadata to disk Aug 7, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 8, 2024
Rollup of 7 pull requests

Successful merges:

 - rust-lang#128520 (Skip over args when determining if async-closure's inner coroutine consumes its upvars)
 - rust-lang#128552 (Emit an error for invalid use of the `#[no_sanitize]` attribute)
 - rust-lang#128691 (Update `compiler-builtins` to 0.1.117)
 - rust-lang#128702 (Add -Zmetrics-dir=PATH to save diagnostic metadata to disk)
 - rust-lang#128797 (Fuchsia Test Runner: enable ffx repository server)
 - rust-lang#128798 (refactor(rustc_expand::mbe): Don't require full ExtCtxt when not necessary)
 - rust-lang#128800 (Add tracking issue to core-pattern-type)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ca5e8a7 into rust-lang:master Aug 8, 2024
6 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 8, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 8, 2024
Rollup merge of rust-lang#128702 - yaahc:metrics-flag, r=estebank

Add -Zmetrics-dir=PATH to save diagnostic metadata to disk

r? ``@estebank``
@jieyouxu jieyouxu added the -Zmetrics-dir Unstable option: metrics directory label Aug 10, 2024
@jieyouxu jieyouxu added the A-metrics Area: Metrics label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Zmetrics-dir Unstable option: metrics directory A-metrics Area: Metrics A-run-make Area: port run-make Makefiles to rmake.rs 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
Status: Done
Development

Successfully merging this pull request may close these issues.

7 participants