perf: ftrace: Add filter support for option -F/--funcs
authorChangbin Du <changbin.du@gmail.com>
Fri, 4 Sep 2020 15:23:57 +0000 (23:23 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 4 Sep 2020 19:11:16 +0000 (16:11 -0300)
commit2ae05fe0a9dfe204a6c83bbe6bd1312b3bb3d301
treeafe9638c7a1bbf0910c6c58ab8ee705d184d1da0
parentee7fe31e6e264d748bec5378c4d5417e14019666
perf: ftrace: Add filter support for option -F/--funcs

Same as 'perf probe -F', this patch adds filter support for the ftrace
subcommand option '-F, --funcs <[FILTER]>'.

Here is an example that only lists functions which start with 'vfs_':

  $ sudo perf ftrace -F vfs_*
  vfs_fadvise
  vfs_fallocate
  vfs_truncate
  vfs_open
  vfs_setpos
  vfs_llseek
  vfs_readf
  vfs_writef
  ...

Suggested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Changbin Du <changbin.du@gmail.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20200904152357.6053-1-changbin.du@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/perf-ftrace.txt
tools/perf/builtin-ftrace.c