perf trace: Validate syscall id before growing syscall table
authorArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 20 Oct 2012 15:39:03 +0000 (12:39 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 22 Oct 2012 01:07:36 +0000 (23:07 -0200)
commit3a531260a14631ae8d231279b8738884bf808e7b
treea44858fb4663a75dc385f899da87989952cd190f
parentef8ff74ed8dd9d4b3ba8cb9f2fc927a27c697a8b
perf trace: Validate syscall id before growing syscall table

In some cases the ID for a syscall read thru the raw_syscalls tracepoint
is bogus, still needs to be investigated why, but to make the tool more
robust first try to resolve the ID to a name via libaudit and if it
fails, don't grow the table.

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-0lsokw3xor7c4ijo45u6bauh@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-trace.c