diff options
author | Daniel Bristot de Oliveira <bristot@kernel.org> | 2022-03-02 20:01:30 +0100 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2022-03-15 14:36:49 -0400 |
commit | b5aa0be25c27a7f21d9a28f0e0057915552d3c1b (patch) | |
tree | c8b5da18bf0a49fad305fc087ca1986d09fa5c3c /tools/tracing/rtla/src/trace.h | |
parent | 173a3b014827955cefdf972ae673d94b60e31cf8 (diff) |
rtla/trace: Add trace events helpers
Add a set of helper functions to allow the rtla tools to enable
additional tracepoints in the trace instance.
Link: https://lkml.kernel.org/r/932398b36c1bbaa22c7810d7a40ca9b8c5595b94.1646247211.git.bristot@kernel.org
Cc: Daniel Bristot de Oliveira <bristot@kernel.org>
Cc: Clark Williams <williams@redhat.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'tools/tracing/rtla/src/trace.h')
-rw-r--r-- | tools/tracing/rtla/src/trace.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/tracing/rtla/src/trace.h b/tools/tracing/rtla/src/trace.h index 0ea1df0ad9a7..9f9751f7ee36 100644 --- a/tools/tracing/rtla/src/trace.h +++ b/tools/tracing/rtla/src/trace.h @@ -2,6 +2,13 @@ #include <tracefs.h> #include <stddef.h> +struct trace_events { + struct trace_events *next; + char *system; + char *event; + char enabled; +}; + struct trace_instance { struct tracefs_instance *inst; struct tep_handle *tep; @@ -25,3 +32,11 @@ void destroy_instance(struct tracefs_instance *inst); int save_trace_to_file(struct tracefs_instance *inst, const char *filename); int collect_registered_events(struct tep_event *tep, struct tep_record *record, int cpu, void *context); + +struct trace_events *trace_event_alloc(const char *event_string); +void trace_events_disable(struct trace_instance *instance, + struct trace_events *events); +void trace_events_destroy(struct trace_instance *instance, + struct trace_events *events); +int trace_events_enable(struct trace_instance *instance, + struct trace_events *events); |