The GCC JIT API supports performance counters:https://gcc.gnu.org/onlinedocs/gcc-7.5.0/jit/topics/performance.html#gcc_jit_timer
Consider exposing an API for those performance counters.
Could maybe be used for rust-lang/rustc_codegen_gcc#598.
The only problem I see is that those timers only support printing results to stdout / files, which can be a bit cumbersome, and may not integrate well with the Rust compiler's self-profile flag.
The GCC JIT API supports performance counters:https://gcc.gnu.org/onlinedocs/gcc-7.5.0/jit/topics/performance.html#gcc_jit_timer
Consider exposing an API for those performance counters.
Could maybe be used for rust-lang/rustc_codegen_gcc#598.
The only problem I see is that those timers only support printing results to stdout / files, which can be a bit cumbersome, and may not integrate well with the Rust compiler's self-profile flag.