Files
linux/tools/perf/util
Jin Yao 8358f698ec perf stat: Fix no metric header if --per-socket and --metric-only set
We received a report that was no metric header displayed if --per-socket
and --metric-only were both set.

It's hard for script to parse the perf-stat output. This patch fixes this
issue.

Before:

  root@kbl-ppc:~# perf stat -a -M CPI --metric-only --per-socket
  ^C
   Performance counter stats for 'system wide':

  S0        8                  2.6

         2.215270071 seconds time elapsed

  root@kbl-ppc:~# perf stat -a -M CPI --metric-only --per-socket -I1000
  #           time socket cpus
       1.000411692 S0        8                  2.2
       2.001547952 S0        8                  3.4
       3.002446511 S0        8                  3.4
       4.003346157 S0        8                  4.0
       5.004245736 S0        8                  0.3

After:

  root@kbl-ppc:~# perf stat -a -M CPI --metric-only --per-socket
  ^C
   Performance counter stats for 'system wide':

                               CPI
  S0        8                  2.1

         1.813579830 seconds time elapsed

  root@kbl-ppc:~# perf stat -a -M CPI --metric-only --per-socket -I1000
  #           time socket cpus                  CPI
       1.000415122 S0        8                  3.2
       2.001630051 S0        8                  2.9
       3.002612278 S0        8                  4.3
       4.003523594 S0        8                  3.0
       5.004504256 S0        8                  3.7

Signed-off-by: Jin Yao <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2020-04-14 08:49:26 -03:00
..
2020-01-14 12:02:19 -03:00
…
2019-02-19 16:11:56 -03:00
2019-02-19 16:11:56 -03:00
2020-03-09 21:43:24 -03:00
…
…
…
…
2020-03-24 10:57:38 -03:00
2020-04-03 09:37:55 -03:00
2020-04-03 09:37:55 -03:00
2020-04-03 09:37:55 -03:00
2020-04-03 09:37:55 -03:00
2020-03-17 18:01:40 -03:00
2020-03-09 21:43:24 -03:00
…
2020-04-03 09:37:55 -03:00
2020-04-03 09:37:55 -03:00
…
…
…
…
…
…
…
2020-04-03 09:37:55 -03:00
…
…
2020-04-03 09:37:55 -03:00
2020-04-03 09:37:55 -03:00
…
…
…
…
…
…
…
…
…
…
…