Commit | Line | Data |
---|---|---|
151750ce AV |
1 | perf-timechart(1) |
2 | ================= | |
3 | ||
4 | NAME | |
5 | ---- | |
6 | perf-timechart - Tool to visualize total system behavior during a workload | |
7 | ||
8 | SYNOPSIS | |
9 | -------- | |
10 | [verse] | |
367b3152 | 11 | 'perf timechart' [<timechart options>] {record} [<record options>] |
151750ce AV |
12 | |
13 | DESCRIPTION | |
14 | ----------- | |
15 | There are two variants of perf timechart: | |
16 | ||
17 | 'perf timechart record <command>' to record the system level events | |
b97b59b9 SF |
18 | of an arbitrary workload. By default timechart records only scheduler |
19 | and CPU events (task switches, running times, CPU power states, etc), | |
20 | but it's possible to record IO (disk, network) activity using -I argument. | |
151750ce AV |
21 | |
22 | 'perf timechart' to turn a trace into a Scalable Vector Graphics file, | |
b97b59b9 SF |
23 | that can be viewed with popular SVG viewers such as 'Inkscape'. Depending |
24 | on the events in the perf.data file, timechart will contain scheduler/cpu | |
25 | events or IO events. | |
26 | ||
27 | In IO mode, every bar has two charts: upper and lower. | |
28 | Upper bar shows incoming events (disk reads, ingress network packets). | |
29 | Lower bar shows outgoing events (disk writes, egress network packets). | |
30 | There are also poll bars which show how much time application spent | |
31 | in poll/epoll/select syscalls. | |
151750ce | 32 | |
367b3152 SF |
33 | TIMECHART OPTIONS |
34 | ----------------- | |
151750ce AV |
35 | -o:: |
36 | --output=:: | |
37 | Select the output file (default: output.svg) | |
38 | -i:: | |
39 | --input=:: | |
efad1415 | 40 | Select the input file (default: perf.data unless stdin is a fifo) |
5094b655 AV |
41 | -w:: |
42 | --width=:: | |
43 | Select the width of the SVG file (default: 1000) | |
bbe2987b | 44 | -P:: |
39a90a8e AV |
45 | --power-only:: |
46 | Only output the CPU power section of the diagram | |
c87097d3 SF |
47 | -T:: |
48 | --tasks-only:: | |
49 | Don't output processor state transitions | |
bbe2987b AV |
50 | -p:: |
51 | --process:: | |
52 | Select the processes to display, by name or PID | |
151750ce | 53 | |
ec5761ea DA |
54 | --symfs=<directory>:: |
55 | Look for files with symbols relative to this directory. | |
54874e32 SF |
56 | -n:: |
57 | --proc-num:: | |
58 | Print task info for at least given number of tasks. | |
c5079997 SF |
59 | -t:: |
60 | --topology:: | |
61 | Sort CPUs according to topology. | |
e57a2dff SF |
62 | --highlight=<duration_nsecs|task_name>:: |
63 | Highlight tasks (using different color) that run more than given | |
64 | duration or tasks with given name. If number is given it's interpreted | |
65 | as number of nanoseconds. If non-numeric string is given it's | |
66 | interpreted as task name. | |
d243144a SF |
67 | --io-skip-eagain:: |
68 | Don't draw EAGAIN IO events. | |
69 | --io-min-time=<nsecs>:: | |
70 | Draw small events as if they lasted min-time. Useful when you need | |
71 | to see very small and fast IO. It's possible to specify ms or us | |
72 | suffix to specify time in milliseconds or microseconds. | |
73 | Default value is 1ms. | |
74 | --io-merge-dist=<nsecs>:: | |
75 | Merge events that are merge-dist nanoseconds apart. | |
76 | Reduces number of figures on the SVG and makes it more render-friendly. | |
77 | It's possible to specify ms or us suffix to specify time in | |
78 | milliseconds or microseconds. | |
79 | Default value is 1us. | |
54874e32 | 80 | |
367b3152 SF |
81 | RECORD OPTIONS |
82 | -------------- | |
83 | -P:: | |
84 | --power-only:: | |
85 | Record only power-related events | |
86 | -T:: | |
87 | --tasks-only:: | |
88 | Record only tasks-related events | |
b97b59b9 SF |
89 | -I:: |
90 | --io-only:: | |
91 | Record only io-related events | |
6f8d67fa SF |
92 | -g:: |
93 | --callchain:: | |
94 | Do call-graph (stack chain/backtrace) recording | |
367b3152 | 95 | |
f48e00ce SF |
96 | EXAMPLES |
97 | -------- | |
98 | ||
99 | $ perf timechart record git pull | |
100 | ||
101 | [ perf record: Woken up 13 times to write data ] | |
102 | [ perf record: Captured and wrote 4.253 MB perf.data (~185801 samples) ] | |
103 | ||
104 | $ perf timechart | |
105 | ||
106 | Written 10.2 seconds of trace to output.svg. | |
107 | ||
108 | Record system-wide timechart: | |
109 | ||
110 | $ perf timechart record | |
111 | ||
112 | then generate timechart and highlight 'gcc' tasks: | |
113 | ||
114 | $ perf timechart --highlight gcc | |
115 | ||
b97b59b9 SF |
116 | Record system-wide IO events: |
117 | ||
118 | $ perf timechart record -I | |
119 | ||
120 | then generate timechart: | |
121 | ||
122 | $ perf timechart | |
123 | ||
151750ce AV |
124 | SEE ALSO |
125 | -------- | |
126 | linkperf:perf-record[1] |