Proposal
I would like to add new a option to the --json compiler flag, called e.g. timings, which would print a JSON message with a very high-level overview of the time spent in individual sections of the compilation (e.g. frontend/backend/debuginfo generation/linking). This information could be then processed e.g. by Cargo and displayed in cargo build --timings (rust-lang/cargo#14265, rust-lang/cargo#10643), to help Rust users more easily diagnose where is the bottleneck in their compilation pipeline.
In terms of implementation, I'm imagining a very slimmed down version of -Zself-profile that is very cheap. Essentially just wrap the frontend/backend/linker sections of the compiler and output their wall-time duration.
Mentors or Reviewers
@Mark-Simulacrum
Process
The main points of the Major Change Process are as follows:
You can read more about Major Change Proposals on forge.
Proposal
I would like to add new a option to the
--jsoncompiler flag, called e.g.timings, which would print a JSON message with a very high-level overview of the time spent in individual sections of the compilation (e.g. frontend/backend/debuginfo generation/linking). This information could be then processed e.g. by Cargo and displayed incargo build --timings(rust-lang/cargo#14265, rust-lang/cargo#10643), to help Rust users more easily diagnose where is the bottleneck in their compilation pipeline.In terms of implementation, I'm imagining a very slimmed down version of
-Zself-profilethat is very cheap. Essentially just wrap the frontend/backend/linker sections of the compiler and output their wall-time duration.Mentors or Reviewers
@Mark-Simulacrum
Process
The main points of the Major Change Process are as follows:
@rustbot second.-C flag, then full team check-off is required.@rfcbot fcp mergeon either the MCP or the PR.You can read more about Major Change Proposals on forge.