]> git.baikalelectronics.ru Git - kernel.git/commit
perf trace: Check if sample raw_data field is set
authorArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 20 Oct 2012 16:08:46 +0000 (13:08 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 22 Oct 2012 01:07:36 +0000 (23:07 -0200)
commita0bfbf2c90911273eb328440ac984d8f62625912
tree87aaf6b20a79fb2b87e5e7bac2f138f9a7738444
parentd02a2960e784b765aad04a010fac8cea60e20a54
perf trace: Check if sample raw_data field is set

Sometimes we're segfaulting because we were expecting that the
perf_sample.raw_data field was set as requested, but in some cases
that needs further investigation, that field can be NULL, leading
to segfaults.

Make the tool more robust by checking that before calling any per event
handlers that may try to use that field.

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-g1fmodl6ys4lq8honbj1igoi@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-trace.c