On Wed, 2013-09-04 at 15:49 +0900, Namhyung Kim wrote:On Tue, 03 Sep 2013 18:53:17 +0530, Hemant wrote:It mentions them, but should normally not be used. They are there forOn 09/03/2013 02:47 PM, Masami Hiramatsu wrote:It seems it's not. I see the SDT v3 document still mentions semaphores.Indeed, and also I'd like to know what versions of SDT this support,
and where we can see the technical document of that. As far as I know,
the previous(?) SDT implementation also involves ugly semaphores.
Have that already gone?
dtrace (source) compatibility. And you don't have to use them.
Since normally a SDT probe marker is just a NOP it doesn't have any
overhead. But if you want to add complicated arguments that you would
normally not generate in your code, then you might want to add a
semaphore. That way you can have probes with a bit more overhead that
still have zero overhead when not being probed.
Note that if you use the normal DTRACE_PROBE macros no semaphore will be
inserted. And you can opt to not support probes that have a semaphore in
perf if you think that is easier (just check the semaphore link-time
address for the probe, it should normally be zero). Just warn: "No way I
am going to probe something that might have a little extra overhead! I
am no debugger..." :)
Yes, that should be the canonical description.This link shows an example of marker probing with Systemtap:I think the link below would be more helpful for us :)
https://sourceware.org/systemtap/wiki/AddingUserSpaceProbingToApps
http://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation
Cheers,
Mark