diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-06-25 18:17:36 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-06-28 15:47:34 -0400 |
commit | d2122061f0332f3746cecef0ffb4cf66cac88cfd (patch) | |
tree | 5b861638538a16a043788efc4aa7ecb43a4f41ea /include | |
parent | df130d4915b154787699707232e39ed2d824f795 (diff) | |
download | libtracefs-d2122061f0332f3746cecef0ffb4cf66cac88cfd.tar.gz |
libtracefs: Add custom tracer to tracefs_tracer_set()
Allow the user to enter their own string to define a tracer using
TRACEFS_TRACER_CUSTOM. This way if there's a tracer that is not yet
supported by libtracefs, the user could still enable the tracer with the
tracefs_tracer_set() functionality, as well as use the enums to set
tracers.
For example:
tracefs_tracer_set(NULL, TRACEFS_TRACER_CUSTOM, "osnoise");
Link: https://lore.kernel.org/linux-trace-devel/20210625221739.1215557-2-rostedt@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, 2 insertions, 1 deletions
diff --git a/include/tracefs.h b/include/tracefs.h index 50873f3..75905ec 100644 --- a/include/tracefs.h +++ b/include/tracefs.h @@ -186,6 +186,7 @@ void tracefs_set_loglevel(enum tep_loglevel level); enum tracefs_tracers { TRACEFS_TRACER_NOP = 0, + TRACEFS_TRACER_CUSTOM, TRACEFS_TRACER_FUNCTION, TRACEFS_TRACER_FUNCTION_GRAPH, TRACEFS_TRACER_IRQSOFF, @@ -200,7 +201,7 @@ enum tracefs_tracers { TRACEFS_TRACER_BLOCK, }; -int tracefs_tracer_set(struct tracefs_instance *instance, enum tracefs_tracers tracer); +int tracefs_tracer_set(struct tracefs_instance *instance, enum tracefs_tracers tracer, ...); int tracefs_tracer_clear(struct tracefs_instance *instance); #endif /* _TRACE_FS_H */ |