2009-09-19 19:36:04 +08:00
|
|
|
perf-timechart(1)
|
|
|
|
=================
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
|
|
|
perf-timechart - Tool to visualize total system behavior during a workload
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
|
|
|
[verse]
|
2013-11-02 00:25:50 +08:00
|
|
|
'perf timechart' [<timechart options>] {record} [<record options>]
|
2009-09-19 19:36:04 +08:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
|
|
|
There are two variants of perf timechart:
|
|
|
|
|
|
|
|
'perf timechart record <command>' to record the system level events
|
2014-07-09 00:03:41 +08:00
|
|
|
of an arbitrary workload. By default timechart records only scheduler
|
|
|
|
and CPU events (task switches, running times, CPU power states, etc),
|
|
|
|
but it's possible to record IO (disk, network) activity using -I argument.
|
2009-09-19 19:36:04 +08:00
|
|
|
|
|
|
|
'perf timechart' to turn a trace into a Scalable Vector Graphics file,
|
2014-07-09 00:03:41 +08:00
|
|
|
that can be viewed with popular SVG viewers such as 'Inkscape'. Depending
|
|
|
|
on the events in the perf.data file, timechart will contain scheduler/cpu
|
|
|
|
events or IO events.
|
|
|
|
|
|
|
|
In IO mode, every bar has two charts: upper and lower.
|
|
|
|
Upper bar shows incoming events (disk reads, ingress network packets).
|
|
|
|
Lower bar shows outgoing events (disk writes, egress network packets).
|
|
|
|
There are also poll bars which show how much time application spent
|
|
|
|
in poll/epoll/select syscalls.
|
2009-09-19 19:36:04 +08:00
|
|
|
|
2013-11-02 00:25:50 +08:00
|
|
|
TIMECHART OPTIONS
|
|
|
|
-----------------
|
2009-09-19 19:36:04 +08:00
|
|
|
-o::
|
|
|
|
--output=::
|
|
|
|
Select the output file (default: output.svg)
|
|
|
|
-i::
|
|
|
|
--input=::
|
2011-12-07 17:02:54 +08:00
|
|
|
Select the input file (default: perf.data unless stdin is a fifo)
|
2009-09-21 00:14:16 +08:00
|
|
|
-w::
|
|
|
|
--width=::
|
|
|
|
Select the width of the SVG file (default: 1000)
|
2009-10-20 06:09:39 +08:00
|
|
|
-P::
|
2009-09-24 21:40:13 +08:00
|
|
|
--power-only::
|
|
|
|
Only output the CPU power section of the diagram
|
2013-11-02 00:25:48 +08:00
|
|
|
-T::
|
|
|
|
--tasks-only::
|
|
|
|
Don't output processor state transitions
|
2009-10-20 06:09:39 +08:00
|
|
|
-p::
|
|
|
|
--process::
|
|
|
|
Select the processes to display, by name or PID
|
2009-09-19 19:36:04 +08:00
|
|
|
|
2010-12-10 04:27:07 +08:00
|
|
|
--symfs=<directory>::
|
|
|
|
Look for files with symbols relative to this directory.
|
2013-11-02 00:25:46 +08:00
|
|
|
-n::
|
|
|
|
--proc-num::
|
|
|
|
Print task info for at least given number of tasks.
|
2013-12-02 22:37:36 +08:00
|
|
|
-t::
|
|
|
|
--topology::
|
|
|
|
Sort CPUs according to topology.
|
2013-12-17 23:53:49 +08:00
|
|
|
--highlight=<duration_nsecs|task_name>::
|
|
|
|
Highlight tasks (using different color) that run more than given
|
|
|
|
duration or tasks with given name. If number is given it's interpreted
|
|
|
|
as number of nanoseconds. If non-numeric string is given it's
|
|
|
|
interpreted as task name.
|
2014-07-09 00:03:43 +08:00
|
|
|
--io-skip-eagain::
|
|
|
|
Don't draw EAGAIN IO events.
|
|
|
|
--io-min-time=<nsecs>::
|
|
|
|
Draw small events as if they lasted min-time. Useful when you need
|
|
|
|
to see very small and fast IO. It's possible to specify ms or us
|
|
|
|
suffix to specify time in milliseconds or microseconds.
|
|
|
|
Default value is 1ms.
|
|
|
|
--io-merge-dist=<nsecs>::
|
|
|
|
Merge events that are merge-dist nanoseconds apart.
|
|
|
|
Reduces number of figures on the SVG and makes it more render-friendly.
|
|
|
|
It's possible to specify ms or us suffix to specify time in
|
|
|
|
milliseconds or microseconds.
|
|
|
|
Default value is 1us.
|
2013-11-02 00:25:46 +08:00
|
|
|
|
2013-11-02 00:25:50 +08:00
|
|
|
RECORD OPTIONS
|
|
|
|
--------------
|
|
|
|
-P::
|
|
|
|
--power-only::
|
|
|
|
Record only power-related events
|
|
|
|
-T::
|
|
|
|
--tasks-only::
|
|
|
|
Record only tasks-related events
|
2014-07-09 00:03:41 +08:00
|
|
|
-I::
|
|
|
|
--io-only::
|
|
|
|
Record only io-related events
|
2013-11-02 00:25:51 +08:00
|
|
|
-g::
|
|
|
|
--callchain::
|
|
|
|
Do call-graph (stack chain/backtrace) recording
|
2013-11-02 00:25:50 +08:00
|
|
|
|
2014-06-10 17:52:16 +08:00
|
|
|
EXAMPLES
|
|
|
|
--------
|
|
|
|
|
|
|
|
$ perf timechart record git pull
|
|
|
|
|
|
|
|
[ perf record: Woken up 13 times to write data ]
|
|
|
|
[ perf record: Captured and wrote 4.253 MB perf.data (~185801 samples) ]
|
|
|
|
|
|
|
|
$ perf timechart
|
|
|
|
|
|
|
|
Written 10.2 seconds of trace to output.svg.
|
|
|
|
|
|
|
|
Record system-wide timechart:
|
|
|
|
|
|
|
|
$ perf timechart record
|
|
|
|
|
|
|
|
then generate timechart and highlight 'gcc' tasks:
|
|
|
|
|
|
|
|
$ perf timechart --highlight gcc
|
|
|
|
|
2014-07-09 00:03:41 +08:00
|
|
|
Record system-wide IO events:
|
|
|
|
|
|
|
|
$ perf timechart record -I
|
|
|
|
|
|
|
|
then generate timechart:
|
|
|
|
|
|
|
|
$ perf timechart
|
|
|
|
|
2009-09-19 19:36:04 +08:00
|
|
|
SEE ALSO
|
|
|
|
--------
|
|
|
|
linkperf:perf-record[1]
|