Jin Yao c1dfcfad58 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>
2017-03-28 16:20:59 -03:00
..
2016-06-28 10:54:56 -03:00
2016-07-12 15:19:47 -03:00
2017-02-20 11:16:32 -03:00
2017-02-20 11:16:32 -03:00
2015-08-21 11:34:10 -03:00
2016-10-24 11:07:40 -03:00
2016-10-24 11:07:39 -03:00
2017-03-21 10:34:59 -03:00
2015-05-05 18:13:22 -03:00
2015-05-05 18:13:22 -03:00
2016-07-12 15:19:55 -03:00
2017-02-20 11:35:54 -03:00
2016-07-12 15:19:55 -03:00
2016-10-03 11:24:13 -03:00
2017-02-08 17:31:10 -03:00
2016-08-23 15:37:33 -03:00
2016-04-28 09:58:58 -03:00
2016-03-23 12:32:31 -03:00
2015-05-29 12:43:44 -03:00