diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-04-02 01:16:59 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-13 18:00:54 -0400 |
commit | 77d9f465d46fd67cdb82ee5e1ab99dd57a17c486 (patch) | |
tree | c21063ae5dff55522593f29e952c8a05958c6ce6 /kernel/trace/trace.c | |
parent | fa1b47dd85453ec7d4bcfe4aa4a2d172ba452fc3 (diff) |
tracing/filters: use ring_buffer_discard_commit for discarded events
The ring_buffer_discard_commit makes better usage of the ring_buffer
when an event has been discarded. It tries to remove it completely if
possible.
This patch converts the trace event filtering to use
ring_buffer_discard_commit instead of the ring_buffer_event_discard.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index c209d214169c..d880ab2772ce 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, | |||
884 | void trace_current_buffer_unlock_commit(struct ring_buffer_event *event, | 884 | void 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 | ||
890 | void trace_nowake_buffer_unlock_commit(struct ring_buffer_event *event, | 890 | void 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 | |||
896 | void trace_current_buffer_discard_commit(struct ring_buffer_event *event) | ||
897 | { | ||
898 | ring_buffer_discard_commit(global_trace.buffer, event); | ||
894 | } | 899 | } |
895 | 900 | ||
896 | void | 901 | void |