rust/compiler/rustc_driver
Yuki Okushi 6e25418474
Rollup merge of #75143 - oli-obk:tracing, r=RalfJung
Use `tracing` spans to trace the entire MIR interp stack

r? @RalfJung

While being very verbose, this allows really good tracking of what's going on. While I considered schemes like the previous indenter that we had (which we could get by using the `tracing-tree` crate), this will break down horribly with things like multithreaded rustc. Instead, we can now use `RUSTC_LOG` to restrict the things being traced. You could specify a filter in a way that only shows the logging of a specific frame.

![screenshot of command line output of the new formatting](https://user-images.githubusercontent.com/332036/89291343-aa40de00-d65a-11ea-9f6c-ea06c1806327.png)

If we lower the span's level to `debug`, then in `info` level logging we'd not see the frames, but in `debug` level we would see them. The filtering rules in `tracing` are super powerful, but  I'm not sure if we can specify a filter so we do see `debug` level events, but *not* the `frame` spans. The documentation at https://docs.rs/tracing-subscriber/0.2.10/tracing_subscriber/struct.EnvFilter.html makes me think that we can only turn on things, not turn off things at a more precise level.

cc @hawkw
2020-10-04 11:44:49 +09:00
..
src Rollup merge of #75143 - oli-obk:tracing, r=RalfJung 2020-10-04 11:44:49 +09:00
Cargo.toml Use tracing spans to trace the entire MIR interp stack 2020-09-28 20:07:57 +02:00
README.md

The driver crate is effectively the "main" function for the rust compiler. It orchestrates the compilation process and "knits together" the code from the other crates within rustc. This crate itself does not contain any of the "main logic" of the compiler (though it does have some code related to pretty printing or other minor compiler options).

For more information about how the driver works, see the rustc dev guide.