trace-cmd record: Have --module affect function filters listed after it
PATCH 1/1 trace-cmd record: Have --module affect function filters listed after it
When the --module option is used, have it affect the remaining filters that come after it. Keep the old behavior that no other filter is needed if only filtering all modules in function filter.
'--module snd' is equivalent to '-l :mod:snd'
'--module snd -l "*jack*"' is equivalent to '-l "*jack*:mod:snd"'
'--module snd -n "*"' is equivalent to '-n :mod:snd'
Cc Deepak Das <[email protected]>
Signed-off-by Steven Rostedt (VMware) <[email protected]>
--- Documentation/trace-cmd-record.1.txt | 9 ++++++- trace-local.h | 3 ++- trace-record.c | 52 +++++++++++++++++++++++------------- 3 files changed, 44 insertions(+), 20 deletions(-)
Documentation/trace-cmd-record.1.txt +8 -1
@@ -274,8 +274,15 @@ OPTIONS *--module* 'module':: Filter a module's name in function tracing. It is equivalent to adding + ':mod:module' after all other functions being filtered. If no other function + filter is listed, then all modules functions will be filtered in the filter. + + '--module snd' is equivalent to '-l :mod:snd' + + '--module snd -l "*jack*"' is equivalent to '-l "*jack*:mod:snd"' + + '--module snd -n "*"' is equivalent to '-n :mod:snd' - *-l :mod:module* *--profile*:: With the *--profile* option, "trace-cmd" will enable tracing that can
trace-local.h +2 -1
@@ -147,6 +147,7 @@ char *strstrip(char *str);struct func_list {struct func_list *next;const char *func; +const char *mod; };struct buffer_instance {
@@ -161,9 +162,9 @@ struct buffer_instance {struct event_list *sched_wakeup_new_event;const char *plugin; +char *filter_mod;struct func_list *filter_funcs;struct func_list *notrace_funcs; -struct func_list *filter_mods;const char *clock;
trace-record.c +34 -18
134 lines not on this page · raw message
Signature · 1 line
2.9.3