1151750ceSArjan van de Venperf-timechart(1) 2151750ceSArjan van de Ven================= 3151750ceSArjan van de Ven 4151750ceSArjan van de VenNAME 5151750ceSArjan van de Ven---- 6151750ceSArjan van de Venperf-timechart - Tool to visualize total system behavior during a workload 7151750ceSArjan van de Ven 8151750ceSArjan van de VenSYNOPSIS 9151750ceSArjan van de Ven-------- 10151750ceSArjan van de Ven[verse] 11367b3152SStanislav Fomichev'perf timechart' [<timechart options>] {record} [<record options>] 12151750ceSArjan van de Ven 13151750ceSArjan van de VenDESCRIPTION 14151750ceSArjan van de Ven----------- 15151750ceSArjan van de VenThere are two variants of perf timechart: 16151750ceSArjan van de Ven 17151750ceSArjan van de Ven 'perf timechart record <command>' to record the system level events 18b97b59b9SStanislav Fomichev of an arbitrary workload. By default timechart records only scheduler 19b97b59b9SStanislav Fomichev and CPU events (task switches, running times, CPU power states, etc), 20b97b59b9SStanislav Fomichev but it's possible to record IO (disk, network) activity using -I argument. 21151750ceSArjan van de Ven 22151750ceSArjan van de Ven 'perf timechart' to turn a trace into a Scalable Vector Graphics file, 23b97b59b9SStanislav Fomichev that can be viewed with popular SVG viewers such as 'Inkscape'. Depending 24b97b59b9SStanislav Fomichev on the events in the perf.data file, timechart will contain scheduler/cpu 25b97b59b9SStanislav Fomichev events or IO events. 26b97b59b9SStanislav Fomichev 27b97b59b9SStanislav Fomichev In IO mode, every bar has two charts: upper and lower. 28b97b59b9SStanislav Fomichev Upper bar shows incoming events (disk reads, ingress network packets). 29b97b59b9SStanislav Fomichev Lower bar shows outgoing events (disk writes, egress network packets). 30b97b59b9SStanislav Fomichev There are also poll bars which show how much time application spent 31b97b59b9SStanislav Fomichev in poll/epoll/select syscalls. 32151750ceSArjan van de Ven 33367b3152SStanislav FomichevTIMECHART OPTIONS 34367b3152SStanislav Fomichev----------------- 35151750ceSArjan van de Ven-o:: 36151750ceSArjan van de Ven--output=:: 37151750ceSArjan van de Ven Select the output file (default: output.svg) 38151750ceSArjan van de Ven-i:: 39151750ceSArjan van de Ven--input=:: 40efad1415SRobert Richter Select the input file (default: perf.data unless stdin is a fifo) 415094b655SArjan van de Ven-w:: 425094b655SArjan van de Ven--width=:: 435094b655SArjan van de Ven Select the width of the SVG file (default: 1000) 44bbe2987bSArjan van de Ven-P:: 4539a90a8eSArjan van de Ven--power-only:: 4639a90a8eSArjan van de Ven Only output the CPU power section of the diagram 47c87097d3SStanislav Fomichev-T:: 48c87097d3SStanislav Fomichev--tasks-only:: 49c87097d3SStanislav Fomichev Don't output processor state transitions 50bbe2987bSArjan van de Ven-p:: 51bbe2987bSArjan van de Ven--process:: 52bbe2987bSArjan van de Ven Select the processes to display, by name or PID 53*f4a30d2bSSihyeon Jang-f:: 54*f4a30d2bSSihyeon Jang--force:: 55*f4a30d2bSSihyeon Jang Don't complain, do it. 56ec5761eaSDavid Ahern--symfs=<directory>:: 57ec5761eaSDavid Ahern Look for files with symbols relative to this directory. 5854874e32SStanislav Fomichev-n:: 5954874e32SStanislav Fomichev--proc-num:: 6054874e32SStanislav Fomichev Print task info for at least given number of tasks. 61c5079997SStanislav Fomichev-t:: 62c5079997SStanislav Fomichev--topology:: 63c5079997SStanislav Fomichev Sort CPUs according to topology. 64e57a2dffSStanislav Fomichev--highlight=<duration_nsecs|task_name>:: 65e57a2dffSStanislav Fomichev Highlight tasks (using different color) that run more than given 66e57a2dffSStanislav Fomichev duration or tasks with given name. If number is given it's interpreted 67e57a2dffSStanislav Fomichev as number of nanoseconds. If non-numeric string is given it's 68e57a2dffSStanislav Fomichev interpreted as task name. 69d243144aSStanislav Fomichev--io-skip-eagain:: 70d243144aSStanislav Fomichev Don't draw EAGAIN IO events. 71d243144aSStanislav Fomichev--io-min-time=<nsecs>:: 72d243144aSStanislav Fomichev Draw small events as if they lasted min-time. Useful when you need 73d243144aSStanislav Fomichev to see very small and fast IO. It's possible to specify ms or us 74d243144aSStanislav Fomichev suffix to specify time in milliseconds or microseconds. 75d243144aSStanislav Fomichev Default value is 1ms. 76d243144aSStanislav Fomichev--io-merge-dist=<nsecs>:: 77d243144aSStanislav Fomichev Merge events that are merge-dist nanoseconds apart. 78d243144aSStanislav Fomichev Reduces number of figures on the SVG and makes it more render-friendly. 79d243144aSStanislav Fomichev It's possible to specify ms or us suffix to specify time in 80d243144aSStanislav Fomichev milliseconds or microseconds. 81d243144aSStanislav Fomichev Default value is 1us. 8254874e32SStanislav Fomichev 83367b3152SStanislav FomichevRECORD OPTIONS 84367b3152SStanislav Fomichev-------------- 85367b3152SStanislav Fomichev-P:: 86367b3152SStanislav Fomichev--power-only:: 87367b3152SStanislav Fomichev Record only power-related events 88367b3152SStanislav Fomichev-T:: 89367b3152SStanislav Fomichev--tasks-only:: 90367b3152SStanislav Fomichev Record only tasks-related events 91b97b59b9SStanislav Fomichev-I:: 92b97b59b9SStanislav Fomichev--io-only:: 93b97b59b9SStanislav Fomichev Record only io-related events 946f8d67faSStanislav Fomichev-g:: 956f8d67faSStanislav Fomichev--callchain:: 966f8d67faSStanislav Fomichev Do call-graph (stack chain/backtrace) recording 97367b3152SStanislav Fomichev 98f48e00ceSStanislav FomichevEXAMPLES 99f48e00ceSStanislav Fomichev-------- 100f48e00ceSStanislav Fomichev 101f48e00ceSStanislav Fomichev$ perf timechart record git pull 102f48e00ceSStanislav Fomichev 103f48e00ceSStanislav Fomichev [ perf record: Woken up 13 times to write data ] 104f48e00ceSStanislav Fomichev [ perf record: Captured and wrote 4.253 MB perf.data (~185801 samples) ] 105f48e00ceSStanislav Fomichev 106f48e00ceSStanislav Fomichev$ perf timechart 107f48e00ceSStanislav Fomichev 108f48e00ceSStanislav Fomichev Written 10.2 seconds of trace to output.svg. 109f48e00ceSStanislav Fomichev 110f48e00ceSStanislav FomichevRecord system-wide timechart: 111f48e00ceSStanislav Fomichev 112f48e00ceSStanislav Fomichev $ perf timechart record 113f48e00ceSStanislav Fomichev 114f48e00ceSStanislav Fomichev then generate timechart and highlight 'gcc' tasks: 115f48e00ceSStanislav Fomichev 116f48e00ceSStanislav Fomichev $ perf timechart --highlight gcc 117f48e00ceSStanislav Fomichev 118b97b59b9SStanislav FomichevRecord system-wide IO events: 119b97b59b9SStanislav Fomichev 120b97b59b9SStanislav Fomichev $ perf timechart record -I 121b97b59b9SStanislav Fomichev 122b97b59b9SStanislav Fomichev then generate timechart: 123b97b59b9SStanislav Fomichev 124b97b59b9SStanislav Fomichev $ perf timechart 125b97b59b9SStanislav Fomichev 126151750ceSArjan van de VenSEE ALSO 127151750ceSArjan van de Ven-------- 128151750ceSArjan van de Venlinkperf:perf-record[1] 129