public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* DTRACE_PROBE and optimization
@ 2013-09-12 15:25 Martin Martin
  2013-09-12 18:09 ` Josh Stone
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Martin @ 2013-09-12 15:25 UTC (permalink / raw)
  To: systemtap

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-12 18:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-12 15:25 DTRACE_PROBE and optimization Martin Martin
2013-09-12 18:09 ` Josh Stone

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).