From: Andrii Nakryiko <andrii@kernel.org>
To: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
martin.lau@kernel.org
Cc: andrii@kernel.org, kernel-team@meta.com,
Stanislav Fomichev <sdf@google.com>
Subject: [PATCH v2 bpf-next 1/5] bpf: flatten bpf_probe_register call chain
Date: Mon, 18 Mar 2024 11:40:33 -0700 [thread overview]
Message-ID: <20240318184037.3209242-2-andrii@kernel.org> (raw)
In-Reply-To: <20240318184037.3209242-1-andrii@kernel.org>
bpf_probe_register() and __bpf_probe_register() have identical
signatures and bpf_probe_register() just redirect to
__bpf_probe_register(). So get rid of this extra function call step to
simplify following the source code.
It has no difference at runtime due to inlining, of course.
Acked-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
---
kernel/trace/bpf_trace.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index 0a5c4efc73c3..f29735bb7aed 100644
--- a/kernel/trace/bpf_trace.c
+++ b/kernel/trace/bpf_trace.c
@@ -2429,7 +2429,7 @@ BPF_TRACE_DEFN_x(10);
BPF_TRACE_DEFN_x(11);
BPF_TRACE_DEFN_x(12);
-static int __bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *prog)
+int bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *prog)
{
struct tracepoint *tp = btp->tp;
@@ -2447,11 +2447,6 @@ static int __bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *
prog);
}
-int bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *prog)
-{
- return __bpf_probe_register(btp, prog);
-}
-
int bpf_probe_unregister(struct bpf_raw_event_map *btp, struct bpf_prog *prog)
{
return tracepoint_probe_unregister(btp->tp, (void *)btp->bpf_func, prog);
--
2.43.0
next prev parent reply other threads:[~2024-03-18 18:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-18 18:40 [PATCH v2 bpf-next 0/5] BPF raw tracepoint support for BPF cookie Andrii Nakryiko
2024-03-18 18:40 ` Andrii Nakryiko [this message]
2024-03-18 18:40 ` [PATCH v2 bpf-next 2/5] bpf: pass whole link instead of prog when triggering raw tracepoint Andrii Nakryiko
2024-03-18 18:40 ` [PATCH v2 bpf-next 3/5] bpf: support BPF cookie in raw tracepoint (raw_tp, tp_btf) programs Andrii Nakryiko
2024-03-19 9:19 ` Eduard Zingerman
2024-03-19 12:48 ` Jiri Olsa
2024-03-19 16:09 ` Andrii Nakryiko
2024-03-19 16:23 ` Jiri Olsa
2024-03-19 16:26 ` Eduard Zingerman
2024-03-18 18:40 ` [PATCH v2 bpf-next 4/5] libbpf: add support for BPF cookie for raw_tp/tp_btf programs Andrii Nakryiko
2024-03-19 7:20 ` Alexei Starovoitov
2024-03-19 16:15 ` Andrii Nakryiko
2024-03-19 10:41 ` Eduard Zingerman
2024-03-19 16:16 ` Andrii Nakryiko
2024-03-19 16:24 ` Eduard Zingerman
2024-03-19 16:27 ` Andrii Nakryiko
2024-03-18 18:40 ` [PATCH v2 bpf-next 5/5] selftests/bpf: add raw_tp/tp_btf BPF cookie subtests Andrii Nakryiko
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=20240318184037.3209242-2-andrii@kernel.org \
--to=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@meta.com \
--cc=martin.lau@kernel.org \
--cc=sdf@google.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.