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]

[Bug runtime/10013] Support ENABLED sdt probe macro


------- Additional Comments From mjw at redhat dot com  2009-04-05 22:22 -------
(In reply to comment #3)
> This optimization is the same as in the "move immediate" kernel markers.
> However, it is not a *substitute* for a trap.  It is only a substitute
> for a condition evaluation.
> [...]
> You still need some way to enter the kernel.

It isn't meant as substitute of the trap. That will still be the STAP_PROBE itself.

So the idea is that when enabling a probe, you first enable the PROBE itself,
replacing the nop with a trap, then, if there is also an associated ENABLED
conditional, you replace the move to enable the code path leading to the probe.
So user code would be written as:

if (STAP_PROBE_ENABLED(myapp, mymark))
 {
   do_expensive_argument_setup();
   STAP_PROBE(myapp, mymark, args);
 }

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10013

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


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