Skip to contentSkip to conversation

perf: ftrace: Add filter support for option -F/--funcs

PATCH Superseded Changbin Du 1 participant 1 message Aug 23, 2020 perf events

lore
Share & tools
lore
#0 lore raw

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
...
---
 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
index 78358af9a1c4..1e91121bac0f 100644
@@ -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