File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed
tools/testing/selftests/bpf Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ void test_bpf_verif_scale(void)
48
48
{ "test_verif_scale2.o" , BPF_PROG_TYPE_SCHED_CLS },
49
49
{ "test_verif_scale3.o" , BPF_PROG_TYPE_SCHED_CLS },
50
50
51
+ { "pyperf_global.o" , BPF_PROG_TYPE_RAW_TRACEPOINT },
52
+
51
53
/* full unroll by llvm */
52
54
{ "pyperf50.o" , BPF_PROG_TYPE_RAW_TRACEPOINT },
53
55
{ "pyperf100.o" , BPF_PROG_TYPE_RAW_TRACEPOINT },
Original file line number Diff line number Diff line change @@ -154,7 +154,12 @@ struct {
154
154
__uint (value_size , sizeof (long long ) * 127 );
155
155
} stackmap SEC (".maps" );
156
156
157
- static __always_inline int __on_event (struct pt_regs * ctx )
157
+ #ifdef GLOBAL_FUNC
158
+ __attribute__((noinline ))
159
+ #else
160
+ static __always_inline
161
+ #endif
162
+ int __on_event (struct bpf_raw_tracepoint_args * ctx )
158
163
{
159
164
uint64_t pid_tgid = bpf_get_current_pid_tgid ();
160
165
pid_t pid = (pid_t )(pid_tgid >> 32 );
@@ -254,7 +259,7 @@ static __always_inline int __on_event(struct pt_regs *ctx)
254
259
}
255
260
256
261
SEC ("raw_tracepoint/kfree_skb" )
257
- int on_event (struct pt_regs * ctx )
262
+ int on_event (struct bpf_raw_tracepoint_args * ctx )
258
263
{
259
264
int i , ret = 0 ;
260
265
ret |= __on_event (ctx );
Original file line number Diff line number Diff line change
1
+ // SPDX-License-Identifier: GPL-2.0
2
+ /* Copyright (c) 2020 Facebook */
3
+ #define STACK_MAX_LEN 50
4
+ #define GLOBAL_FUNC
5
+ #include "pyperf.h"
You can’t perform that action at this time.
0 commit comments