From: Masami Hiramatsu Date: Wed, 13 Aug 2014 16:12:50 +0000 (+0000) Subject: perf probe: Fix --del option to delete events only with uprobe events X-Git-Tag: fixes-against-v3.18-rc2~100^2~29^2~33 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=467ec08567483e3868f240b1ee03808970e06388;p=pandora-kernel.git perf probe: Fix --del option to delete events only with uprobe events Current perf probe --del doesn't work if only CONFIG_UPROBE_EVENTS=y because it aborts when it fails to open kprobe_events file before checking uprobe_events file. This fixes --del option to delete dynamic events if it can open either kprobe_events or uprobe_events. Only if it failed to open both of them, it shows an error message and aborts. Without this patch, if we run perf probe -d on the kernel configured with CONFIG_KPROBE_EVENTS=n and CONFIG_UPROBE_EVENTS=y, # perf probe -d \* kprobe_events file does not exist - please rebuild kernel with CONFIG_KPROBE_EVENTS. Error: Failed to delete events. With this patch, # perf probe -d \* Removed event: probe_perf:alloc_event Changes in v2: - Use strerror_r instead of strerror. Signed-off-by: Masami Hiramatsu Cc: Ingo Molnar Cc: Naohiro Aota Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20140813161250.26440.24028.stgit@kbuild-fedora.novalocal Signed-off-by: Arnaldo Carvalho de Melo --- Reading git-diff-tree failed