Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff2ebe46 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge tag 'perf-core-for-mingo' of...

Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf

 into perf/core

Pull perf/core improvements and fixes from Jiri Olsa:

  * Add IO mode into timechart command (Stanislav Fomichev)

Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents f4aa84fc d243144a
Loading
Loading
Loading
Loading
+36 −2
Original line number Original line Diff line number Diff line
@@ -15,10 +15,20 @@ DESCRIPTION
There are two variants of perf timechart:
There are two variants of perf timechart:


  'perf timechart record <command>' to record the system level events
  '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,
  '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
TIMECHART OPTIONS
-----------------
-----------------
@@ -54,6 +64,19 @@ TIMECHART OPTIONS
	duration or tasks with given name. If number is given it's interpreted
	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
	as number of nanoseconds. If non-numeric string is given it's
	interpreted as task name.
	interpreted as task name.
--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.


RECORD OPTIONS
RECORD OPTIONS
--------------
--------------
@@ -63,6 +86,9 @@ RECORD OPTIONS
-T::
-T::
--tasks-only::
--tasks-only::
        Record only tasks-related events
        Record only tasks-related events
-I::
--io-only::
        Record only io-related events
-g::
-g::
--callchain::
--callchain::
        Do call-graph (stack chain/backtrace) recording
        Do call-graph (stack chain/backtrace) recording
@@ -87,6 +113,14 @@ Record system-wide timechart:


  $ perf timechart --highlight gcc
  $ perf timechart --highlight gcc


Record system-wide IO events:

  $ perf timechart record -I

  then generate timechart:

  $ perf timechart

SEE ALSO
SEE ALSO
--------
--------
linkperf:perf-record[1]
linkperf:perf-record[1]
+674 −19

File changed.

Preview size limit exceeded, changes collapsed.

+130 −38

File changed.

Preview size limit exceeded, changes collapsed.

+5 −1
Original line number Original line Diff line number Diff line
@@ -4,6 +4,9 @@
#include <linux/types.h>
#include <linux/types.h>


extern void open_svg(const char *filename, int cpus, int rows, u64 start, u64 end);
extern void open_svg(const char *filename, int cpus, int rows, u64 start, u64 end);
extern void svg_ubox(int Yslot, u64 start, u64 end, double height, const char *type, int fd, int err, int merges);
extern void svg_lbox(int Yslot, u64 start, u64 end, double height, const char *type, int fd, int err, int merges);
extern void svg_fbox(int Yslot, u64 start, u64 end, double height, const char *type, int fd, int err, int merges);
extern void svg_box(int Yslot, u64 start, u64 end, const char *type);
extern void svg_box(int Yslot, u64 start, u64 end, const char *type);
extern void svg_blocked(int Yslot, int cpu, u64 start, u64 end, const char *backtrace);
extern void svg_blocked(int Yslot, int cpu, u64 start, u64 end, const char *backtrace);
extern void svg_running(int Yslot, int cpu, u64 start, u64 end, const char *backtrace);
extern void svg_running(int Yslot, int cpu, u64 start, u64 end, const char *backtrace);
@@ -16,7 +19,8 @@ extern void svg_cstate(int cpu, u64 start, u64 end, int type);
extern void svg_pstate(int cpu, u64 start, u64 end, u64 freq);
extern void svg_pstate(int cpu, u64 start, u64 end, u64 freq);




extern void svg_time_grid(void);
extern void svg_time_grid(double min_thickness);
extern void svg_io_legenda(void);
extern void svg_legenda(void);
extern void svg_legenda(void);
extern void svg_wakeline(u64 start, int row1, int row2, const char *backtrace);
extern void svg_wakeline(u64 start, int row1, int row2, const char *backtrace);
extern void svg_partial_wakeline(u64 start, int row1, char *desc1, int row2, char *desc2, const char *backtrace);
extern void svg_partial_wakeline(u64 start, int row1, char *desc1, int row2, char *desc2, const char *backtrace);