diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-03-16 12:41:07 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-03-18 12:58:26 -0400 |
commit | d8279bfc5e9598682f657606d3830ab65932cfe4 (patch) | |
tree | 6cd284bd35cbf8ed816225a9dab28fb74fcce4c2 /kernel/trace/trace.h | |
parent | a948c69d6fb1ba749a958a8a87d4eecdda28989d (diff) | |
download | lwn-d8279bfc5e9598682f657606d3830ab65932cfe4.tar.gz lwn-d8279bfc5e9598682f657606d3830ab65932cfe4.zip |
tracing: Add tracing_event_time_stamp() API
Add a tracing_event_time_stamp() API that checks if the event passed in is
not on the ring buffer but a pointer to the per CPU trace_buffered_event
which does not have its time stamp set yet.
If it is a pointer to the trace_buffered_event, then just return the
current time stamp that the ring buffer would produce.
Otherwise, return the time stamp from the event.
Link: https://lkml.kernel.org/r/20210316164114.131996180@goodmis.org
Reviewed-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r-- | kernel/trace/trace.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index f2a7a72825c7..0d8f54f49a3a 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@ -372,6 +372,7 @@ extern int tracing_check_open_get_tr(struct trace_array *tr); extern struct trace_array *trace_array_find(const char *instance); extern struct trace_array *trace_array_find_get(const char *instance); +extern u64 tracing_event_time_stamp(struct trace_buffer *buffer, struct ring_buffer_event *rbe); extern int tracing_set_filter_buffering(struct trace_array *tr, bool set); extern int tracing_set_clock(struct trace_array *tr, const char *clockstr); |