Show inlined frames
authorMilian Wolff <mail@milianw.de>
Mon, 8 May 2017 12:52:26 +0000 (14:52 +0200)
committerMilian Wolff <mail@milianw.de>
Mon, 8 May 2017 12:55:19 +0000 (14:55 +0200)
commit1b9a59dcc625b400e896fae92542496deb472abd
treea95a2a703e9e1eeb537ac9e27d8c7d5dff929370
parent855330456d6b6e2f4ac8c0cde660a959537ef634
Show inlined frames

This is a major usability improvement for C++ code. Previously,
when we profiled code with heaptrack that was built with compiler
optimizations enabled, most allocations within container classes
where missing some parent frames. Even more confusing, sometimes
we missed the interesting user frames completely, when they
got inlined.

Now, we add all inlined frames to the heaptrack_print output and
also include them in the heaptrack_gui models. The simple
inlining example added by this pach clearly shows the advantage:

Before all we got is this:

1 calls to allocation functions with 1.23KB peak consumption from
main
  at /home/milian/projects/src/heaptrack/tests/manual/inlining.cpp:18
  in /home/milian/projects/build/heaptrack/tests/manual/inlining

Afterwards, we get all frames:

1 calls to allocation functions with 1.23KB peak consumption from
asdf()
  at /home/milian/projects/src/heaptrack/tests/manual/inlining.cpp:3
  in /home/milian/projects/build/heaptrack/tests/manual/inlining
bar()
  at /home/milian/projects/src/heaptrack/tests/manual/inlining.cpp:8
foo()
  at /home/milian/projects/src/heaptrack/tests/manual/inlining.cpp:13
main
  at /home/milian/projects/src/heaptrack/tests/manual/inlining.cpp:18
CMakeLists.txt
src/analyze/accumulatedtracedata.cpp
src/analyze/accumulatedtracedata.h
src/analyze/gui/parser.cpp
src/analyze/print/heaptrack_print.cpp
src/interpret/heaptrack_interpret.cpp
tests/manual/CMakeLists.txt
tests/manual/inlining.cpp [new file with mode: 0644]