Skip to contentSkip to conversation

trace-cmd record: Use tracefs_filter_function() for function filtering

PATCH New Steven Rostedt 1 participant 1 message Apr 8, 2021 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trace-cmd record: Use tracefs_filter_function() for function filtering

From: "Steven Rostedt (VMware)" <[email protected]>

By having the implementation for -l and -n use tracefs_function_filter() and tracefs_function_notrace() it extends the filtering capability to use full regex expressions.

---
 .../trace-cmd/trace-cmd-record.1.txt          |  9 +--
 tracecmd/trace-record.c                       | 58 ++++++++++++++++++-
 2 files changed, 60 insertions(+), 7 deletions(-)
Documentation/trace-cmd/trace-cmd-record.1.txt +5 -4
index d992002e..55a8891b 100644
@@ -134,10 +134,11 @@ OPTIONS
 *-l* 'function-name'::
     This will limit the 'function' and 'function_graph' tracers to only trace
     the given function name. More than one *-l* may be specified on the
-    command line to trace more than one function. The limited use of glob
-    expressions are also allowed. These are 'match\*' to only filter functions
-    that start with 'match'. '\*match' to only filter functions that end with
-    'match'. '\*match\*' to only filter on functions that contain 'match'.
+    command line to trace more than one function. This supports both full
+    regex(3) parsing, or basic glob parsing. If the filter has only alphanumeric,
+    '_', '*', '?' and '.' characters, then it will be parsed as a basic glob.
+    to force it to be a regex, prefix the filter with '^' or append it with '$'
+    and it will then be parsed as a regex.
 
 *-g* 'function-name'::
     This option is for the function_graph plugin. It will graph the given
tracecmd/trace-record.c +55 -3

81 lines not on this page · raw message

Signature · 1 line
2.29.2