From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Daniel Bristot de Oliveira <bristot@kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Tom Zanussi <zanussi@kernel.org>
Subject: [for-next][PATCH 07/20] tracing: Move struct filter_pred into trace_events_filter.c
Date: Tue, 27 Sep 2022 12:02:23 -0400 [thread overview]
Message-ID: <20220927160244.410510528@goodmis.org> (raw)
In-Reply-To: 20220927160216.349640304@goodmis.org
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
The structure filter_pred and the typedef of the function used are only
referenced by trace_events_filter.c. There's no reason to have it in an
external header file. Move them into the only file they are used in.
Link: https://lkml.kernel.org/r/20220906225529.598047132@goodmis.org
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
kernel/trace/trace.h | 13 -------------
kernel/trace/trace_events_filter.c | 13 +++++++++++++
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 900e75d96c84..54ee5711c729 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -1435,8 +1435,6 @@ event_trigger_unlock_commit(struct trace_event_file *file,
struct filter_pred;
struct regex;
-typedef int (*filter_pred_fn_t) (struct filter_pred *pred, void *event);
-
typedef int (*regex_match_func)(char *str, struct regex *r, int len);
enum regex_type {
@@ -1455,17 +1453,6 @@ struct regex {
regex_match_func match;
};
-struct filter_pred {
- filter_pred_fn_t fn;
- u64 val;
- struct regex regex;
- unsigned short *ops;
- struct ftrace_event_field *field;
- int offset;
- int not;
- int op;
-};
-
static inline bool is_string_field(struct ftrace_event_field *field)
{
return field->filter_type == FILTER_DYN_STRING ||
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index 4b1057ab9d96..c49c689ce4ad 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -43,6 +43,19 @@ enum filter_op_ids { OPS };
static const char * ops[] = { OPS };
+typedef int (*filter_pred_fn_t) (struct filter_pred *pred, void *event);
+
+struct filter_pred {
+ filter_pred_fn_t fn;
+ u64 val;
+ struct regex regex;
+ unsigned short *ops;
+ struct ftrace_event_field *field;
+ int offset;
+ int not;
+ int op;
+};
+
/*
* pred functions are OP_LE, OP_LT, OP_GE, OP_GT, and OP_BAND
* pred_funcs_##type below must match the order of them above.
--
2.35.1
next prev parent reply other threads:[~2022-09-27 16:02 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 16:02 [for-next][PATCH 00/20] tracing: Update for 6.1 Steven Rostedt
2022-09-27 16:02 ` [for-next][PATCH 01/20] tracing/eprobe: Add eprobe filter support Steven Rostedt
2022-09-27 16:02 ` [for-next][PATCH 02/20] selftests/ftrace: Add eprobe syntax error testcase Steven Rostedt
2022-09-27 16:02 ` [for-next][PATCH 03/20] rv/monitors: add static qualifier for local symbols Steven Rostedt
2022-09-27 16:02 ` [for-next][PATCH 04/20] rv/dot2K: add static qualifier for local variable Steven Rostedt
2022-09-27 16:02 ` [for-next][PATCH 05/20] tracing: Add numeric delta time to the trace event benchmark Steven Rostedt
2022-09-27 16:02 ` [for-next][PATCH 06/20] tracing/hist: Call hist functions directly via a switch statement Steven Rostedt
2022-09-27 16:02 ` Steven Rostedt [this message]
2022-09-27 16:02 ` [for-next][PATCH 08/20] tracing/filter: Call filter predicate " Steven Rostedt
2022-09-27 16:02 ` [for-next][PATCH 09/20] tracepoint: Optimize the critical region of mutex_lock in tracepoint_module_coming() Steven Rostedt
2022-09-27 16:02 ` [for-next][PATCH 10/20] x86/ftrace: Remove unused modifying_ftrace_code declaration Steven Rostedt
2022-09-27 16:02 ` [for-next][PATCH 11/20] x86/kprobes: Remove unused arch_kprobe_override_function() declaration Steven Rostedt
2022-09-27 16:02 ` [for-next][PATCH 12/20] tracing: kprobe: Fix kprobe event gen test module on exit Steven Rostedt
2022-09-27 16:02 ` [for-next][PATCH 13/20] tracing: kprobe: Make gen test module work in arm and riscv Steven Rostedt
2022-09-27 16:02 ` [for-next][PATCH 14/20] tracing/osnoise: Fix possible recursive locking in stop_per_cpu_kthreads Steven Rostedt
2022-09-27 16:02 ` [for-next][PATCH 15/20] rv/monitor: Add __init/__exit annotations to module init/exit funcs Steven Rostedt
2022-09-27 16:02 ` [for-next][PATCH 16/20] tracing: Disable interrupt or preemption before acquiring arch_spinlock_t Steven Rostedt
2022-09-27 16:02 ` [for-next][PATCH 17/20] ftrace: Remove obsoleted code from ftrace and task_struct Steven Rostedt
2022-09-27 16:02 ` [for-next][PATCH 18/20] x86: kprobes: Remove unused macro stack_addr Steven Rostedt
2022-09-27 16:02 ` [for-next][PATCH 19/20] tracing/eprobe: Fix alloc event dir failed when event name no set Steven Rostedt
2022-09-27 16:02 ` [for-next][PATCH 20/20] ftrace: Properly unset FTRACE_HASH_FL_MOD Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220927160244.410510528@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=bristot@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=zanussi@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox