]> git.baikalelectronics.ru Git - kernel.git/commit
perf stat: Add support for metrics in interval mode
authorAndi Kleen <ak@linux.intel.com>
Sat, 30 Jan 2016 17:06:50 +0000 (09:06 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 16 Feb 2016 20:13:01 +0000 (17:13 -0300)
commit07e78f849432a4b559fad8ebb2b411c3f3299520
tree038a611fcfbe5d13dfdb6065725077b208056d88
parentf47838a3349ddc2beef1a6134a24680a75cee479
perf stat: Add support for metrics in interval mode

Now that we can modify the metrics printout functions easily, it's
straight forward to support metric printing for interval mode.  All that
is needed is to print the time stamp on every new line.  Pass the prefix
into the context and print it out.

v2: Move wrong hunk to here.

Committer note:

Before:

  [root@jouet ~]# perf stat -I 1000 -e instructions,cycles sleep 1
  #           time    counts unit events
       1.000168216   538,913      instructions
       1.000168216   748,765      cycles
       1.000660048   153,741      instructions
       1.000660048   214,066      cycles

After:

  # perf stat -I 1000 -e instructions,cycles sleep 1
  #           time    counts unit events
       1.000215928   519,620      instructions              #    0.69  insn per cycle
       1.000215928   752,003      cycles
       1.000946033   148,502      instructions              #    0.33  insn per cycle
       1.000946033   160,104      cycles

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1454173616-17710-3-git-send-email-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-stat.c