mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-19 13:16:14 +07:00
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>
This commit is contained in:
parent
fa1b47dd85
commit
77d9f465d4
@ -884,13 +884,18 @@ trace_current_buffer_lock_reserve(unsigned char type, unsigned long len,
|
|||||||
void trace_current_buffer_unlock_commit(struct ring_buffer_event *event,
|
void trace_current_buffer_unlock_commit(struct ring_buffer_event *event,
|
||||||
unsigned long flags, int pc)
|
unsigned long flags, int pc)
|
||||||
{
|
{
|
||||||
return __trace_buffer_unlock_commit(&global_trace, event, flags, pc, 1);
|
__trace_buffer_unlock_commit(&global_trace, event, flags, pc, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void trace_nowake_buffer_unlock_commit(struct ring_buffer_event *event,
|
void trace_nowake_buffer_unlock_commit(struct ring_buffer_event *event,
|
||||||
unsigned long flags, int pc)
|
unsigned long flags, int pc)
|
||||||
{
|
{
|
||||||
return __trace_buffer_unlock_commit(&global_trace, event, flags, pc, 0);
|
__trace_buffer_unlock_commit(&global_trace, event, flags, pc, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void trace_current_buffer_discard_commit(struct ring_buffer_event *event)
|
||||||
|
{
|
||||||
|
ring_buffer_discard_commit(global_trace.buffer, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -497,6 +497,7 @@ void trace_current_buffer_unlock_commit(struct ring_buffer_event *event,
|
|||||||
unsigned long flags, int pc);
|
unsigned long flags, int pc);
|
||||||
void trace_nowake_buffer_unlock_commit(struct ring_buffer_event *event,
|
void trace_nowake_buffer_unlock_commit(struct ring_buffer_event *event,
|
||||||
unsigned long flags, int pc);
|
unsigned long flags, int pc);
|
||||||
|
void trace_current_buffer_discard_commit(struct ring_buffer_event *event);
|
||||||
|
|
||||||
struct trace_entry *tracing_get_trace_entry(struct trace_array *tr,
|
struct trace_entry *tracing_get_trace_entry(struct trace_array *tr,
|
||||||
struct trace_array_cpu *data);
|
struct trace_array_cpu *data);
|
||||||
|
@ -223,9 +223,9 @@ static void ftrace_raw_event_##call(proto) \
|
|||||||
assign; \
|
assign; \
|
||||||
\
|
\
|
||||||
if (call->preds && !filter_match_preds(call, entry)) \
|
if (call->preds && !filter_match_preds(call, entry)) \
|
||||||
ring_buffer_event_discard(event); \
|
trace_current_buffer_discard_commit(event); \
|
||||||
\
|
else \
|
||||||
trace_nowake_buffer_unlock_commit(event, irq_flags, pc); \
|
trace_nowake_buffer_unlock_commit(event, irq_flags, pc); \
|
||||||
\
|
\
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
|
Loading…
Reference in New Issue
Block a user