Tools for profiling long compile times?

i’m currently experiencing some uncomfortably long compilation times, which don’t seem to be singularly attributable to any particular thing (complex arithmetic expression, long array literal, etc.) i did recently; it is more so just a gradual accumulation over time.

i can get a pretty exhaustive trace using -debug-time-function-bodies, but it emits many thousands of lines of output, which is hard to sift through. is there a good tool on linux for viewing these traces?

1 Like

You can also try -stats-output-dir <dir>.

5 Likes