linux/tools/perf/util
Masami Hiramatsu 6dbe31f7ba perf probe: Remove all probes matches given pattern at once
Fix perf-probe --del option to delete all matched probes in both
of kprobes and uprobes at once.

When we have 2 or more events on different binaries as below,

  ----
  # ./perf probe -l
  probe:vfs_read       (on vfs_read@ksrc/linux-3/fs/read_write.c)
  probe_libc:malloc    (on __libc_malloc@malloc/malloc.c in /usr/lib64/libc-2.17
  ----

Trying to remove all event with '*' just removes kprobe events at first.
  ----
  # ./perf probe -d \*
  Removed event: probe:vfs_read
  ----

And in 2nd try, it removes all uprobe events.
  ----
  # ./perf probe -d \*
  Removed event: probe_libc:malloc
  ----

This fixes to remove all event at once as below.
  ----
  # ./perf probe -d \*
  Removed event: probe:vfs_read
  Removed event: probe_libc:malloc
  ----

Reported-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20150423134614.26128.18106.stgit@localhost.localdomain
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-04-29 10:38:03 -03:00
..
include
scripting-engines perf db-export: No need to have ->thread twice in struct export_sample 2015-04-02 13:18:43 -03:00
abspath.c
alias.c
annotate.c Merge branch 'perf/urgent' into perf/core, to pick up fixes and to refresh the tree 2015-03-27 09:46:03 +01:00
annotate.h
auxtrace.c perf auxtrace: Add a hashtable for caching 2015-04-29 10:37:55 -03:00
auxtrace.h perf auxtrace: Add a hashtable for caching 2015-04-29 10:37:55 -03:00
bitmap.c
Build perf evlist: Add support for mmapping an AUX area buffer 2015-04-29 10:37:50 -03:00
build-id.c perf buildid-list: Fix segfault when show DSOs with hits 2015-04-10 10:13:59 -03:00
build-id.h
cache.h
callchain.c
callchain.h
cgroup.c
cgroup.h
cloexec.c perf tools: Work around lack of sched_getcpu in glibc < 2.6. 2015-03-24 12:08:07 -03:00
cloexec.h perf tools: Work around lack of sched_getcpu in glibc < 2.6. 2015-03-24 12:08:07 -03:00
color.c
color.h
comm.c
comm.h
config.c
cpumap.c
cpumap.h
ctype.c
data-convert-bt.c perf data: Fix signedness of value 2015-04-29 10:37:49 -03:00
data-convert-bt.h perf data: Support using -f to override perf.data file ownership for 'convert' 2015-04-02 13:18:52 -03:00
data.c
data.h
db-export.c perf db-export: No need to have ->thread twice in struct export_sample 2015-04-02 13:18:43 -03:00
db-export.h perf db-export: No need to have ->thread twice in struct export_sample 2015-04-02 13:18:43 -03:00
debug.c
debug.h
dso.c perf tools: Add member to struct dso for an instruction cache 2015-04-29 10:37:56 -03:00
dso.h perf tools: Add member to struct dso for an instruction cache 2015-04-29 10:37:56 -03:00
dwarf-aux.c perf probe: Fix to track down unnamed union/structure members 2015-04-02 13:18:44 -03:00
dwarf-aux.h
environment.c
event.c perf tools: Add a user event for AUX area tracing errors 2015-04-29 10:37:52 -03:00
event.h perf script: Add field option 'flags' to print sample flags 2015-04-29 10:37:57 -03:00
evlist.c perf record: Extend -m option for AUX area tracing mmap pages 2015-04-29 10:37:52 -03:00
evlist.h perf record: Extend -m option for AUX area tracing mmap pages 2015-04-29 10:37:52 -03:00
evsel.c perf tools: Add aux_watermark member of struct perf_event_attr 2015-04-29 10:37:58 -03:00
evsel.h perf tools: Merge all perf_event_attr print functions 2015-04-08 10:06:28 -03:00
exec_cmd.c
exec_cmd.h
find-vdso-map.c
generate-cmdlist.sh
header.c perf header: Add AUX area tracing feature 2015-04-29 10:37:49 -03:00
header.h perf header: Add AUX area tracing feature 2015-04-29 10:37:49 -03:00
help.c
help.h
hist.c
hist.h
intlist.c
intlist.h
kvm-stat.h perf kvm: Support using -f to override perf.data.guest file ownership 2015-04-02 13:18:47 -03:00
levenshtein.c
levenshtein.h
lzma.c perf tools: Add lzma decompression support for kernel module 2015-03-21 14:53:40 -03:00
machine.c perf buildid-list: Fix segfault when show DSOs with hits 2015-04-10 10:13:59 -03:00
machine.h perf buildid-list: Fix segfault when show DSOs with hits 2015-04-10 10:13:59 -03:00
map.c perf kmaps: Check kmaps to make code more robust 2015-04-08 09:07:03 -03:00
map.h perf kmaps: Check kmaps to make code more robust 2015-04-08 09:07:03 -03:00
ordered-events.c perf ordered_samples: Remove references to perf_{evlist,tool} and machines 2015-03-31 17:52:32 -03:00
ordered-events.h perf ordered_samples: Remove references to perf_{evlist,tool} and machines 2015-03-31 17:52:32 -03:00
pager.c
parse-events.c perf tools: Add symbolic events support for parse_events_error 2015-04-29 10:38:02 -03:00
parse-events.h perf tools: Add symbolic events support for parse_events_error 2015-04-29 10:38:02 -03:00
parse-events.l perf tools: Add term support for parse_events_error 2015-04-29 10:38:01 -03:00
parse-events.y perf tools: Add symbolic events support for parse_events_error 2015-04-29 10:38:02 -03:00
parse-options.c
parse-options.h
path.c
PERF-VERSION-GEN
perf_regs.c
perf_regs.h
pmu.c perf tools: Add term support for parse_events_error 2015-04-29 10:38:01 -03:00
pmu.h perf tools: Add term support for parse_events_error 2015-04-29 10:38:01 -03:00
pmu.l
pmu.y
probe-event.c perf probe: Remove all probes matches given pattern at once 2015-04-29 10:38:03 -03:00
probe-event.h perf probe: Support multiple probes on different binaries 2015-04-10 10:19:53 -03:00
probe-finder.c perf probe: Fix segfault when probe with lazy_line to file 2015-04-13 20:12:21 -03:00
probe-finder.h perf probe: Find compilation directory path for lazy matching 2015-04-13 20:11:05 -03:00
pstack.c
pstack.h
python-ext-sources
python.c
quote.c
quote.h
rblist.c
rblist.h
record.c perf tools: Add parse_events_error interface 2015-04-29 10:37:58 -03:00
run-command.c
run-command.h
session.c perf tools: Add aux_watermark member of struct perf_event_attr 2015-04-29 10:37:58 -03:00
session.h perf session: Add instruction tracing options 2015-04-29 10:37:53 -03:00
setup.py
sigchain.c
sigchain.h
sort.c
sort.h perf diff: Make hist_entry_diff fields union 2015-04-29 10:37:44 -03:00
srcline.c
stat.c
stat.h
strbuf.c
strbuf.h
strfilter.c
strfilter.h
string.c
strlist.c
strlist.h
svghelper.c
svghelper.h
symbol-elf.c perf kmaps: Check kmaps to make code more robust 2015-04-08 09:07:03 -03:00
symbol-minimal.c perf symbols: Save DSO loading errno to better report errors 2015-03-24 12:08:43 -03:00
symbol.c perf kmaps: Check kmaps to make code more robust 2015-04-08 09:07:03 -03:00
symbol.h perf tools: Add pid/tid filtering to report and script commands 2015-03-24 13:02:46 -03:00
target.c perf target: Simplify handling of strerror_r return 2015-03-24 12:08:30 -03:00
target.h
thread-stack.c
thread-stack.h
thread.c
thread.h perf tools: Add pid/tid filtering to report and script commands 2015-03-24 13:02:46 -03:00
thread_map.c
thread_map.h
tool.h perf tools: Add a user event for AUX area tracing errors 2015-04-29 10:37:52 -03:00
top.c
top.h
trace-event-info.c
trace-event-parse.c
trace-event-read.c
trace-event-scripting.c perf scripting: No need to pass thread twice to the scripting callbacks 2015-04-02 13:18:41 -03:00
trace-event.c
trace-event.h perf scripting: No need to pass thread twice to the scripting callbacks 2015-04-02 13:18:41 -03:00
tsc.c
tsc.h
unwind-libdw.c
unwind-libdw.h
unwind-libunwind.c
unwind.h
usage.c
util.c
util.h perf tools: Add lzma decompression support for kernel module 2015-03-21 14:53:40 -03:00
values.c
values.h
vdso.c
vdso.h
wrapper.c
xyarray.c
xyarray.h
zlib.c