Arjan van de Ven | 151750c | 2009-09-19 13:36:04 +0200 | [diff] [blame] | 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] |
Stanislav Fomichev | 367b315 | 2013-11-01 20:25:50 +0400 | [diff] [blame] | 11 | 'perf timechart' [<timechart options>] {record} [<record options>] |
Arjan van de Ven | 151750c | 2009-09-19 13:36:04 +0200 | [diff] [blame] | 12 | |
| 13 | DESCRIPTION |
| 14 | ----------- |
| 15 | There are two variants of perf timechart: |
| 16 | |
| 17 | 'perf timechart record <command>' to record the system level events |
Stanislav Fomichev | b97b59b | 2014-07-08 20:03:41 +0400 | [diff] [blame] | 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. |
Arjan van de Ven | 151750c | 2009-09-19 13:36:04 +0200 | [diff] [blame] | 21 | |
| 22 | 'perf timechart' to turn a trace into a Scalable Vector Graphics file, |
Stanislav Fomichev | b97b59b | 2014-07-08 20:03:41 +0400 | [diff] [blame] | 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. |
Arjan van de Ven | 151750c | 2009-09-19 13:36:04 +0200 | [diff] [blame] | 32 | |
Stanislav Fomichev | 367b315 | 2013-11-01 20:25:50 +0400 | [diff] [blame] | 33 | TIMECHART OPTIONS |
| 34 | ----------------- |
Arjan van de Ven | 151750c | 2009-09-19 13:36:04 +0200 | [diff] [blame] | 35 | -o:: |
| 36 | --output=:: |
| 37 | Select the output file (default: output.svg) |
| 38 | -i:: |
| 39 | --input=:: |
Robert Richter | efad141 | 2011-12-07 10:02:54 +0100 | [diff] [blame] | 40 | Select the input file (default: perf.data unless stdin is a fifo) |
Arjan van de Ven | 5094b65 | 2009-09-20 18:14:16 +0200 | [diff] [blame] | 41 | -w:: |
| 42 | --width=:: |
| 43 | Select the width of the SVG file (default: 1000) |
Arjan van de Ven | bbe2987 | 2009-10-20 07:09:39 +0900 | [diff] [blame] | 44 | -P:: |
Arjan van de Ven | 39a90a8 | 2009-09-24 15:40:13 +0200 | [diff] [blame] | 45 | --power-only:: |
| 46 | Only output the CPU power section of the diagram |
Stanislav Fomichev | c87097d | 2013-11-01 20:25:48 +0400 | [diff] [blame] | 47 | -T:: |
| 48 | --tasks-only:: |
| 49 | Don't output processor state transitions |
Arjan van de Ven | bbe2987 | 2009-10-20 07:09:39 +0900 | [diff] [blame] | 50 | -p:: |
| 51 | --process:: |
| 52 | Select the processes to display, by name or PID |
Sihyeon Jang | f4a30d2 | 2017-11-16 23:26:04 +0900 | [diff] [blame] | 53 | -f:: |
| 54 | --force:: |
| 55 | Don't complain, do it. |
David Ahern | ec5761e | 2010-12-09 13:27:07 -0700 | [diff] [blame] | 56 | --symfs=<directory>:: |
| 57 | Look for files with symbols relative to this directory. |
Stanislav Fomichev | 54874e3 | 2013-11-01 20:25:46 +0400 | [diff] [blame] | 58 | -n:: |
| 59 | --proc-num:: |
| 60 | Print task info for at least given number of tasks. |
Stanislav Fomichev | c507999 | 2013-12-02 18:37:36 +0400 | [diff] [blame] | 61 | -t:: |
| 62 | --topology:: |
| 63 | Sort CPUs according to topology. |
Stanislav Fomichev | e57a2df | 2013-12-17 19:53:49 +0400 | [diff] [blame] | 64 | --highlight=<duration_nsecs|task_name>:: |
| 65 | Highlight tasks (using different color) that run more than given |
| 66 | duration or tasks with given name. If number is given it's interpreted |
| 67 | as number of nanoseconds. If non-numeric string is given it's |
| 68 | interpreted as task name. |
Stanislav Fomichev | d243144 | 2014-07-08 20:03:43 +0400 | [diff] [blame] | 69 | --io-skip-eagain:: |
| 70 | Don't draw EAGAIN IO events. |
| 71 | --io-min-time=<nsecs>:: |
| 72 | Draw small events as if they lasted min-time. Useful when you need |
| 73 | to see very small and fast IO. It's possible to specify ms or us |
| 74 | suffix to specify time in milliseconds or microseconds. |
| 75 | Default value is 1ms. |
| 76 | --io-merge-dist=<nsecs>:: |
| 77 | Merge events that are merge-dist nanoseconds apart. |
| 78 | Reduces number of figures on the SVG and makes it more render-friendly. |
| 79 | It's possible to specify ms or us suffix to specify time in |
| 80 | milliseconds or microseconds. |
| 81 | Default value is 1us. |
Stanislav Fomichev | 54874e3 | 2013-11-01 20:25:46 +0400 | [diff] [blame] | 82 | |
Stanislav Fomichev | 367b315 | 2013-11-01 20:25:50 +0400 | [diff] [blame] | 83 | RECORD OPTIONS |
| 84 | -------------- |
| 85 | -P:: |
| 86 | --power-only:: |
| 87 | Record only power-related events |
| 88 | -T:: |
| 89 | --tasks-only:: |
| 90 | Record only tasks-related events |
Stanislav Fomichev | b97b59b | 2014-07-08 20:03:41 +0400 | [diff] [blame] | 91 | -I:: |
| 92 | --io-only:: |
| 93 | Record only io-related events |
Stanislav Fomichev | 6f8d67f | 2013-11-01 20:25:51 +0400 | [diff] [blame] | 94 | -g:: |
| 95 | --callchain:: |
| 96 | Do call-graph (stack chain/backtrace) recording |
Stanislav Fomichev | 367b315 | 2013-11-01 20:25:50 +0400 | [diff] [blame] | 97 | |
Stanislav Fomichev | f48e00c | 2014-06-10 13:52:16 +0400 | [diff] [blame] | 98 | EXAMPLES |
| 99 | -------- |
| 100 | |
| 101 | $ perf timechart record git pull |
| 102 | |
| 103 | [ perf record: Woken up 13 times to write data ] |
| 104 | [ perf record: Captured and wrote 4.253 MB perf.data (~185801 samples) ] |
| 105 | |
| 106 | $ perf timechart |
| 107 | |
| 108 | Written 10.2 seconds of trace to output.svg. |
| 109 | |
| 110 | Record system-wide timechart: |
| 111 | |
| 112 | $ perf timechart record |
| 113 | |
| 114 | then generate timechart and highlight 'gcc' tasks: |
| 115 | |
| 116 | $ perf timechart --highlight gcc |
| 117 | |
Stanislav Fomichev | b97b59b | 2014-07-08 20:03:41 +0400 | [diff] [blame] | 118 | Record system-wide IO events: |
| 119 | |
| 120 | $ perf timechart record -I |
| 121 | |
| 122 | then generate timechart: |
| 123 | |
| 124 | $ perf timechart |
| 125 | |
Arjan van de Ven | 151750c | 2009-09-19 13:36:04 +0200 | [diff] [blame] | 126 | SEE ALSO |
| 127 | -------- |
| 128 | linkperf:perf-record[1] |