diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-03-30 14:33:28 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-04-02 10:25:12 -0400 |
commit | aab0622e915680e39d8f1915b921c9247c05e48f (patch) | |
tree | 76c201c016d22884b70e52e0967173ab5f5b325d /include | |
parent | 9390fc2ee60adfadbedccf15d8bc4279dd9ae61f (diff) | |
download | libtracefs-aab0622e915680e39d8f1915b921c9247c05e48f.tar.gz |
libtracefs: Add TRACEFS_FL_FUTURE flag for future module filtering
Starting in Linux v4.13, it is possible to load filters of a function for
a module before it is loaded. That is:
# echo '*:mod:rfkill' > set_ftrace_filter
# echo function > current_tracer
# modprobe rfkill
And the above will enable all functions for the rfkill module to be traced
before it starts to run.
Add a TRACEFS_FL_FUTURE flag to be able to accomplish the same thing.
Link: https://lore.kernel.org/linux-trace-devel/20210330183546.351496716@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/tracefs.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/tracefs.h b/include/tracefs.h index 0d98c10..befcc48 100644 --- a/include/tracefs.h +++ b/include/tracefs.h @@ -149,10 +149,13 @@ const char *tracefs_option_name(enum tracefs_option_id id); /* * RESET - Reset on opening filter file (O_TRUNC) * CONTINUE - Do not close filter file on return. + * FUTURE - For kernels that support this feature, enable filters for + * a module that has yet to be loaded. */ enum { TRACEFS_FL_RESET = (1 << 0), TRACEFS_FL_CONTINUE = (1 << 1), + TRACEFS_FL_FUTURE = (1 << 2), }; int tracefs_function_filter(struct tracefs_instance *instance, const char *filter, |