| 1 |
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4. |
| 2 |
.TH HEAPTRACK_PRINT "1" "March 2017" "heaptrack_print 1.0.0" "User Commands" |
| 3 |
.SH NAME |
| 4 |
heaptrack_print \- heap memory profiler for linux, print utility |
| 5 |
.SH DESCRIPTION |
| 6 |
heaptrack_print \- analyze heaptrack data files. |
| 7 |
.PP |
| 8 |
heaptrack is a heap memory profiler which records information |
| 9 |
about calls to heap allocation functions such as malloc, operator new etc. pp. |
| 10 |
This print utility can then be used to analyze the generated data files. |
| 11 |
.SH OPTIONS |
| 12 |
.TP |
| 13 |
\fB\-f\fR [ \fB\-\-file\fR ] arg |
| 14 |
The heaptrack data file to print. |
| 15 |
.TP |
| 16 |
\fB\-d\fR [ \fB\-\-diff\fR ] arg |
| 17 |
Find the differences to this file. |
| 18 |
.TP |
| 19 |
\fB\-t\fR [ \fB\-\-shorten\-templates\fR ] [=arg(=1)] (=1) |
| 20 |
Shorten template identifiers. |
| 21 |
.TP |
| 22 |
\fB\-m\fR [ \fB\-\-merge\-backtraces\fR ] [=arg(=1)] (=1) |
| 23 |
Merge backtraces. |
| 24 |
NOTE: the merged peak consumption is not correct. |
| 25 |
.TP |
| 26 |
\fB\-p\fR [ \fB\-\-print\-peaks\fR ] [=arg(=1)] (=1) |
| 27 |
Print backtraces to top allocators, sorted by peak consumption. |
| 28 |
.TP |
| 29 |
\fB\-a\fR [ \fB\-\-print\-allocators\fR ] [=arg(=1)] (=1) |
| 30 |
Print backtraces to top allocators, sorted by number of calls to |
| 31 |
allocation functions. |
| 32 |
.TP |
| 33 |
\fB\-T\fR [ \fB\-\-print\-temporary\fR ] [=arg(=1)] (=1) |
| 34 |
Print backtraces to top allocators, sorted by number of temporary |
| 35 |
allocations. |
| 36 |
.TP |
| 37 |
\fB\-l\fR [ \fB\-\-print\-leaks\fR ] [=arg(=1)] (=0) |
| 38 |
Print backtraces to leaked memory allocations. |
| 39 |
.HP |
| 40 |
\fB\-o\fR [ \fB\-\-print\-overall\-allocated\fR ] [=arg(=1)] (=0) Print top overall allocators, ignoring memory frees. |
| 41 |
.TP |
| 42 |
\fB\-n\fR [ \fB\-\-peak\-limit\fR ] [=arg(=10)] (=10) |
| 43 |
Limit the number of reported peaks. |
| 44 |
.TP |
| 45 |
\fB\-s\fR [ \fB\-\-sub\-peak\-limit\fR ] [=arg(=5)] (=5) |
| 46 |
Limit the number of reported backtraces of merged peak locations. |
| 47 |
.TP |
| 48 |
\fB\-H\fR [ \fB\-\-print\-histogram\fR ] arg |
| 49 |
Path to output file where an allocation size histogram will be |
| 50 |
written to. |
| 51 |
.TP |
| 52 |
\fB\-F\fR [ \fB\-\-print\-flamegraph\fR ] arg |
| 53 |
Path to output file where a flame\-graph compatible stack file will |
| 54 |
be written to. |
| 55 |
To visualize the resulting file, use flamegraph.pl from |
| 56 |
https://github.com/brendangregg/FlameGraph: |
| 57 |
.TP |
| 58 |
heaptrack_print heaptrack.someapp.PID.gz \fB\-F\fR stacks.txt |
| 59 |
# optionally pass \fB\-\-reverse\fR to flamegraph.pl |
| 60 |
flamegraph.pl \fB\-\-title\fR "heaptrack: allocations" \fB\-\-colors\fR mem \e |
| 61 |
.TP |
| 62 |
\fB\-\-countname\fR allocations < stacks.txt > heaptrack.someapp.PID.svg |
| 63 |
[firefox|chromium] heaptrack.someapp.PID.svg |
| 64 |
.TP |
| 65 |
\fB\-M\fR [ \fB\-\-print\-massif\fR ] arg |
| 66 |
Path to output file where a massif compatible data file will be |
| 67 |
written to. |
| 68 |
.TP |
| 69 |
\fB\-\-massif\-threshold\fR arg (=1) |
| 70 |
Percentage of current memory usage, below which allocations are |
| 71 |
aggregated into a 'below threshold' entry. |
| 72 |
This is only used in the massif output file so far. |
| 73 |
.TP |
| 74 |
\fB\-\-massif\-detailed\-freq\fR arg (=2) |
| 75 |
Frequency of detailed snapshots in the massif output file. Increase |
| 76 |
this to reduce the file size. |
| 77 |
You can set the value to zero to disable detailed snapshots. |
| 78 |
.TP |
| 79 |
\fB\-\-filter\-bt\-function\fR arg |
| 80 |
Only print allocations where the backtrace contains the given |
| 81 |
function. |
| 82 |
.TP |
| 83 |
\fB\-h\fR [ \fB\-\-help\fR ] |
| 84 |
Show this help message. |
| 85 |
.TP |
| 86 |
\fB\-v\fR [ \fB\-\-version\fR ] |
| 87 |
Displays version information. |
| 88 |
.SH "SEE ALSO" |
| 89 |
The full documentation for |
| 90 |
.B heaptrack_print |
| 91 |
is maintained as a Texinfo manual. If the |
| 92 |
.B info |
| 93 |
and |
| 94 |
.B heaptrack_print |
| 95 |
programs are properly installed at your site, the command |
| 96 |
.IP |
| 97 |
.B info heaptrack_print |
| 98 |
.PP |
| 99 |
should give you access to the complete manual. |