perf: ftrace: Add filter support for option -F/--funcs
PATCH 1/1 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 <[email protected]>
Signed-off-by Changbin Du <[email protected]>
--- tools/perf/Documentation/perf-ftrace.txt | 3 +- tools/perf/builtin-ftrace.c | 84 ++++++++++++++++++++++-- 2 files changed, 80 insertions(+), 7 deletions(-)
tools/perf/Documentation/perf-ftrace.txt +2 -1
@@ -33,7 +33,8 @@ OPTIONS -F:: --funcs:: - List all available functions to trace. + List available functions to trace. It accepts a pattern to + only list interested functions. -p:: --pid=::
tools/perf/builtin-ftrace.c +78 -6
120 lines not on this page · raw message
Signature · 1 line
2.25.1