This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Eliding side-effect-free expression?
- From: Dave Nomura <dcnltc at us dot ibm dot com>
- To: systemtap at sourceware dot org
- Date: Tue, 11 Dec 2007 09:24:45 -0800
- Subject: Eliding side-effect-free expression?
- Organization: LTC Power Linux Toolchain
- Reply-to: dcnltc at us dot ibm dot com
I have a tapscript that contains the following in the begin probe:
function init_qtrace ()
{
// pull in all of the tapsets needed for generating qtrace format
qtrace_cpu_init()
qtrace_init()
}
qtrace_cpu_init() is defined in an i386/ subdirectory and earlier stap
analysis reports:
Searched 'qtrace/*.stp', found 2
Searched 'qtrace/i386/*.stp', found 1
so I think it found the cpuinit.stp script in that defines
qtrace_cpu_init() but I get the following message:
Eliding side-effect-free expression identifier 'qtrace_cpu_init' at
qtrace/qtrace.stp:1502:2
If I look at the generated C for 'function_init_qtrace' it appears to
have removed the call to the tap function qtrace_cpu_init() which is
defined as:
function qtrace_cpu_init ()
%{ printk("qtrace_cpu_init called\n");
/* Initialize all structures, addrs and hardware specific to the
CPU */
if (!qtrace_cpu_init()) {
printk("Error in initializing cpu data\n");
}
%}
So, my question is, why did STAP decide that this function
qtrace_cpu_init() is side-effect free?
--
Dave Nomura
LTC Linux Power Toolchain