perf list: Add metrics to command line usage
authorIan Rogers <irogers@google.com>
Fri, 22 May 2020 06:45:46 +0000 (23:45 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 28 May 2020 13:03:28 +0000 (10:03 -0300)
Before:

 Usage: perf list [<options>] [hw|sw|cache|tracepoint|pmu|sdt|event_glob]

After:

 Usage: perf list [<options>] [hw|sw|cache|tracepoint|pmu|sdt|metric|metricgroup|event_glob]

Committer testing:

Before and after we get these outputs on a Lenovo t480s (i7-8650U):

  # perf list metricgroup

  List of pre-defined events (to be used in -e):

  Metric Groups:

  BrMispredicts
  BrMispredicts_SMT
  Branches
  Cache_Misses
  DSB
  FLOPS
  FLOPS_SMT
  Fetch_BW
  IcMiss
  Instruction_Type
  Memory_BW
  Memory_Bound
  Memory_Lat
  No_group
  PGO
  Pipeline
  Power
  Retire
  SMT
  Summary
  TLB
  TLB_SMT
  TopDownL1
  TopDownL1_SMT
  TopdownL1
  TopdownL1_SMT
  #

  # perf list metric | head -11

  Metrics:

    Backend_Bound
         [This category represents fraction of slots where no uops are being delivered due to a lack of required resources for accepting new uops in the Backend]
    Backend_Bound_SMT
         [This category represents fraction of slots where no uops are being delivered due to a lack of required resources for accepting new uops in the Backend. SMT version; use when SMT is enabled and measuring per logical CPU]
    Bad_Speculation
         [This category represents fraction of slots wasted due to incorrect speculations]
    Bad_Speculation_SMT
         [This category represents fraction of slots wasted due to incorrect speculations. SMT version; use when SMT is enabled and measuring per logical CPU]
  #

Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20200522064546.164259-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-list.c

index 965ef01..0a7fe4c 100644 (file)
@@ -42,7 +42,7 @@ int cmd_list(int argc, const char **argv)
                OPT_END()
        };
        const char * const list_usage[] = {
-               "perf list [<options>] [hw|sw|cache|tracepoint|pmu|sdt|event_glob]",
+               "perf list [<options>] [hw|sw|cache|tracepoint|pmu|sdt|metric|metricgroup|event_glob]",
                NULL
        };