perf probe: Check kprobes blacklist when adding new events
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Thu, 19 Feb 2015 14:31:13 +0000 (23:31 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 26 Feb 2015 14:59:05 +0000 (11:59 -0300)
commit9aaf5a5f479bd68699f2e6f6e5e5f1253377b6da
tree548ac87f0586060af74996e73332dcf3350b541a
parent55d43bcafe78b6da33f8a49be68ef168f3cbfec9
perf probe: Check kprobes blacklist when adding new events

Recent linux kernel provides a blacklist of the functions which can not
be probed. perf probe can now check this blacklist before setting new
events and indicate better error message for users.

Without this patch,
  ----
  # perf probe --add vmalloc_fault
  Added new event:
  Failed to write event: Invalid argument
    Error: Failed to add events.
  ----
With this patch
  ----
  # perf probe --add vmalloc_fault
  Added new event:
  Warning: Skipped probing on blacklisted function: vmalloc_fault
  ----

Reported-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20150219143113.14434.5387.stgit@localhost.localdomain
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/probe-event.c