rust/compiler/rustc_session/src
Nicholas Nethercote 9110d925d0 Remove -Ztime option.
The compiler currently has `-Ztime` and `-Ztime-passes`. I've used
`-Ztime-passes` for years but only recently learned about `-Ztime`.

What's the difference? Let's look at the `-Zhelp` output:
```
  -Z        time=val -- measure time of rustc processes (default: no)
  -Z time-passes=val -- measure time of each rustc pass (default: no)
```
The `-Ztime-passes` description is clear, but the `-Ztime` one is less so.
Sounds like it measures the time for the entire process?

No. The real difference is that `-Ztime-passes` prints out info about passes,
and `-Ztime` does the same, but only for a subset of those passes. More
specifically, there is a distinction in the profiling code between a "verbose
generic activity" and an "extra verbose generic activity". `-Ztime-passes`
prints both kinds, while `-Ztime` only prints the first one. (It took me
a close reading of the source code to determine this difference.)

In practice this distinction has low value. Perhaps in the past the "extra
verbose" output was more voluminous, but now that we only print stats for a
pass if it exceeds 5ms or alters the RSS, `-Ztime-passes` is less spammy. Also,
a lot of the "extra verbose" cases are for individual lint passes, and you need
to also use `-Zno-interleave-lints` to see those anyway.

Therefore, this commit removes `-Ztime` and the associated machinery. One thing
to note is that the existing "extra verbose" activities all have an extra
string argument, so the commit adds the ability to accept an extra argument to
the "verbose" activities.
2022-10-06 15:49:44 +11:00
..
config unix_sigpipe: Inline compiler sigpipe constants in std 2022-08-31 18:20:49 +02:00
cgu_reuse_tracker.rs Always import all tracing macros for the entire crate instead of piecemeal by module 2022-09-01 14:54:27 +00:00
code_stats.rs avoid some Symbol to String conversions 2022-07-17 04:09:20 +09:00
config.rs Improve the help message for an invalid calling convention 2022-09-22 22:18:30 +02:00
cstore.rs change rlib format to discern native dependencies 2022-09-12 16:45:03 +03:00
errors.rs Migrate rustc_session::expr_parentheses_needed to Subdiagnostic struct 2022-09-27 20:29:18 +02:00
filesearch.rs Always import all tracing macros for the entire crate instead of piecemeal by module 2022-09-01 14:54:27 +00:00
lib.rs remove cfg(bootstrap) 2022-09-26 10:14:45 +02:00
options.rs Remove -Ztime option. 2022-10-06 15:49:44 +11:00
output.rs translations(rustc_session): migrate output.rs 2022-09-10 08:19:17 +02:00
parse.rs Remove expr_parentheses_needed from ParseSess 2022-09-30 01:39:20 +00:00
search_paths.rs incr. comp.: Don't export impl_stable_hash_via_hash!() and warn about using it. 2022-04-19 10:43:20 +02:00
session.rs Remove -Ztime option. 2022-10-06 15:49:44 +11:00
utils.rs Lib kind -l link-arg: 2022-07-26 13:55:27 +03:00