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 <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: Andrew Morton <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Steven Rostedt (Google) <[email protected]>
This commit is contained in:
Steven Rostedt
2026-02-08 21:01:11 -05:00
committed by Steven Rostedt (Google)
parent c8b039c3e3
commit 326669faf3
3 changed files with 20 additions and 21 deletions
-20
View File
@@ -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;
-1
View File
@@ -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);
+20
View File
@@ -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)