DTRACE_PROBE and optimization

Martin Martin martin@infinio.com
Thu Sep 12 15:25:00 GMT 2013


Hi all,

In a user space program, I'm hoping to use DTRACE_PROBE for fault
injection like this:

bool doFault = false;
DTRACE_PROBE1(provider, mark_name, &doFault);
if (doFault) {
   ... inject my fault ...
}

If DTRACE_PROBE1() compiles to a NOOP, can I be sure the compiler
won't think doFault is always false and optimize out the if statement?

Thanks,
Martin



More information about the Systemtap mailing list