diff options
Diffstat (limited to 'include/linux/trace_events.h')
-rw-r--r-- | include/linux/trace_events.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h index 311176f290b2..2181ae5db42e 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h @@ -8,6 +8,7 @@ #include <linux/hardirq.h> #include <linux/perf_event.h> #include <linux/tracepoint.h> +#include <linux/coresight-stm.h> struct trace_array; struct trace_buffer; @@ -231,7 +232,8 @@ void *trace_event_buffer_reserve(struct trace_event_buffer *fbuffer, struct trace_event_file *trace_file, unsigned long len); -void trace_event_buffer_commit(struct trace_event_buffer *fbuffer); +void trace_event_buffer_commit(struct trace_event_buffer *fbuffer, + unsigned long len); enum { TRACE_EVENT_FL_FILTERED_BIT, @@ -501,6 +503,7 @@ __event_trigger_test_discard(struct trace_event_file *file, * @entry: The event itself * @irq_flags: The state of the interrupts at the start of the event * @pc: The state of the preempt count at the start of the event. + * @len: The length of the payload data required for stm logging. * * This is a helper function to handle triggers that require data * from the event itself. It also tests the event against filters and @@ -510,12 +513,16 @@ static inline void event_trigger_unlock_commit(struct trace_event_file *file, struct ring_buffer *buffer, struct ring_buffer_event *event, - void *entry, unsigned long irq_flags, int pc) + void *entry, unsigned long irq_flags, int pc, + unsigned long len) { enum event_trigger_type tt = ETT_NONE; - if (!__event_trigger_test_discard(file, buffer, event, entry, &tt)) + if (!__event_trigger_test_discard(file, buffer, event, entry, &tt)) { + if (len) + stm_log(OST_ENTITY_FTRACE_EVENTS, entry, len); trace_buffer_unlock_commit(file->tr, buffer, event, irq_flags, pc); + } if (tt) event_triggers_post_call(file, tt); |