This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

DTRACE_PROBE and optimization


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]