This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: systemtap cross compile with out of tree module


Hi,
 I am trying to do a cross compile(powerpc) of systemtap script which
probes a module situated out of tree of linux source tree. I can probe
kernel functions, module functions situated inside the kernel tree.
But out of tree module's gives error.
/home/mav/stap/test_module.ko
/home/mav/linux-2.6.26.4/

My stap script is simple as
probe module("test_module").function("hello_world") { }

Using systemtap-2.0,  am getting an error as below.
./stap -d /home/mav/stap/test_module.ko -g -P -a powerpc -B
CROSS_COMPILE=powerpc-linux-gnu- -p4 -r /home/mav/linux-2.6.26.4/ -m
mod_test mod_test.stp
Pass 1: parsed user script and 89 library script(s) using
76520virt/21460res/2512shr/19664data kb, in 180usr/10sys/367real ms.
WARNING: side-effect-free probe 'probe_2142': keyword at mod_test.stp:1:1
 source: probe module("
/home/mav/stap/test_module.ko").function("hello_world") {
         ^
Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0
global(s) using 136256virt/24488res/3444shr/21456data kb, in
20usr/170sys/2196real ms.
Pass 3: translated to C into "/tmp/stapi1Qfjf/mod_test_src.c" using
138640virt/28284res/5160shr/23140data kb, in 20usr/110sys/2110real ms.
/tmp/stapi1Qfjf/mod_test_src.c: In function 'systemtap_module_init':
/tmp/stapi1Qfjf/mod_test_src.c:569: error: implicit declaration of
function '_stp_vma_init'
/tmp/stapi1Qfjf/mod_test_src.c:573: error: implicit declaration of
function 'stap_start_task_finder'
/tmp/stapi1Qfjf/mod_test_src.c:575: error: implicit declaration of
function 'stap_stop_task_finder'
make[1]: *** [/tmp/stapi1Qfjf/mod_test_src.o] Error 1
make: *** [_module_/tmp/stapi1Qfjf] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compiled C into "mod_test.ko" in 400usr/340sys/4250real ms.

While trying with the latest git code, I dont get a compilation error,
but while running it, i get "WARNING: process-tracking is not
available in this kernel [man error::process-tracking]"
I dont have access permissions outside my home directory like /lib/modues/* etc
For instrumenting modules also , is utrace required ? If more details
required, do let me know. Any help appreciated.

Regards,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]