lkml.org 
[lkml]   [2014]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Re: [PATCH v4 5/5] perf/sdt: Add support to perf record to trace SDT events
(2014/11/06 11:15), Josh Stone wrote:
> On 11/05/2014 01:05 AM, Masami Hiramatsu wrote:
>> [Off topic] I really don't like that the current SDT's semaphore. If the user apps
>> see the instruction at the probe point, it is easy to check whether the event is
>> enabled or not. Thus I recommend to change its implementation and update version
>> instead of supporting current semaphore by perftools.
>
> You and I have banged heads on this before, but I don't think checking
> the instruction is a simple as you seem to think. I invite you to
> prototype this, and if you get it working we can discuss the tradeoffs.

Would you have the prototype? I'd like to look :)

> The good news is that other tools (stap and gdb) won't need to care. If
> the SDT semaphore goes automatic, then we can just set that note field
> to zero, unused from the tool's perspective.
>
> Another tactic is to just discourage developers from using the semaphore
> in the first place, as it's a completely optional feature. The marker
> is just a NOP, so adding some "if (enabled) {...}" around it is often a
> useless load and branch. It does make sense if the probe wants to
> provide some expensively-computed arguments though, like cpython does to
> prepare a function name string. So if you see a project testing the
> semaphore around simple arguments, I'd suggest they just probe directly
> instead.

I see, and we did that on qemu. I consider that someone maybe use
it in the future unless we remove it. If we can succeed to discourage
people using semaphore, we also should remove it.

Thank you,


--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com




\
 
 \ /
  Last update: 2014-11-06 07:01    [W:0.901 / U:0.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site