LLVM Clang 9.0 Adds "-ftime-trace" To Produce Useful Time Trace Profiling Data
Written by Michael Larabel in LLVM on 31 March 2019 at 07:07 AM EDT. 1 Comment
LLVM has merged a very useful feature for the Clang 9.0 release this autumn: the -ftime-trace feature allows producing time trace profiling data in a friendly format that is useful for developers to better understand where the compiler is spending most of its time and other areas for improvement.

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.

About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Related LLVM News
Popular News This Week