Rollup merge of #107718 - Zoxc:z-time, r=nnethercote

Add `-Z time-passes-format` to allow specifying a JSON output for `-Z time-passes`

This adds back the `-Z time` option as that is useful for [my rustc benchmark tool](https://github.com/Zoxc/rcb), reverting https://github.com/rust-lang/rust/pull/102725. It now uses nanoseconds and bytes as the units so it is renamed to `time-precise`.
This commit is contained in:
Matthias Krüger 2023-03-23 19:55:43 +01:00 committed by GitHub
commit acd7f878ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 107 additions and 32 deletions

View file

@ -2,6 +2,7 @@
use crate::interface::parse_cfgspecs;
use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::profiling::TimePassesFormat;
use rustc_errors::{emitter::HumanReadableErrorType, registry, ColorConfig};
use rustc_session::config::rustc_optgroups;
use rustc_session::config::Input;
@ -699,6 +700,7 @@ fn test_unstable_options_tracking_hash() {
untracked!(threads, 99);
untracked!(time_llvm_passes, true);
untracked!(time_passes, true);
untracked!(time_passes_format, TimePassesFormat::Json);
untracked!(trace_macros, true);
untracked!(track_diagnostics, true);
untracked!(trim_diagnostic_paths, false);