Messages in this thread | | | Date | Wed, 7 Mar 2018 09:57:05 +0100 | From | Peter Zijlstra <> | Subject | Re: [RFC 3/4] trace_uprobe: Support SDT markers having semaphore |
| |
On Wed, Mar 07, 2018 at 02:16:13PM +0530, Ravi Bangoria wrote: > > W.T.H. is that called a semaphore? afaict its just a usage-counter. > > I totally agree with you. But it's not me who named it semaphore :) > > Please refer to "Semaphore Handling" section at: > https://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation > > We can surly name it differently in the kernel code and document it > properly in the Documents/tracing/
Yes, just because the SDT people failed their CS101 class doesn't mean we need to perpetuate that failure. Please name it sensibly in our code.
> > Also, would it not be much better to do userspace jump-labels for this? > > That completely avoids the dynamic branch at the SDT site. > > > > Userspace jump-label is a good idea but... > > Semaphore logic has already became a kinda ABI now. Tools like bcc, > gdb, systemtap etc. flip the semaphore while probing the marker.
*groan*.. maybe suggest it for the next version; it appears we're already at SDTv3, so surely there will be a v4 too.
| |