]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf tools: Add mode argument to sort_help()
authorNamhyung Kim <namhyung@kernel.org>
Wed, 31 Jul 2024 23:55:03 +0000 (16:55 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 1 Aug 2024 21:55:55 +0000 (18:55 -0300)
commit871893d748cce346097d907b9937604af3dafcf1
tree2cf28b5e00fbc7f62f67e1ce0273f58fc6c2efdf
parent35b38a71c92fa033aa6c8d681ee827e215254964
perf tools: Add mode argument to sort_help()

Some sort keys are meaningful only in a specific mode - like branch
stack and memory (data-src).  Add the mode to skip unnecessary ones.
This will be used for 'perf mem report' later.

While at it, change the prefix for the -F/--fields option to remove
the duplicate part.

Before:

  $ perf report -F
   Error: switch `F' requires a value
   Usage: perf report [<options>]

      -F, --fields <key[,keys...]>
     output field(s): overhead period sample  overhead overhead_sys
     overhead_us overhead_guest_sys overhead_guest_us overhead_children
     sample period weight1 weight2 weight3 ins_lat retire_lat
     ...
After:

  $ perf report -F
   Error: switch `F' requires a value
   Usage: perf report [<options>]

      -F, --fields <key[,keys...]>
     output field(s): overhead overhead_sys overhead_us
     overhead_guest_sys overhead_guest_us overhead_children
     sample period weight1 weight2 weight3 ins_lat retire_lat
     ...

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: https://lore.kernel.org/r/20240731235505.710436-5-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-report.c
tools/perf/util/sort.c
tools/perf/util/sort.h