perf tools: Check if callchain is corrupted
authorNamhyung Kim <namhyung.kim@lge.com>
Thu, 31 May 2012 05:43:27 +0000 (14:43 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 31 May 2012 14:20:34 +0000 (11:20 -0300)
commit114067b69e7b2c691faace0e33db2f04096f668d
tree68e4e8e56fe448436a0efbdd03cd342768a32f0e
parent472606458f3e1ced5fe3cc5f04e90a6b5a4732cf
perf tools: Check if callchain is corrupted

We faced segmentation fault on perf top -G at very high sampling rate
due to a corrupted callchain. While the root cause was not revealed (I
failed to figure it out), this patch tries to protect us from the
segfault on such cases.

Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Sunjin Yang <fan4326@gmail.com>
Link: http://lkml.kernel.org/r/1338443007-24857-2-git-send-email-namhyung.kim@lge.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
include/linux/perf_event.h
tools/perf/util/session.c