bcc icon indicating copy to clipboard operation
bcc copied to clipboard

funccount t:sched:sched_fork cause invalid argument

Open oujunli opened this issue 10 years ago • 4 comments

I run python tools/funccount.py t:sched:sched_fork , get the error message :

python tools/funccount.py t:sched:sched_fork /virtual/main.c:3:1: error: could not open bpf map: Invalid argument is maps/array map type enabled in your kernel? BPF_TABLE("array", int, u64, counts, 0); ^ /virtual/include/bcc/helpers.h:53:4: note: expanded from macro 'BPF_TABLE' };
^ 1 error generated. Failed to compile BPF module

my system is Ubuntu 16.4 LTS and kernel is latest kernel :

Linux ojl 4.9.0-040900rc2-generic #201610232131 SMP Mon Oct 24 01:32:49 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

oujunli avatar Oct 28 '16 15:10 oujunli

Did you run as root?

goldshtn avatar Oct 28 '16 15:10 goldshtn

Yes, I run funccount other example not meet problems.

oujunli avatar Oct 28 '16 15:10 oujunli

@goldshtn funccount's parsing of tracepoints should be improved. t:sched:sched_fork doesn't exist... yet the script does something crazy with maps.

4ast avatar Oct 28 '16 17:10 4ast

Thanks for the bug report, should be fixed in #792.

goldshtn avatar Oct 28 '16 19:10 goldshtn