sdk/tools/heaptrack.git
9 years agoDisable QGV BSP item indexing for the FlameGraph scene.
Milian Wolff [Fri, 4 Sep 2015 14:13:48 +0000 (16:13 +0200)]
Disable QGV BSP item indexing for the FlameGraph scene.

The data changes frequently and this would be slow when we use the BSP.

9 years agoAdapt the minRootWidth to the available viewport width
Milian Wolff [Fri, 4 Sep 2015 14:10:08 +0000 (16:10 +0200)]
Adapt the minRootWidth to the available viewport width

9 years agoCleanup code and build graphics items in the background thread.
Milian Wolff [Fri, 4 Sep 2015 13:37:14 +0000 (15:37 +0200)]
Cleanup code and build graphics items in the background thread.

This prevents ~1s of GUI freezes on common data files.

9 years agoBring back mouse wheel zooming.
Milian Wolff [Wed, 2 Sep 2015 15:09:36 +0000 (17:09 +0200)]
Bring back mouse wheel zooming.

Works fine when removing the ItemIgnoresTransformations flag,
which apparently isn't required after all.

9 years agoImplement click-to-zoom in FlameGraph
Milian Wolff [Wed, 2 Sep 2015 15:04:13 +0000 (17:04 +0200)]
Implement click-to-zoom in FlameGraph

9 years agoRefactor code and use QGV parent child chain while ignoring transformations.
Milian Wolff [Wed, 2 Sep 2015 14:06:46 +0000 (16:06 +0200)]
Refactor code and use QGV parent child chain while ignoring transformations.

First steps towards custom zooming operation.

9 years agoSet pen externally, add total item
Milian Wolff [Wed, 2 Sep 2015 13:53:49 +0000 (15:53 +0200)]
Set pen externally, add total item

9 years agoExclude stop indices from GUI backtraces.
Milian Wolff [Wed, 2 Sep 2015 13:52:27 +0000 (15:52 +0200)]
Exclude stop indices from GUI backtraces.

9 years agoUse correct foreground color.
Milian Wolff [Wed, 2 Sep 2015 09:45:20 +0000 (11:45 +0200)]
Use correct foreground color.

9 years agoKeep font size stable.
Milian Wolff [Tue, 1 Sep 2015 22:40:13 +0000 (00:40 +0200)]
Keep font size stable.

9 years agoImprove layouting and data generation for flame graph.
Milian Wolff [Tue, 1 Sep 2015 22:17:18 +0000 (00:17 +0200)]
Improve layouting and data generation for flame graph.

Don't count non-leaf node's cost multiple times and take the
parent cost into account when calculating the width of frame
graphics items.

9 years agoBuild a top-down flame graph.
Milian Wolff [Tue, 1 Sep 2015 21:39:19 +0000 (23:39 +0200)]
Build a top-down flame graph.

The layouting is still wrong, but this gives us the data at least.

9 years agoMerge remote-tracking branch 'origin/master' into flamegraph
Milian Wolff [Tue, 1 Sep 2015 20:37:09 +0000 (22:37 +0200)]
Merge remote-tracking branch 'origin/master' into flamegraph

9 years agodo not mix up peak and allocated columns
Milian Wolff [Mon, 24 Aug 2015 12:52:55 +0000 (14:52 +0200)]
do not mix up peak and allocated columns

9 years agoAdd QDebug include, for potential printf debugging needs.
Milian Wolff [Mon, 24 Aug 2015 12:52:37 +0000 (14:52 +0200)]
Add QDebug include, for potential printf debugging needs.

9 years agoAdd initial take on a FlameGraph based on QGraphicsView.
Milian Wolff [Fri, 21 Aug 2015 21:49:20 +0000 (23:49 +0200)]
Add initial take on a FlameGraph based on QGraphicsView.

Many issues still, mostly due to bad scaling, i.e. we'd want
constant text size (elided if parent item is too small), and constant
item height based on text height.

9 years agoRemove warning about bogus translation.
Milian Wolff [Fri, 21 Aug 2015 20:59:26 +0000 (22:59 +0200)]
Remove warning about bogus translation.

9 years agoMake it possible to create flamegraph compatible stack files.
Milian Wolff [Thu, 20 Aug 2015 21:09:30 +0000 (23:09 +0200)]
Make it possible to create flamegraph compatible stack files.

heaptrack_print gained the following new feature:

 -F [ --print-flamegraph ] arg
Path to output file where a flame-graph compatible stack file will
be written to.
To visualize the resulting file, use flamegraph.pl from
https://github.com/brendangregg/FlameGraph:
    heaptrack_print heaptrack.someapp.PID.gz -F stacks.txt
    # optionally pass --reverse to flamegraph.pl
    flamegraph.pl --title "heaptrack: allocations" --colors mem \
      --countname allocations < stacks.txt > heaptrack.someapp.PID.svg
    [firefox|chromium] heaptrack.someapp.PID.svg

9 years agoIncrease width of help output
Milian Wolff [Thu, 20 Aug 2015 20:49:20 +0000 (22:49 +0200)]
Increase width of help output

9 years agoSave memory by keeping file strings shared.
Milian Wolff [Mon, 10 Aug 2015 16:28:54 +0000 (18:28 +0200)]
Save memory by keeping file strings shared.

Before, we detached when we concatenated the string number, leading
to excessive memory consumption in large data files.

9 years agoFix compile of test when unwind.h is in non-standard path.
Milian Wolff [Mon, 10 Aug 2015 08:51:48 +0000 (10:51 +0200)]
Fix compile of test when unwind.h is in non-standard path.

9 years agoFix serious regression which broke evaluation of back traces.
Milian Wolff [Thu, 23 Jul 2015 14:50:49 +0000 (16:50 +0200)]
Fix serious regression which broke evaluation of back traces.

The data format expects hexadecimal numbers, thus output one.
Regression was introduced when I hacked in the 32bit support.

9 years agoAdd first test to verify libunwind integration behaves sane.
Milian Wolff [Thu, 23 Jul 2015 14:30:30 +0000 (16:30 +0200)]
Add first test to verify libunwind integration behaves sane.

Turns out that you must not build libunwind with the gold linker,
it completely breaks the stack unwinding functionality for me.

TODO: use a proper testing framework here.

9 years agoDon't show an error when heaptrack_gui is not in PATH.
Milian Wolff [Tue, 21 Jul 2015 12:01:00 +0000 (14:01 +0200)]
Don't show an error when heaptrack_gui is not in PATH.

9 years agoMake GUI/Chart optional.
Milian Wolff [Tue, 21 Jul 2015 11:58:21 +0000 (13:58 +0200)]
Make GUI/Chart optional.

9 years agoFix 'obvious' error on 32bit for injection, still doesn't work properly.
Milian Wolff [Wed, 8 Jul 2015 16:14:06 +0000 (18:14 +0200)]
Fix 'obvious' error on 32bit for injection, still doesn't work properly.

9 years agoAlso fix building of the gui on 32bit
Milian Wolff [Wed, 8 Jul 2015 16:13:49 +0000 (18:13 +0200)]
Also fix building of the gui on 32bit

9 years agoAlways assume 64bit input data in the printer.
Milian Wolff [Wed, 8 Jul 2015 15:47:07 +0000 (17:47 +0200)]
Always assume 64bit input data in the printer.

Otherwise, we cannot print 64bit records on 32bit machines.

9 years agoFix compile warnings on 32bit
Milian Wolff [Wed, 8 Jul 2015 15:38:44 +0000 (17:38 +0200)]
Fix compile warnings on 32bit

9 years agoUse ki18n_wrap_ui
Milian Wolff [Fri, 3 Jul 2015 07:57:35 +0000 (09:57 +0200)]
Use ki18n_wrap_ui

9 years agoSet application domain for translations
Milian Wolff [Fri, 3 Jul 2015 07:56:38 +0000 (09:56 +0200)]
Set application domain for translations

9 years agoShow a window when no files are given.
Milian Wolff [Fri, 3 Jul 2015 07:56:20 +0000 (09:56 +0200)]
Show a window when no files are given.

9 years agoProperly link against zlib where required.
Milian Wolff [Thu, 2 Jul 2015 21:18:41 +0000 (23:18 +0200)]
Properly link against zlib where required.

9 years agoRemove wrong assert.
Milian Wolff [Thu, 2 Jul 2015 21:17:36 +0000 (23:17 +0200)]
Remove wrong assert.

9 years agoGet rid of c-formatting message with %1s
Yuri Chornoivan [Tue, 23 Jun 2015 16:36:31 +0000 (19:36 +0300)]
Get rid of c-formatting message with %1s

9 years agoAdd Messages.sh for gettext extraction.
Milian Wolff [Mon, 22 Jun 2015 22:03:25 +0000 (00:03 +0200)]
Add Messages.sh for gettext extraction.

9 years agoProperly use max-or-last leaked data value.
Milian Wolff [Mon, 15 Jun 2015 23:59:11 +0000 (01:59 +0200)]
Properly use max-or-last leaked data value.

9 years agoInclude 0 as first chart datapoint.
Milian Wolff [Mon, 15 Jun 2015 23:41:18 +0000 (01:41 +0200)]
Include 0 as first chart datapoint.

9 years agoadvertise heaptrack_gui
Milian Wolff [Mon, 15 Jun 2015 23:40:22 +0000 (01:40 +0200)]
advertise heaptrack_gui

9 years agoAlso show total bytes allocated over time.
Milian Wolff [Mon, 15 Jun 2015 23:37:37 +0000 (01:37 +0200)]
Also show total bytes allocated over time.

9 years agoAlso show total number of allocations over time.
Milian Wolff [Mon, 15 Jun 2015 23:32:11 +0000 (01:32 +0200)]
Also show total number of allocations over time.

9 years agoShow total leaked data in graph.
Milian Wolff [Mon, 15 Jun 2015 23:12:20 +0000 (01:12 +0200)]
Show total leaked data in graph.

9 years agoPrepare for addition of more visualizations.
Milian Wolff [Mon, 15 Jun 2015 22:14:09 +0000 (00:14 +0200)]
Prepare for addition of more visualizations.

Refactors loading of files into its own class and cleans up the
implementation of the (bottom-up) model.

9 years agoAdd about data, enable loading of multiple files.
Milian Wolff [Mon, 15 Jun 2015 21:29:31 +0000 (23:29 +0200)]
Add about data, enable loading of multiple files.

9 years agoGroup disabling of stdio locking code.
Milian Wolff [Mon, 15 Jun 2015 21:03:37 +0000 (23:03 +0200)]
Group disabling of stdio locking code.

9 years agoUse binary search in TraceTree.
Milian Wolff [Mon, 15 Jun 2015 20:58:06 +0000 (22:58 +0200)]
Use binary search in TraceTree.

9 years agoRename function - it's not a dlopen callback, but a dl_iterate_phdr one.
Milian Wolff [Mon, 15 Jun 2015 20:48:34 +0000 (22:48 +0200)]
Rename function - it's not a dlopen callback, but a dl_iterate_phdr one.

9 years agoTwo more coments
Milian Wolff [Mon, 15 Jun 2015 20:42:41 +0000 (22:42 +0200)]
Two more coments

9 years agoMerge branch 'gui'
Milian Wolff [Mon, 15 Jun 2015 20:28:21 +0000 (22:28 +0200)]
Merge branch 'gui'

9 years agoRun more stuff in parallel.
Milian Wolff [Mon, 15 Jun 2015 20:26:07 +0000 (22:26 +0200)]
Run more stuff in parallel.

9 years agoAdd tooltip to header
Milian Wolff [Mon, 15 Jun 2015 19:46:36 +0000 (21:46 +0200)]
Add tooltip to header

9 years agoMerge location columns.
Milian Wolff [Mon, 15 Jun 2015 19:46:28 +0000 (21:46 +0200)]
Merge location columns.

9 years agoMake filter case insensitive
Milian Wolff [Mon, 15 Jun 2015 19:37:07 +0000 (21:37 +0200)]
Make filter case insensitive

9 years agoShow debuggee command line in heaptrack_gui
Milian Wolff [Mon, 15 Jun 2015 19:27:03 +0000 (21:27 +0200)]
Show debuggee command line in heaptrack_gui

9 years agoMake heaptrack more compatible with other debug tools.
Milian Wolff [Mon, 15 Jun 2015 19:11:55 +0000 (21:11 +0200)]
Make heaptrack more compatible with other debug tools.

Ignore any '--' parameter.

9 years agoSkip one more level in backtraces in debug builds.
Milian Wolff [Mon, 15 Jun 2015 19:11:06 +0000 (21:11 +0200)]
Skip one more level in backtraces in debug builds.

Otherwise, the malloc function would still be shown in the backtrace
and thereby breaking the aggregation we use elsewhere.

9 years agoTranslate summary.
Milian Wolff [Fri, 12 Jun 2015 13:37:38 +0000 (15:37 +0200)]
Translate summary.

9 years agoShow full merged backtraces in heaptrack_gui.
Milian Wolff [Fri, 12 Jun 2015 13:27:42 +0000 (15:27 +0200)]
Show full merged backtraces in heaptrack_gui.

9 years agouse KFormat for byte formatting in Qt model implementation.
Milian Wolff [Sun, 7 Jun 2015 18:50:21 +0000 (20:50 +0200)]
use KFormat for byte formatting in Qt model implementation.

9 years agoCopy the massif-visualizer GUI pattern with open/load/result pages.
Milian Wolff [Sun, 7 Jun 2015 18:27:09 +0000 (20:27 +0200)]
Copy the massif-visualizer GUI pattern with open/load/result pages.

Also load the data in a background thread with ThreadWeaver.

9 years agoFix style and fix early-return check for Model::data()
Milian Wolff [Sun, 7 Jun 2015 18:23:59 +0000 (20:23 +0200)]
Fix style and fix early-return check for Model::data()

9 years agoMake it possible to filter by function, module and file info.
Milian Wolff [Sun, 7 Jun 2015 16:59:07 +0000 (18:59 +0200)]
Make it possible to filter by function, module and file info.

9 years agoAllow filtering by file/module as well.
Milian Wolff [Sun, 7 Jun 2015 16:47:02 +0000 (18:47 +0200)]
Allow filtering by file/module as well.

9 years agoCleanup CMake code a bit
Milian Wolff [Sun, 7 Jun 2015 16:05:12 +0000 (18:05 +0200)]
Cleanup CMake code a bit

9 years agoLink against KF5, use KRecursiveFilterProxyModel, fix some issues.
Milian Wolff [Sun, 7 Jun 2015 15:57:26 +0000 (17:57 +0200)]
Link against KF5, use KRecursiveFilterProxyModel, fix some issues.

9 years agoDeduplicate shown functions by skipping first, merged, level.
Milian Wolff [Sun, 7 Jun 2015 11:53:21 +0000 (13:53 +0200)]
Deduplicate shown functions by skipping first, merged, level.

9 years agoReturn empty QString when no file was available.
Milian Wolff [Sun, 7 Jun 2015 11:50:16 +0000 (13:50 +0200)]
Return empty QString when no file was available.

Fixes assertion in ModelTest.

9 years agoShow backtrace in tooltip.
Milian Wolff [Sun, 7 Jun 2015 11:47:32 +0000 (13:47 +0200)]
Show backtrace in tooltip.

9 years agoAdd modeltest sources
Milian Wolff [Sun, 7 Jun 2015 11:32:59 +0000 (13:32 +0200)]
Add modeltest sources

9 years agoShow sub-traces of merged allocation data in the model.
Milian Wolff [Sun, 7 Jun 2015 11:32:14 +0000 (13:32 +0200)]
Show sub-traces of merged allocation data in the model.

9 years agoMove some helper functions into the shared file, will use that later for tooltips
Milian Wolff [Sun, 7 Jun 2015 10:43:30 +0000 (12:43 +0200)]
Move some helper functions into the shared file, will use that later for tooltips

9 years agoAdd filter by function
Milian Wolff [Sun, 7 Jun 2015 10:30:49 +0000 (12:30 +0200)]
Add filter by function

9 years agoShow function, file and module information
Milian Wolff [Sun, 7 Jun 2015 10:30:42 +0000 (12:30 +0200)]
Show function, file and module information

9 years agoSort view
Milian Wolff [Sun, 7 Jun 2015 10:05:27 +0000 (12:05 +0200)]
Sort view

9 years agoShow merged allocation data in model.
Milian Wolff [Sun, 7 Jun 2015 09:59:02 +0000 (11:59 +0200)]
Show merged allocation data in model.

9 years agoMove data into model.
Milian Wolff [Sun, 7 Jun 2015 09:48:20 +0000 (11:48 +0200)]
Move data into model.

9 years agoMerge branch 'master' into gui
Milian Wolff [Sun, 7 Jun 2015 09:34:30 +0000 (11:34 +0200)]
Merge branch 'master' into gui

9 years agoSet version to 0.1.0 and include it in the tools.
Milian Wolff [Sat, 30 May 2015 12:20:02 +0000 (14:20 +0200)]
Set version to 0.1.0 and include it in the tools.

9 years agoDo not crash after injection in ld-linux.
Milian Wolff [Sat, 23 May 2015 21:30:09 +0000 (23:30 +0200)]
Do not crash after injection in ld-linux.

Apparently it is a very bad idea to overwrite e.g. free in ld-linux,
and it triggered crashes when trying to inject heaptrack into a KF5
application such as kwrite.

9 years agoCleanup code slightly for readability
Milian Wolff [Thu, 21 May 2015 09:05:34 +0000 (11:05 +0200)]
Cleanup code slightly for readability

9 years agoMerge branch 'master' into gui
Milian Wolff [Mon, 18 May 2015 15:59:22 +0000 (17:59 +0200)]
Merge branch 'master' into gui

9 years agoFix compilation error on some platforms.
Matthias Schwarzott [Mon, 18 May 2015 10:05:47 +0000 (12:05 +0200)]
Fix compilation error on some platforms.

See also: https://bugs.gentoo.org/show_bug.cgi?id=548850

9 years agoStart a simple Qt GUI and share some code with the ASCII printer.
Milian Wolff [Mon, 18 May 2015 14:13:59 +0000 (16:13 +0200)]
Start a simple Qt GUI and share some code with the ASCII printer.

9 years agoFix compilation error on some platforms.
Matthias Schwarzott [Mon, 18 May 2015 10:05:47 +0000 (12:05 +0200)]
Fix compilation error on some platforms.

See also: https://bugs.gentoo.org/show_bug.cgi?id=548850

9 years agoStay backwards compatible to old Boost 1.41 for RHEL 6 compatibility.
Milian Wolff [Thu, 30 Apr 2015 11:26:27 +0000 (13:26 +0200)]
Stay backwards compatible to old Boost 1.41 for RHEL 6 compatibility.

9 years agoSet CMAKE_INSTALL_RPATH_USE_LINK_PATH to true.
Milian Wolff [Thu, 30 Apr 2015 11:21:58 +0000 (13:21 +0200)]
Set CMAKE_INSTALL_RPATH_USE_LINK_PATH to true.

This makes it simpler to run heaptrack against e.g. a
libunwind available in the CMAKE_INSTALL_PREFIX. Otherwise,
one would have to set the LD_LIBRARY_PATH manually.

9 years agoDon't fail to compile when aligned alloc is not available.
Milian Wolff [Thu, 30 Apr 2015 10:59:56 +0000 (12:59 +0200)]
Don't fail to compile when aligned alloc is not available.

9 years agoMake symlinked heaptrack shell script work properly.
Milian Wolff [Mon, 27 Apr 2015 12:57:23 +0000 (14:57 +0200)]
Make symlinked heaptrack shell script work properly.

9 years agoLink against pthread in the heaptrack libraries.
Milian Wolff [Wed, 15 Apr 2015 14:06:09 +0000 (16:06 +0200)]
Link against pthread in the heaptrack libraries.

This is required to run properly against debuggees that do not
use threads at all.

Reported-by: Yehezkel Horowitz <horowity@checkpoint.com>
Reported-by: Anatolii Koval <AKoval@luxoft.com>
9 years agoUse dlmopen when trying to inject heaptrack_inject.
Anatolii Koval [Wed, 15 Apr 2015 14:02:40 +0000 (16:02 +0200)]
Use dlmopen when trying to inject heaptrack_inject.

Some systems use an optimized dlopen symbol (especially embeded linux
modifications), but these don't touch dlmopen, which is more general.

This prevents an "dlopen - symbol not found" error when trying to
inject heaptrack on such systems to a running process.

9 years agoImprove output and document -p and --pid arguments.
Milian Wolff [Wed, 15 Apr 2015 13:43:25 +0000 (15:43 +0200)]
Improve output and document -p and --pid arguments.

9 years agoFix build on machines where size_t != lu.
Milian Wolff [Wed, 15 Apr 2015 13:08:45 +0000 (15:08 +0200)]
Fix build on machines where size_t != lu.

Reported-by: Yehezkel Horowitz <horowity@checkpoint.com>
9 years agoDon't override LD_PRELOAD, just prepend to it.
Volker Krause [Sat, 17 Jan 2015 15:51:06 +0000 (16:51 +0100)]
Don't override LD_PRELOAD, just prepend to it.

This enables usage on targets that use LD_PRELOAD themselves already.

9 years agoAdd backtrace filter via --filter-bt-function.
Milian Wolff [Wed, 14 Jan 2015 15:13:32 +0000 (16:13 +0100)]
Add backtrace filter via --filter-bt-function.

Only allocations with a function matching the filter will be printed.

9 years agoMake warnings errors as we rely on the libbacktrace features.
Milian Wolff [Tue, 13 Jan 2015 15:48:56 +0000 (16:48 +0100)]
Make warnings errors as we rely on the libbacktrace features.

9 years agoAllow for whitespace in program name and arguments.
Peter Bortas [Tue, 30 Dec 2014 17:22:52 +0000 (18:22 +0100)]
Allow for whitespace in program name and arguments.

9 years agoUse correct allocation data for massif peak data.
Milian Wolff [Mon, 22 Dec 2014 13:52:39 +0000 (14:52 +0100)]
Use correct allocation data for massif peak data.

This way, the sum of the detailed backtraces equals the total snapshot
count. While the x axis is wrong then, this is not so important I
think. Rather, we want to find the memory hotspots which is much
easier this way.

9 years agoDisable malloc_info baseline when attaching to running process.
Milian Wolff [Mon, 22 Dec 2014 13:35:09 +0000 (14:35 +0100)]
Disable malloc_info baseline when attaching to running process.

In such cases, we are more interested in the relative increase. We
do not want to apply the relative threshold based on the absolute
baseline for example, but rather to the data we obtained.

9 years agoMake start time const.
Milian Wolff [Mon, 22 Dec 2014 13:03:30 +0000 (14:03 +0100)]
Make start time const.

9 years agoDon't fail when trying to join the timer thread.
Milian Wolff [Mon, 22 Dec 2014 13:03:21 +0000 (14:03 +0100)]
Don't fail when trying to join the timer thread.