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

Commit a2ce067e authored by Namhyung Kim's avatar Namhyung Kim Committed by Jiri Olsa
Browse files

perf tools: Allow hpp fields to be sort keys



Add overhead{,_sys,_us,_guest_sys,_guest_us}, sample and period sort
keys so that they can be selected with --sort/-s option.

  $ perf report -s period,comm --stdio
  ...
  # Overhead        Period          Command
  # ........  ............  ...............
  #
      47.06%           152          swapper
      13.93%            45  qemu-system-arm
      12.38%            40         synergys
       3.72%            12          firefox
       2.48%             8            xchat

Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Acked-by: default avatarIngo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/r/1400480762-22852-9-git-send-email-namhyung@kernel.org


Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
parent fb821c9e
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -50,7 +50,8 @@ OPTIONS

-s::
--sort=::
	Sort by key(s): pid, comm, dso, symbol.
	Sort by key(s): pid, comm, dso, symbol, cpu, parent, srcline.
	Please see description of --sort in the perf-report man page.

-t::
--field-separator=::
@@ -202,4 +203,4 @@ If specified the 'Weighted diff' column is displayed with value 'd' computed as:

SEE ALSO
--------
linkperf:perf-record[1]
linkperf:perf-record[1], linkperf:perf-report[1]
+9 −0
Original line number Diff line number Diff line
@@ -79,6 +79,15 @@ OPTIONS
	abort cost. This is the global weight.
	- local_weight: Local weight version of the weight above.
	- transaction: Transaction abort flags.
	- overhead: Overhead percentage of sample
	- overhead_sys: Overhead percentage of sample running in system mode
	- overhead_us: Overhead percentage of sample running in user mode
	- overhead_guest_sys: Overhead percentage of sample running in system mode
	on guest machine
	- overhead_guest_us: Overhead percentage of sample running in user mode on
	guest machine
	- sample: Number of sample
	- period: Raw number of event count of sample

	By default, comm, dso and symbol keys are used.
	(i.e. --sort comm,dso,symbol)
+3 −2
Original line number Diff line number Diff line
@@ -113,7 +113,8 @@ Default is to monitor all CPUS.
-s::
--sort::
	Sort by key(s): pid, comm, dso, symbol, parent, srcline, weight,
	local_weight, abort, in_tx, transaction
	local_weight, abort, in_tx, transaction, overhead, sample, period.
	Please see description of --sort in the perf-report man page.

-n::
--show-nr-samples::
@@ -212,4 +213,4 @@ Pressing any unmapped key displays a menu, and prompts for input.

SEE ALSO
--------
linkperf:perf-stat[1], linkperf:perf-list[1]
linkperf:perf-stat[1], linkperf:perf-list[1], linkperf:perf-report[1]
+2 −1
Original line number Diff line number Diff line
@@ -741,7 +741,8 @@ static const struct option options[] = {
	OPT_STRING('S', "symbols", &symbol_conf.sym_list_str, "symbol[,symbol...]",
		   "only consider these symbols"),
	OPT_STRING('s', "sort", &sort_order, "key[,key2...]",
		   "sort by key(s): pid, comm, dso, symbol, parent"),
		   "sort by key(s): pid, comm, dso, symbol, parent, cpu, srcline, ..."
		   " Please refer the man page for the complete list."),
	OPT_STRING('t', "field-separator", &symbol_conf.field_sep, "separator",
		   "separator for columns, no spaces will be added between "
		   "columns '.' is reserved."),
+2 −4
Original line number Diff line number Diff line
@@ -699,10 +699,8 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
	OPT_BOOLEAN(0, "header-only", &report.header_only,
		    "Show only data header."),
	OPT_STRING('s', "sort", &sort_order, "key[,key2...]",
		   "sort by key(s): pid, comm, dso, symbol, parent, cpu, srcline,"
		   " dso_to, dso_from, symbol_to, symbol_from, mispredict,"
		   " weight, local_weight, mem, symbol_daddr, dso_daddr, tlb, "
		   "snoop, locked, abort, in_tx, transaction"),
		   "sort by key(s): pid, comm, dso, symbol, parent, cpu, srcline, ..."
		   " Please refer the man page for the complete list."),
	OPT_BOOLEAN(0, "showcpuutilization", &symbol_conf.show_cpu_utilization,
		    "Show sample percentage for different cpu modes"),
	OPT_STRING('p', "parent", &parent_pattern, "regex",
Loading