Eliding side-effect-free expression?
Dave Nomura
dcnltc@us.ibm.com
Tue Dec 11 17:25:00 GMT 2007
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
More information about the Systemtap
mailing list