tracing: Move tracing_set_filter_buffering() into trace_events_hist.c
The function tracing_set_filter_buffering() is only used in trace_events_hist.c. Move it to that file and make it static. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Link: https://patch.msgid.link/20260206195936.617080218@kernel.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>master
parent
c8b039c3e3
commit
326669faf3
|
|
@ -7891,26 +7891,6 @@ u64 tracing_event_time_stamp(struct trace_buffer *buffer, struct ring_buffer_eve
|
|||
return ring_buffer_event_time_stamp(buffer, rbe);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set or disable using the per CPU trace_buffer_event when possible.
|
||||
*/
|
||||
int tracing_set_filter_buffering(struct trace_array *tr, bool set)
|
||||
{
|
||||
guard(mutex)(&trace_types_lock);
|
||||
|
||||
if (set && tr->no_filter_buffering_ref++)
|
||||
return 0;
|
||||
|
||||
if (!set) {
|
||||
if (WARN_ON_ONCE(!tr->no_filter_buffering_ref))
|
||||
return -EINVAL;
|
||||
|
||||
--tr->no_filter_buffering_ref;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct ftrace_buffer_info {
|
||||
struct trace_iterator iter;
|
||||
void *spare;
|
||||
|
|
|
|||
|
|
@ -476,7 +476,6 @@ 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);
|
||||
|
||||
extern bool trace_clock_in_ns(struct trace_array *tr);
|
||||
|
|
|
|||
|
|
@ -6531,6 +6531,26 @@ static bool existing_hist_update_only(char *glob,
|
|||
return updated;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set or disable using the per CPU trace_buffer_event when possible.
|
||||
*/
|
||||
static int tracing_set_filter_buffering(struct trace_array *tr, bool set)
|
||||
{
|
||||
guard(mutex)(&trace_types_lock);
|
||||
|
||||
if (set && tr->no_filter_buffering_ref++)
|
||||
return 0;
|
||||
|
||||
if (!set) {
|
||||
if (WARN_ON_ONCE(!tr->no_filter_buffering_ref))
|
||||
return -EINVAL;
|
||||
|
||||
--tr->no_filter_buffering_ref;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int hist_register_trigger(char *glob,
|
||||
struct event_trigger_data *data,
|
||||
struct trace_event_file *file)
|
||||
|
|
|
|||
Loading…
Reference in New Issue