perf tools: Fix segfault in cumulative.callchain report
authorJiri Olsa <jolsa@kernel.org>
Sun, 15 Jun 2014 08:22:15 +0000 (10:22 +0200)
committerJiri Olsa <jolsa@kernel.org>
Fri, 20 Jun 2014 07:34:18 +0000 (09:34 +0200)
commitd755330c5e0658d8056242b5b81e2f44ed7a96d8
tree91189b0a8953822941cdcaee88751e4e74e9da65
parentcf230918cda19532e4a5cc4f0d5c82fa7e5e94f6
perf tools: Fix segfault in cumulative.callchain report

When cumulative callchain mode is on, we could get samples with
with no actual hits. This breaks the assumption of the annotation
code, that each sample has annotation counts allocated and leads
to segfault.

Fixing this by additional checks for annotation stats.

Acked-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1402821332-12419-1-git-send-email-jolsa@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
tools/perf/ui/browsers/hists.c