linux-stable/tools
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
..
accounting
arch tools headers: Sync {tools/,}arch/powerpc/include/uapi/asm/kvm.h 2017-03-20 15:02:29 -03:00
build tools build: Use the same CC for feature detection and actual build 2017-03-03 19:07:19 -03:00
cgroup
firewire
gpio
hv
iio
include tools include: Sync {,tools/}include/uapi/linux/perf_event.h 2017-03-17 11:49:09 -03:00
kvm/kvm_stat
laptop
leds tools/leds: Add led_hw_brightness_mon program 2017-02-14 22:20:23 +01:00
lguest scripts/spelling.txt: add "overide" pattern and fix typo instances 2017-03-09 17:01:09 -08:00
lib tools lib api fs: Introduce sysfs__read_bool 2017-03-17 11:49:09 -03:00
net
nfsd
objtool objtool: Fix another GCC jump table detection issue 2017-03-07 08:42:55 +01:00
pcmcia
perf perf report: Drop cycles 0 for LBR print 2017-03-28 16:20:59 -03:00
power Power management turbostat utility updates for v4.11-rc1 2017-03-02 17:41:27 -08:00
scripts tools arch x86: Include asm/cmpxchg.h 2017-03-03 19:07:13 -03:00
spi
testing Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-03-14 21:31:23 -07:00
thermal/tmon
time
usb
virtio
vm tools/vm: add missing Makefile rules 2017-02-22 16:41:26 -08:00
Makefile