lkml.org 
[lkml]   [2015]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Re: [RFC PATCH perf/core v2 00/16] perf-probe --cache and SDT support
G'Day Masami-san, Namhyung,

I'm really looking forward to this feature -- very useful, thanks!...

On Sat, Jul 18, 2015 at 9:24 PM, Namhyung Kim <namhyung@kernel.org> wrote:
> Hi Masami,
>
> On Fri, Jul 17, 2015 at 12:21:42PM +0900, Masami Hiramatsu wrote:
>> Now I'm thinking that we should avoid using %event syntax for perf-list
>> and perf-record to avoid confusion. For example, suppose that we have
>> "libfoo:bar" SDT event, when we just scanned the libfoo binary and
>> use it via perf-record, we'll run perf record -e "%libfoo:bar".
>> However, after we set the probe via perf-probe, we have to run
>> perf record -e "libfoo:bar". That difference looks no good.
>> So, I think in both case it should accept -e "libfoo:bar" syntax.
>
> I don't remember how the SDT events should be shown to users. Sorry
> if I'm missing something here.
>
> AFAIK an SDT event consists of a provider and an event name. So it
> can be simply 'provider:event' like tracepoints or
> 'binary:provider_event' like uprobes.
>
> I like the former because it's simpler but it needs to guarantee that
> it doesn't clash with existing tracepoints/[ku]probes. So IIUC we
> chose the '%' sign to distinguish them. But after setting a probe at
> it, the group name should be the binary name. So the whole event name
> might be changed, and this is not good.

I don't think we should worry about the clash, as the provider name
should differentiate. So I think "libfoo:bar" with perf record is
better. After adding them to the cache (via % if needed), I'd think
they would be best looking like tracepoints. Eg, listing them together
they can be differentiated, something like:

# perf list
[...]
block:block_rq_abort [Tracepoint event]
block:block_rq_requeue [Tracepoint event]
block:block_rq_complete [Tracepoint event]
[...]
libc:memory_heap_new [User tracepoint event]
libc:memory_heap_free [User tracepoint event]
libc:memory_heap_more [User tracepoint event]
[...]

Then used the same.

Brendan


\
 
 \ /
  Last update: 2015-07-20 08:01    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog