This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [RFC PATCH 0/2] Perf support to SDT markers
- From: Mark Wielaard <mjw at redhat dot com>
- To: Hemant <hkshaw at linux dot vnet dot ibm dot com>
- Cc: Namhyung Kim <namhyung at kernel dot org>, Masami Hiramatsu <masami dot hiramatsu dot pt at hitachi dot com>, Ingo Molnar <mingo at kernel dot org>, linux-kernel at vger dot kernel dot org, srikar at linux dot vnet dot ibm dot com, peterz at infradead dot org, oleg at redhat dot com, mingo at redhat dot com, anton at redhat dot com, systemtap at sourceware dot org
- Date: Wed, 04 Sep 2013 20:52:15 +0200
- Subject: Re: [RFC PATCH 0/2] Perf support to SDT markers
- Authentication-results: sourceware.org; auth=none
- References: <20130903072944 dot 4793 dot 93584 dot stgit at hemant-fedora> <20130903082503 dot GA20732 at gmail dot com> <5225A937 dot 2050507 at hitachi dot com> <5225E2C5 dot 3080001 at linux dot vnet dot ibm dot com> <87a9jtt72j dot fsf at sejong dot aot dot lge dot com> <1378283148 dot 4321 dot 16 dot camel at bordewijk dot wildebeest dot org> <522777FF dot 2040906 at linux dot vnet dot ibm dot com>
On Wed, 2013-09-04 at 23:42 +0530, Hemant wrote:
> On 09/04/2013 01:55 PM, Mark Wielaard wrote:
> > 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..." :)
>
> I agree. There will be an extra overhead but there may be some important
> markers (on which we need to probe) may be worth this overhead?
Yes, there maybe. And gdb and stap do support them. But it means not
just setting the probe, but also incrementing (and decrementing) the
semaphore. See "Semaphore Handling" under
https://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation
Which is extra work, so for a minimal implementation that just supports
normal (no-overhead) probes you might want to skip the extra work
required to support them. I believe they are normally not used. I
wouldn't recommend them and when I have added SDT probes myself I never
used/needed them, but I haven't actually looked what others do.
Cheers,
Mark