-
Notifications
You must be signed in to change notification settings - Fork 0
/
README-py
33 lines (24 loc) · 1.06 KB
/
README-py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
*** OVERVIEW ***
This tool is composed by three scripts:
./stackcollapse-perf.py
generates formatted performance data starting from the output
of "perf script".
./stackcollapse-stap.py
generates formatted performance data starting from the output
of the below example.
./flamegraph.py
generates an SVG flamegraph starting from the output of one
of the previous script.
The following example involves the execution of a one-second sleep.
*** PERF USAGE ***
perf record -a -g -F 1000 sleep 1
perf script | ./stackcollapse-perf.py | ./flamegraph.py > perf-kernel.svg
*** SYSTEMTAP USAGE ***
stap -s 32 -D MAXBACKTRACE=100 -D MAXSTRINGLEN=4096 -D MAXMAPENTRIES=10240 \
-D MAXACTION=10000 -D STP_OVERLOAD_THRESHOLD=5000000000 --all-modules \
-ve 'global s; probe timer.profile { s[backtrace()] <<< 1; }
probe end { foreach (i in s+) { print_stack(i);
printf("\t%d\n", @count(s[i])); } } probe timer.s(1) { exit(); }' \
> out.stap-stacks
./stackcollapse-stap.py out.stap-stacks > out.stap-folded
cat out.stap-folded | ./flamegraph.py > stap-kernel.svg