Skip to content

Commit d205d4a

Browse files
Rtoaxanakryiko
authored andcommitted
samples/bpf: tracex4: Fix failed to create kretprobe 'kmem_cache_alloc_node+0x0'
commit 7bd230a ("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 <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: torvalds/linux@7bd230a Link: https://lore.kernel.org/bpf/[email protected]
1 parent ddc3d98 commit d205d4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples/bpf/tracex4.bpf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ int bpf_prog1(struct pt_regs *ctx)
3333
return 0;
3434
}
3535

36-
SEC("kretprobe/kmem_cache_alloc_node")
36+
SEC("kretprobe/kmem_cache_alloc_node_noprof")
3737
int bpf_prog2(struct pt_regs *ctx)
3838
{
3939
long ptr = PT_REGS_RC(ctx);
4040
long ip = 0;
4141

42-
/* get ip address of kmem_cache_alloc_node() caller */
42+
/* get ip address of kmem_cache_alloc_node_noprof() caller */
4343
BPF_KRETPROBE_READ_RET_IP(ip, ctx);
4444

4545
struct pair v = {

0 commit comments

Comments
 (0)