problem with linuxtools callgraph usage [message #643136] |
Sat, 04 December 2010 20:50  |
Eclipse User |
|
|
|
Hello forum members!
I suspect I have a config problem, but I tried different things and couldn't get the callgraph component of the linuxtools to work. If somebody could give me some hint on how to get callgraph to work I'd be very thankful.
After much search and several attempts I finally got (apparently) SystemTap working properly on my ubuntu910. Below is the output of the install test as provided here( http://sourceware.org/systemtap/SystemTap_Beginners_Guide/us ing-systemtap.html#installproper)
Pass 1: parsed user script and 54 library script(s) in 260usr/0sys/273real ms.
Pass 2: analyzed script: 1 probe(s), 11 function(s), 2 embed(s), 1 global(s) in 370usr/180sys/534real ms.
Pass 3: using cached /home/ben/.systemtap/cache/3e/stap_3ebe9cf751d7f87e588d94c19 ba1cfc8_4650.c
Pass 4: using cached /home/ben/.systemtap/cache/3e/stap_3ebe9cf751d7f87e588d94c19 ba1cfc8_4650.ko
Pass 5: starting run.
read performed
Pass 5: run completed in 0usr/10sys/89real ms.
Now when I go to eclipse and try running profile using Profile as Function callgraph I get this:
SystemTap's version of uprobes is out of date.
As root, run "make -C /usr/share/systemtap/runtime/uprobes".
Pass 4: compilation failed. Try again with another '--vp 0001' option.
It seems to me one should not need to become an expert on SystemTap in order to use profile callgraph with eclipse. However, I did try the suggestions given above.
When I tried running "make -C /usr/share/systemtap/runtime/uprobes" as root I got the following pile of errors:
make: Entering directory `/usr/share/systemtap/runtime/uprobes'
make -C /lib/modules/2.6.31-22-generic/build SUBDIRS=/usr/share/systemtap/runtime/uprobes modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.31-22-generic'
CC [M] /usr/share/systemtap/runtime/uprobes/uprobes.o
/usr/share/systemtap/runtime/uprobes/uprobes.c:1:26: error: linux/utrace.h: No such file or directory
In file included from /usr/share/systemtap/runtime/uprobes/uprobes.c:8:
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c: In function 'utask_adjust_flags':
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:3 58: error: dereferencing pointer to incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:3 71: error: implicit declaration of function 'utrace_set_events_pid'
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c: In function 'clear_utrace_quiesce':
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:3 80: error: implicit declaration of function 'UTRACE_EVENT'
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:3 80: error: 'QUIESCE' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:3 80: error: (Each undeclared identifier is reported only once
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:3 80: error: for each function it appears in.)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:3 82: error: implicit declaration of function 'utrace_control_pid'
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:3 83: error: 'UTRACE_RESUME' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c: In function 'uprobe_stop_thread':
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:4 34: error: 'UTRACE_STOP' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:4 57: error: 'UTRACE_INTERRUPT' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c: In function 'quiesce_all_threads':
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:4 94: error: 'QUIESCE' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c: In function 'uprobe_free_task':
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:5 33: error: 'UTRACE_DETACH' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c: In function 'uprobe_add_task':
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:6 64: error: implicit declaration of function 'utrace_attach_pid'
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:6 64: error: 'UTRACE_ATTACH_CREATE' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:6 65: warning: assignment makes pointer from integer without a cast
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:6 81: error: 'SIGNAL' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:6 81: error: 'SIGNAL_IGN' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:6 82: error: 'SIGNAL_CORE' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:6 82: error: 'EXEC' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:6 83: error: 'CLONE' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:6 83: error: 'EXIT' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c: In function 'uprobe_report_signal':
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:1 854: error: variable 'signal_action' has initializer but incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:1 854: error: implicit declaration of function 'utrace_signal_action'
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:1 854: error: storage size of 'signal_action' isn't known
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:1 855: error: storage size of 'resume_action' isn't known
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:1 858: error: dereferencing pointer to incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:1 858: warning: type defaults to 'int' in declaration of '_________p1'
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:1 858: error: dereferencing pointer to incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:1 858: error: dereferencing pointer to incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:1 858: warning: type defaults to 'int' in declaration of 'type name'
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:1 867: error: 'UTRACE_SINGLESTEP' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:1 869: error: 'UTRACE_RESUME' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:1 874: error: 'UTRACE_SIGNAL_REPORT' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:1 884: error: 'UTRACE_SIGNAL_IGN' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:1 890: error: 'UTRACE_DETACH' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:1 894: error: 'UTRACE_STOP' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:1 908: error: 'UTRACE_SIGNAL_DELIVER' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:1 984: error: 'QUIESCE' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:1 855: warning: unused variable 'resume_action'
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:1 854: warning: unused variable 'signal_action'
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c: At top level:
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 094: warning: 'enum utrace_resume_action' declared inside parameter list
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 094: warning: its scope is only this definition or declaration, which is probably not what you want
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 091: error: parameter 1 ('action') has incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c: In function 'uprobe_report_quiesce':
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 100: error: dereferencing pointer to incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 100: warning: type defaults to 'int' in declaration of '_________p1'
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 100: error: dereferencing pointer to incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 100: error: dereferencing pointer to incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 100: warning: type defaults to 'int' in declaration of 'type name'
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 110: error: 'UTRACE_SINGLESTEP' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 136: error: 'UTRACE_RESUME' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 136: error: 'UTRACE_STOP' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c: At top level:
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 205: warning: 'enum utrace_resume_action' declared inside parameter list
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 203: error: parameter 1 ('action') has incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c: In function 'uprobe_report_exit':
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 212: error: dereferencing pointer to incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 212: warning: type defaults to 'int' in declaration of '_________p1'
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 212: error: dereferencing pointer to incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 212: error: dereferencing pointer to incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 212: warning: type defaults to 'int' in declaration of 'type name'
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 271: error: 'UTRACE_DETACH' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c: At top level:
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 415: warning: 'enum utrace_resume_action' declared inside parameter list
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 411: error: parameter 1 ('action') has incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c: In function 'uprobe_report_clone':
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 421: error: dereferencing pointer to incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 421: warning: type defaults to 'int' in declaration of '_________p1'
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 421: error: dereferencing pointer to incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 421: error: dereferencing pointer to incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 421: warning: type defaults to 'int' in declaration of 'type name'
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 499: error: 'UTRACE_RESUME' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c: At top level:
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 523: warning: 'enum utrace_resume_action' declared inside parameter list
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 518: error: parameter 1 ('action') has incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c: In function 'uprobe_report_exec':
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 529: error: dereferencing pointer to incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 529: warning: type defaults to 'int' in declaration of '_________p1'
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 529: error: dereferencing pointer to incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 529: error: dereferencing pointer to incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 529: warning: type defaults to 'int' in declaration of 'type name'
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 546: error: 'UTRACE_DETACH' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 546: error: 'UTRACE_RESUME' undeclared (first use in this function)
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c: At top level:
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 549: error: variable 'uprobe_utrace_ops' has initializer but incomplete type
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 551: error: unknown field 'report_quiesce' specified in initializer
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 551: warning: excess elements in struct initializer
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 551: warning: (near initialization for 'uprobe_utrace_ops')
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 552: error: unknown field 'report_signal' specified in initializer
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 552: warning: excess elements in struct initializer
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 552: warning: (near initialization for 'uprobe_utrace_ops')
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 553: error: unknown field 'report_exit' specified in initializer
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 553: warning: excess elements in struct initializer
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 553: warning: (near initialization for 'uprobe_utrace_ops')
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 554: error: unknown field 'report_clone' specified in initializer
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 554: warning: excess elements in struct initializer
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 554: warning: (near initialization for 'uprobe_utrace_ops')
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 555: error: unknown field 'report_exec' specified in initializer
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 556: warning: excess elements in struct initializer
/usr/share/systemtap/runtime/uprobes/../uprobes2/uprobes.c:2 556: warning: (near initialization for 'uprobe_utrace_ops')
make[2]: *** [/usr/share/systemtap/runtime/uprobes/uprobes.o] Error 1
make[1]: *** [_module_/usr/share/systemtap/runtime/uprobes] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.31-22-generic'
make: *** [default] Error 2
make: Leaving directory `/usr/share/systemtap/runtime/uprobes'
I also tried some changes with the configuration of callgraph by was unsuccessful.
Thanks for any help!!!!!!!!
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: problem with linuxtools callgraph usage [message #1231550 is a reply to message #854393] |
Tue, 14 January 2014 18:33   |
Eclipse User |
|
|
|
I've been giving systemtap another try, this time on my OpenSUSE 11.4 system.
The OpenSuse 11.4 repos came with systemtap v1.4 (which is a bit old now).
I tried running a simple "stap hello.stp" example and encountered this error message, similar to the one EvgenijM86 experienced in his post.
ERROR: Unable to verify the signature for the module /tmp/stapShZRuj/stap_c9114380922df2350a36dd8ea544d25e_176164 .ko
Members of the "stapusr" group can only use unsigned modules within
the "/lib/modules/2.6.35-26-generic/systemtap" directory.
I've learnt you can overcome this error, by doing the following:
- sudo chgrp stapdev /usr/bin/stap*
- sudo chmod a+s /usr/bin/stap*
Ie, change the group of those stap* binaries to stapdev and that setuid bit is set.
After this, if I do "stap hello.stp" now, the output is:
hello world
rm: cannot remove `/tmp/stapTJfUev': Permission denied
Hmm, so there's still a permission problem removing those temp folders, but it runs, whew...
Not perfect, but some progress... I'm also thinking of just building the latest systemtap from the source, as I recall the newer version doesn't need utrace, which was a problem in opensuse, as last I heard, they don't include it anymore:
http://www.eclipse.org/forums/index.php/mv/msg/201831/#msg_644880
Gurce
|
|
|
Re: problem with linuxtools callgraph usage [message #1231578 is a reply to message #1231550] |
Tue, 14 January 2014 20:02  |
Eclipse User |
|
|
|
Just to follow up:
- I tried building the latest systemtap v2.4 from the source
- This worked better with my "stap hello.stp" example (when run as the current user, no longer have the "rm: cannot remove..." error message at the end)
- In eclipse, it still complains about not having utrace though...
I read a bit more here:
https://sourceware.org/systemtap/wiki/SystemtapOnUbuntu
There was a mention there that utrace is no longer needed for kernels >=3.5.
Aah ok then, in my opensuse11.4, I'm on kernel v2.6.37 right now... So maybe I'll give eclipse+systemtap another try when I upgrade to a newer version of opensuse one day and hopefully things will work out better...
|
|
|
Powered by
FUDForum. Page generated in 0.07533 seconds