* problem in User-Space Probing
@ 2012-03-06 3:17 ch huang
2012-03-06 4:49 ` Srikar Dronamraju
2012-03-06 15:56 ` Frank Ch. Eigler
0 siblings, 2 replies; 3+ messages in thread
From: ch huang @ 2012-03-06 3:17 UTC (permalink / raw)
To: systemtap
i write a test function ,
#include <stdio.h>
static void my_out(void)
{
printf("just a test\n");
}
main()
{
printf("befor function\n");
my_out();
printf("after function\n");
}
and compile it
gcc -g -gdwarf-2 -g3 test.c -o test
then write stap script
probe process("/root/test").function("my_out"){
printf("i in %s\n",pp())
}
probe process("/root/test").function("my_out").return{
printf("back from %s\n",probefunc())
}
when i run this script i find some warning information
# stap exec.stp
/usr/local/share/systemtap/runtime/uprobes/uprobes.c: In function
‘uprobe_report_exec’:
/usr/local/share/systemtap/runtime/uprobes/uprobes.c:2401: warning:
‘uproc’ may be used uninitialized in this function
/usr/local/share/systemtap/runtime/uprobes/uprobes.c: In function
‘uprobe_report_exit’:
/usr/local/share/systemtap/runtime/uprobes/uprobes.c:2101: warning:
‘uproc’ may be used uninitialized in this function
i in process("/root/test").function("my_out@/root/test.c:4")
back from my_out
it seems script works fine ,but i do not know the warning info,is
there something i missed?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: problem in User-Space Probing
2012-03-06 3:17 problem in User-Space Probing ch huang
@ 2012-03-06 4:49 ` Srikar Dronamraju
2012-03-06 15:56 ` Frank Ch. Eigler
1 sibling, 0 replies; 3+ messages in thread
From: Srikar Dronamraju @ 2012-03-06 4:49 UTC (permalink / raw)
To: ch huang; +Cc: systemtap
>
> probe process("/root/test").function("my_out"){
> printf("i in %s\n",pp())
> }
> probe process("/root/test").function("my_out").return{
> printf("back from %s\n",probefunc())
> }
> when i run this script i find some warning information
>
> # stap exec.stp
> /usr/local/share/systemtap/runtime/uprobes/uprobes.c: In function
> ?uprobe_report_exec?:
> /usr/local/share/systemtap/runtime/uprobes/uprobes.c:2401: warning:
> ?uproc? may be used uninitialized in this function
> /usr/local/share/systemtap/runtime/uprobes/uprobes.c: In function
> ?uprobe_report_exit?:
> /usr/local/share/systemtap/runtime/uprobes/uprobes.c:2101: warning:
> ?uproc? may be used uninitialized in this function
> i in process("/root/test").function("my_out@/root/test.c:4")
> back from my_out
>
> it seems script works fine ,but i do not know the warning info,is
> there something i missed?
>
It would have been good if you had given your stap setup details.
I think you are running on a kernel < 2.6.24.
From the code walk through, I dont see a case for uproc being not
initialized. I think its a compiler bug.
https://lkml.org/lkml/2011/11/28/287
--
Thanks and Regards
Srikar
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: problem in User-Space Probing
2012-03-06 3:17 problem in User-Space Probing ch huang
2012-03-06 4:49 ` Srikar Dronamraju
@ 2012-03-06 15:56 ` Frank Ch. Eigler
1 sibling, 0 replies; 3+ messages in thread
From: Frank Ch. Eigler @ 2012-03-06 15:56 UTC (permalink / raw)
To: ch huang; +Cc: systemtap
ch huang <justlooks@gmail.com> writes:
> [...]
> /usr/local/share/systemtap/runtime/uprobes/uprobes.c: In function
> 'uprobe_report_exec':
> /usr/local/share/systemtap/runtime/uprobes/uprobes.c:2401: warning:
> 'uproc' may be used uninitialized in this function
> /usr/local/share/systemtap/runtime/uprobes/uprobes.c: In function
> 'uprobe_report_exit':
> /usr/local/share/systemtap/runtime/uprobes/uprobes.c:2101: warning:
> 'uproc' may be used uninitialized in this function
> i in process("/root/test").function("my_out@/root/test.c:4")
It sounds like some overpicky compiler. Please try adding a
= NULL;
to those declarations on those source files. If it works for you,
please send us that diff/patch to apply to the source tree.
- FChE
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-06 15:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-06 3:17 problem in User-Space Probing ch huang
2012-03-06 4:49 ` Srikar Dronamraju
2012-03-06 15:56 ` Frank Ch. Eigler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).