Bug 393857 - Please add support for gcc's artificial attribute
Summary: Please add support for gcc's artificial attribute
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: callgrind (show other bugs)
Version: 3.13.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Josef Weidendorfer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-04 19:47 UTC by Daniel
Modified: 2018-05-04 19:47 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel 2018-05-04 19:47:22 UTC
Callgrind aggregates data for all inline function calls, and presents them in separate section below profiled code. This causes problem when code calls small inline functions many times from many places, e.g. when it uses intrinsics. In the past this also caused problem with debugging using gdb, so gcc introduced special function attribute - artificial. When it is used, gdb on callstacks shows place where function is inlined instead of line from inlined function. Here is nice example: https://stackoverflow.com/questions/20110291/use-cases-of-the-gcc-artificial-function-attribute

Please add support for artificial attribute to Valgrind. It would help with profiling programs which uses intrinsics, and any others which uses similar small inline wrappers.

Aggregated data for inline function also may be beneficial in some cases, so please keep displaying them as well. You may add new option which will allow to choose what to display (aggregated data, inline data, both).