Skip to content

Commit

Permalink
perf timechart: Implement IO mode
Browse files Browse the repository at this point in the history
Currently, timechart records only scheduler and CPU events (task switches,
running times, CPU power states, etc); this commit adds IO mode which
makes it possible to record IO (disk, network) activity. In this mode
perf timechart will generate SVG with IO charts (writes, reads, tx, rx, polls).

Signed-off-by: Stanislav Fomichev <[email protected]>
Acked-by: Namhyung Kim <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Jiri Olsa <[email protected]>
  • Loading branch information
Stanislav Fomichev authored and olsajiri committed Jul 9, 2014
1 parent f8dda74 commit b97b59b
Show file tree
Hide file tree
Showing 4 changed files with 725 additions and 24 deletions.
25 changes: 23 additions & 2 deletions tools/perf/Documentation/perf-timechart.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,20 @@ DESCRIPTION
There are two variants of perf timechart:

'perf timechart record <command>' to record the system level events
of an arbitrary workload.
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.

'perf timechart' to turn a trace into a Scalable Vector Graphics file,
that can be viewed with popular SVG viewers such as 'Inkscape'.
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.

TIMECHART OPTIONS
-----------------
Expand Down Expand Up @@ -63,6 +73,9 @@ RECORD OPTIONS
-T::
--tasks-only::
Record only tasks-related events
-I::
--io-only::
Record only io-related events
-g::
--callchain::
Do call-graph (stack chain/backtrace) recording
Expand All @@ -87,6 +100,14 @@ Record system-wide timechart:

$ perf timechart --highlight gcc

Record system-wide IO events:

$ perf timechart record -I

then generate timechart:

$ perf timechart

SEE ALSO
--------
linkperf:perf-record[1]
Loading

0 comments on commit b97b59b

Please sign in to comment.