projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ddc3d98
)
samples/bpf: tracex4: Fix failed to create kretprobe 'kmem_cache_alloc_node+0x0'
author
Rong Tao
<rongtao@cestc.cn>
Tue, 27 Aug 2024 04:30:30 +0000
(12:30 +0800)
committer
Andrii Nakryiko
<andrii@kernel.org>
Tue, 27 Aug 2024 23:17:44 +0000
(16:17 -0700)
commit
7bd230a26648
("mm/slab: enable slab allocation tagging for kmalloc
and friends") [1] swap kmem_cache_alloc_node() to
kmem_cache_alloc_node_noprof().
linux/samples/bpf$ sudo ./tracex4
libbpf: prog 'bpf_prog2': failed to create kretprobe
'kmem_cache_alloc_node+0x0' perf event: No such file or directory
ERROR: bpf_program__attach failed
Signed-off-by: Rong Tao <rongtao@cestc.cn>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link:
https://github.com/torvalds/linux/commit/7bd230a26648ac68ab3731ebbc449090f0ac6a37
Link:
https://lore.kernel.org/bpf/tencent_34E5BCCAC5ABF3E81222AD81B1D05F16DE06@qq.com
samples/bpf/tracex4.bpf.c
patch
|
blob
|
history
diff --git
a/samples/bpf/tracex4.bpf.c
b/samples/bpf/tracex4.bpf.c
index
ca82675
..
d786492
100644
(file)
--- a/
samples/bpf/tracex4.bpf.c
+++ b/
samples/bpf/tracex4.bpf.c
@@
-33,13
+33,13
@@
int bpf_prog1(struct pt_regs *ctx)
return 0;
}
-SEC("kretprobe/kmem_cache_alloc_node")
+SEC("kretprobe/kmem_cache_alloc_node
_noprof
")
int bpf_prog2(struct pt_regs *ctx)
{
long ptr = PT_REGS_RC(ctx);
long ip = 0;
- /* get ip address of kmem_cache_alloc_node() caller */
+ /* get ip address of kmem_cache_alloc_node
_noprof
() caller */
BPF_KRETPROBE_READ_RET_IP(ip, ctx);
struct pair v = {