libbpf-tools: memleak tools fails to build on ppc64
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
The libpf tool memleak fails to build on powerpc 64 with the following error:
```
BPF memleak.bpf.o
memleak.bpf.c:377:23: error: no member named 'bytes_alloc' in 'struct trace_event_raw_percpu_alloc_percpu'
gen_alloc_enter(ctx->bytes_alloc);
~~~ ^
1 error generated.
make: *** [Makefile:198: /builddir/build/BUILD/bcc-0.27.0/libbpf-tools/.output/memleak.bpf.o] Error 1
```
The field `bytes_alloc` is indeed missing from `trace_event_raw_percpu_alloc_percpu` in powerpc vmlinux.h.
I don't see what makes ppc64 different than other arches here.
bcc version: 0.27.0
Kernel version: 6.2.8-200.fc37.ppc64le
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with libbpf-tools/memleak.bpf.c around line 377 and inspect the generated powerpc vmlinux.h definition of trace_event_raw_percpu_alloc_percpu. Check the libbpf-tools build rule referenced at Makefile line 198 and compare the relevant event fields across architectures. Done means memleak.bpf.o builds successfully on ppc64 without the missing bytes_alloc error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100