]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit7f026020a41383c3d4d3f726c63249e69ed9d8fe
tree548ac87f0586060af74996e73332dcf3350b541a
parent9ec9c6ed571953598ce882fd8ee48a8530c5481d
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