about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-08-03 00:50:09 +0000
committerbors <bors@rust-lang.org>2018-08-03 00:50:09 +0000
commit1e3c45a7c3bdc23ad19bcae3843e1757f4796bd2 (patch)
treeb5c989c51e3560f1e3a23ca540fa3fb3d6a8b05a /src/rustllvm/PassWrapper.cpp
parent40e4b6ee3dd70a05007915bd1c15c150a7b7899f (diff)
parent2d3a0a99279093e024c819dda826626a088bcd7e (diff)
downloadrust-1e3c45a7c3bdc23ad19bcae3843e1757f4796bd2.tar.gz
rust-1e3c45a7c3bdc23ad19bcae3843e1757f4796bd2.zip
Auto merge of #51657 - wesleywiser:wip_profiling, r=eddyb
Implement a self profiler

This is a work in progress implementation of #50780. I'd love feedback on the overall structure and code as well as some specific things:

- [The query categorization mechanism](https://github.com/rust-lang/rust/compare/master...wesleywiser:wip_profiling?expand=1#diff-19e0a69c10eff31eb2d16805e79f3437R101). This works but looks kind of ugly to me. Perhaps there's a better way?

- [The profiler assumes only one activity can run at a time](https://github.com/rust-lang/rust/compare/master...wesleywiser:wip_profiling?expand=1#diff-f8a403b2d88d873e4b27c097c614a236R177). This is obviously incompatible with the ongoing parallel queries.

- [The output code is just a bunch of `format!()`s](https://github.com/rust-lang/rust/compare/master...wesleywiser:wip_profiling?expand=1#diff-f8a403b2d88d873e4b27c097c614a236R91). Is there a better way to generate markdown or json in the compiler?

- [The query categorizations are likely wrong](https://github.com/rust-lang/rust/compare/master...wesleywiser:wip_profiling?expand=1#diff-19e0a69c10eff31eb2d16805e79f3437R101). I've marked what seemed obvious to me but I'm sure I got a lot of them wrong.

The overhead currently seems very low. Running `perf` on a sample compilation with profiling enabled reveals:
![image](https://user-images.githubusercontent.com/831192/41657821-9775efec-7462-11e8-9e5e-47ec94105d9d.png)
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions