michalgr/bpftrace_local_manifest

bpftrace -l to list available uprobes, got objdump: inaccessible or not found

Closed this issue · 2 comments

Hello michalgr,

I built Android R (kernel version 4.19) image for my device included your manifest of bpftrace functionality.

I got the error when list available uprobes:
bpftrace -l uprobe:/apex/com.android.runtime/lib64/bionic/libc.so:*
sh: objdump: inaccessible or not found

bpftrace -e 'uprobe:/apex/com.android.runtime/lib64/bionic/libc.so:*pthread* { printf("read a line\n"); }'
LLVM ERROR: out of memory

Do you have any suggestion? very thanks!

Hi there !

It seems that bpftrace uses objdump when bcc_elf_foreach_sym is not available. It should be enough to define HAVE_BCC_ELF_FOREACH_SYM to make the problem go away.

I saw the OOM you're seeing on R as well. This is the commit in bpftrace that fixed the issue: bpftrace/bpftrace@9540490

Let me recommend ExtendedAndroidTools. Build scripts in that repo have both problems (and more) fixed. That is the way of building bpftrace and bcc for Android I want to maintain and support in the future.

Thanks for your reply!