perf probe: Allow to use filter on --del command
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Tue, 5 May 2015 02:29:48 +0000 (11:29 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 5 May 2015 21:13:02 +0000 (18:13 -0300)
commit307a464b2342a502da492f0ada8cefd6ab7f63a7
tree318a2eda0b78732cf4219c3a5bead24a3eee940a
parent2dd6d8a10a942c5fd8950d1046e172237d009c8e
perf probe: Allow to use filter on --del command

This makes perf-probe --del option to accept filter rules
not only simple glob pattern. This simplifies the code and
improve the flexibility.

E.g. if we remove 2 different pattern events, we need 2
     -d options.
  ----
  # ./perf probe -d vfs\* -d malloc
  Removed event: probe_libc:malloc
  Removed event: probe:vfs_read
  ----

  This allows you to joint the 2 patterns with '|'.

  ----
  # ./perf probe -d 'vfs*|malloc'
  Removed event: probe:vfs_read
  Removed event: probe_libc:malloc
  ----

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/20150505022948.23399.4197.stgit@localhost.localdomain
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-probe.c
tools/perf/util/probe-event.c
tools/perf/util/probe-event.h