Open jeromemarchand opened 1 year ago
This is because the bytes_alloc
field is introduced in kernel 5.19, see https://github.com/torvalds/linux/commit/f67bed134a053663852a1a3ab1b3223bfc2104a2.
Update powerpc vmlinux.h on latest kernel should fix the build failure. But we also need a CO-RE fix to get it run on old kernels.
I wonder: shouldn't there be an option to automatically generate vmlinux.h from the running kernel?
I wonder: shouldn't there be an option to automatically generate vmlinux.h from the running kernel?
This does not solve the problem actually.
I think alloc size of percpu is always cared, not the total size 'ctx->bytes_alloc' So use 'ctx->size' wolud be better like bcc tools https://github.com/iovisor/bcc/blob/master/tools/memleak.py#L401
The libpf tool memleak fails to build on powerpc 64 with the following error:
The field
bytes_alloc
is indeed missing fromtrace_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