Re: [RFC] perf tools: Filter out hidden symbols from labels

Nick Clifton
2019-01-16T11:38:37Z

Hi Guys,

>> Humm, it would be nice for perf annotate to show those options when one
>> navigates the annotation,

Usually the command line options can also be found in the debug info for
the executable. Assuming it has not been stripped, of course.

One of the advantages of the annobin strategy of using ELF notes is that
these are not stripped from executables...

Unfortunately the annobin notes will probably not be very helpful as they
only record a minor subset of the typical gcc command line options.
(Specifically: -O, -g, -D_FORTIFY_SOURCE, -D_GLIBCXX_ASSERTIONS,
-fcf-protection, -fpic (and variants), -fshort-enum, -fstack-clash-protection,
-fstack-protector, -mstackrealign, -fexceptions).

>> Is there any library that gets those
>> annotations and put them in some linked list that we could use in
>> tools/perf/?

Sorry - no such library exists.

> If it's just an ELF note, we could parse it directly.
> https://developers.redhat.com/blog/2018/02/20/annobin-storing-information-binaries/

Exactly - and what a great blog author that person is ... :-)

Cheers
Nick