]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
perf report: Drop cycles 0 for LBR print
authorJin Yao <yao.jin@linux.intel.com>
Thu, 9 Mar 2017 08:06:26 +0000 (16:06 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 28 Mar 2017 19:20:59 +0000 (16:20 -0300)
commitc1dfcfad5879df7f41c436d887aea509dadd516d
tree00c7f2d1756263f234a3b066ec1b3bbe877cf2e1
parentd451a205da29c5485ca634367154e83997571aa0
perf report: Drop cycles 0 for LBR print

For some platforms, for example Broadwell, it doesn't support cycles
for LBR. But the perf always prints cycles:0, it's not necessary.

The patch refactors the LBR info print code and drops the cycles:0.

For example: perf report --branch-history --no-children --stdio

On Broadwell:
--0.91%--__random_r random_r.c:394 (iterations:2)
          __random_r random_r.c:360 (predicted:0.0%)
          __random_r random_r.c:380 (predicted:0.0%)
          __random_r random_r.c:357

On Skylake:
--1.07%--main div.c:39 (predicted:52.4% cycles:1 iterations:17)
          main div.c:44 (predicted:52.4% cycles:1)
          main div.c:42 (cycles:2)
          compute_flag div.c:28 (cycles:2)
          compute_flag div.c:27 (cycles:1)
          rand rand.c:28 (cycles:1)
          rand rand.c:28 (cycles:1)
          __random random.c:298 (cycles:1)
          __random random.c:297 (cycles:1)
          __random random.c:295 (cycles:1)
          __random random.c:295 (cycles:1)
          __random random.c:295 (cycles:1)

Signed-off-by: Yao Jin <yao.jin@linux.intel.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@intel.com>
Link: http://lkml.kernel.org/r/1489046786-10061-1-git-send-email-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/callchain.c