aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace.c9
-rw-r--r--kernel/trace/trace.h1
-rw-r--r--kernel/trace/trace_events_stage_3.h6
3 files changed, 11 insertions, 5 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index c209d214169..d880ab2772c 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -884,13 +884,18 @@ trace_current_buffer_lock_reserve(unsigned char type, unsigned long len,
884void trace_current_buffer_unlock_commit(struct ring_buffer_event *event, 884void trace_current_buffer_unlock_commit(struct ring_buffer_event *event,
885 unsigned long flags, int pc) 885 unsigned long flags, int pc)
886{ 886{
887 return __trace_buffer_unlock_commit(&global_trace, event, flags, pc, 1); 887 __trace_buffer_unlock_commit(&global_trace, event, flags, pc, 1);
888} 888}
889 889
890void trace_nowake_buffer_unlock_commit(struct ring_buffer_event *event, 890void trace_nowake_buffer_unlock_commit(struct ring_buffer_event *event,
891 unsigned long flags, int pc) 891 unsigned long flags, int pc)
892{ 892{
893 return __trace_buffer_unlock_commit(&global_trace, event, flags, pc, 0); 893 __trace_buffer_unlock_commit(&global_trace, event, flags, pc, 0);
894}
895
896void trace_current_buffer_discard_commit(struct ring_buffer_event *event)
897{
898 ring_buffer_discard_commit(global_trace.buffer, event);
894} 899}
895 900
896void 901void
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 3cf856fa597..dfefffd7ae3 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -497,6 +497,7 @@ void trace_current_buffer_unlock_commit(struct ring_buffer_event *event,
497 unsigned long flags, int pc); 497 unsigned long flags, int pc);
498void trace_nowake_buffer_unlock_commit(struct ring_buffer_event *event, 498void trace_nowake_buffer_unlock_commit(struct ring_buffer_event *event,
499 unsigned long flags, int pc); 499 unsigned long flags, int pc);
500void trace_current_buffer_discard_commit(struct ring_buffer_event *event);
500 501
501struct trace_entry *tracing_get_trace_entry(struct trace_array *tr, 502struct trace_entry *tracing_get_trace_entry(struct trace_array *tr,
502 struct trace_array_cpu *data); 503 struct trace_array_cpu *data);
diff --git a/kernel/trace/trace_events_stage_3.h b/kernel/trace/trace_events_stage_3.h
index 9d2fa78cecc..d2f34bf30e5 100644
--- a/kernel/trace/trace_events_stage_3.h
+++ b/kernel/trace/trace_events_stage_3.h
@@ -223,9 +223,9 @@ static void ftrace_raw_event_##call(proto) \
223 assign; \ 223 assign; \
224 \ 224 \
225 if (call->preds && !filter_match_preds(call, entry)) \ 225 if (call->preds && !filter_match_preds(call, entry)) \
226 ring_buffer_event_discard(event); \ 226 trace_current_buffer_discard_commit(event); \
227 \ 227 else \
228 trace_nowake_buffer_unlock_commit(event, irq_flags, pc); \ 228 trace_nowake_buffer_unlock_commit(event, irq_flags, pc); \
229 \ 229 \
230} \ 230} \
231 \ 231 \