[GTALUG] ftrace-time support in Clang

Nicholas Krause xerofoify at gmail.com
Thu Apr 30 18:59:28 EDT 2020



On 4/30/20 12:53 PM, D. Hugh Redelmeier via talk wrote:
> | From: Nicholas Krause via talk <talk at gtalug.org>
> |
> | This seems to be a rather not know option on the LLVM side and it seems GCC
> | does not support it.
> | https://www.phoronix.com/scan.php?page=news_item&px=LLVM-Clang-9.0-Time-Trace
> |
> | Its now in mainline as the articles like this one were mostly written before
> | it was merged in clang/llvm
> | version 9. 10 was just released so its now in the mainline.
> |
> | Maybe it interests some people here who build large software products or use
> | embedded build systems,
>
> As I understand the description, it lets you find the hot-spots in the
> compilation process (i.e. the runtime of an LLVM compiler itself).  I
> admit that the description doesn't make this completely clear.
>
> If I'm right, this feature is only useful for LLVM developers.
> ---
> Post to this mailing list talk at gtalug.org
> Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk
Yes and no.  A lot of features in the middle end and back ends can take 
up lots of
time so for example if your on a project that uses -O3 for unrolling for 
example
it may be good to figure out if those options are useful. A lot of 
people just turn
them off and on again but this ones into issues. Mainly two options can 
run together
and be dependable on each for build speed.

Seeing what the hot passes are may be good for figuring out what compiler
options to enable/disable for speed build.  Ccache and other tools can
only go so far, as buildhistory also for the Yocto Project only shows you
how long each package takes. There doesn't seem to be a way outside
of this to check for compiler tuning parameters taking up lots of time.
Its intended to see hot/cold paths in the actual passes and therefore
link up to what tuning parameters should/may not be required at all.

A lot of people think its not useful but it probably is for optimizing 
build speed
but you can disagree,

Nick


-- 
Fundamentally an organism has conscious mental states if and only if there is something that it is like to be that organism--something it is like for the organism. - Thomas Nagel



More information about the talk mailing list