LLVM Clang 9.0 Adds "-ftime-trace" To Produce Useful Time Trace Profiling Data

Clang has already supported -ftime-report for printing time summaries for each stage of the compilation process while -ftime-trace yields much more useful data. The output of -ftime-trace is JSON-based profiling outputs that can be loaded into Chrome's chrome://tracing visualizer. This data shows how much time LLVM/Clang is spending on compiling each file, down to the function granularity.
This Clang feature has been worked on for the past several months by well known Unity game engine developer Aras Pranckevičius. Details on the implementation can be found via this post.
Finally as of this weekend, the code was merged for Clang 9.0, which in turn should debut around their usual September~October time-frame.
1 Comment