print_backtrace compile error
chenyu
yu.chen.surf@gmail.com
Fri May 27 13:47:00 GMT 2016
Hi all,
Currently I'm trying to use systemtap
from git://sourceware.org/git/systemtap.git
on top of linux 4.6.
It looks like I can not get print_backtrace work,
maybe due to missing some structure definition
in stacktrace.h, other function such as execname()
and cpu() work as expected:
$ cat read_test.stp
$ ! /usr/bin/env stap
probe kernel.function("vfs_read"){
print("----------------START-------------------------\n")
printf("In process [%s]\n", execname())
printf("on CPU [%d]\n", cpu())
print_backtrace()
print("----------------END-------------------------\n")
exit()
}
# ./read_test.stp
In file included from
/tmp/stapPYCfpw/stap_8230e12f26deacb5ff73e22d31f00161_3127_src.c:227:0:
/usr/local/share/systemtap/runtime/stack.c:133:2: error:
initialization from incompatible pointer type [-Werror]
.address = print_stack_address,
^
/usr/local/share/systemtap/runtime/stack.c:133:2: error: (near
initialization for ‘print_stack_ops.address’) [-Werror]
cc1: all warnings being treated as errors
scripts/Makefile.build:291: recipe for target
'/tmp/stapPYCfpw/stap_8230e12f26deacb5ff73e22d31f00161_3127_src.o'
failed
make[1]: *** [/tmp/stapPYCfpw/stap_8230e12f26deacb5ff73e22d31f00161_3127_src.o]
Error 1
Makefile:1428: recipe for target '_module_/tmp/stapPYCfpw' failed
make: *** [_module_/tmp/stapPYCfpw] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed. [man error::pass4]
Would you please give some advice on how to deal with it? thanks.
More information about the Systemtap
mailing list