All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Hemant Kumar <hemant@linux.vnet.ibm.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	LKML <linux-kernel@vger.kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Ingo Molnar <mingo@redhat.com>, Paul Mackerras <paulus@samba.org>,
	Jiri Olsa <jolsa@kernel.org>, Borislav Petkov <bp@suse.de>
Subject: Re: Re: [RFC PATCH perf/core v2 00/16] perf-probe --cache and SDT support
Date: Tue, 21 Jul 2015 01:20:29 +0900	[thread overview]
Message-ID: <20150720162029.GC9265@danjae.kornet> (raw)
In-Reply-To: <CAE40pdcfo+cNW59=HnjVCygnNiJR-OX17imfE0NgVoOe3a4_-g@mail.gmail.com>

Hi Brendan,

On Sun, Jul 19, 2015 at 10:47:31PM -0700, Brendan Gregg wrote:
> 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.

But there's no guarantee.  Maybe an userspace tool which deals with a
kernel module has SDT names as same as the kernel module's tracepoint
names.  It might or might not be a problem if we can handle those
duplicate names somehow.


> 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.

Yes, as I said I also prefer this simpler form.  Maybe we can choose
to use another names for low-level plumbing inside the perf tools, but
I still think that users should be able to use simple names like above.

Thanks,
Namhyung

  reply	other threads:[~2015-07-20 16:22 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-15  9:13 [RFC PATCH perf/core v2 00/16] perf-probe --cache and SDT support Masami Hiramatsu
2015-07-15  9:14 ` [RFC PATCH perf/core v2 01/16] perf probe: Simplify __add_probe_trace_events code Masami Hiramatsu
2015-07-21  9:34   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2015-07-15  9:14 ` [RFC PATCH perf/core v2 02/16] perf probe: Move ftrace probe-event operations to probe-file.c Masami Hiramatsu
2015-07-21  9:35   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2015-07-15  9:14 ` [RFC PATCH perf/core v2 03/16] perf probe: Use strbuf for making strings in probe-event.c Masami Hiramatsu
2015-07-17  7:42   ` Namhyung Kim
2015-07-17 10:16     ` Masami Hiramatsu
2015-07-15  9:14 ` [RFC PATCH perf/core v2 04/16] perf-buildid-cache: Use path/to/bin/buildid/elf instead of path/to/bin/buildid Masami Hiramatsu
2015-07-15  9:14 ` [RFC PATCH perf/core v2 05/16] perf buildid: Use SBUILD_ID_SIZE macro Masami Hiramatsu
2015-07-20 18:47   ` Arnaldo Carvalho de Melo
2015-07-21  9:35   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2015-07-15  9:14 ` [RFC PATCH perf/core v2 06/16] perf buildid: Introduce sysfs/filename__sprintf_build_id Masami Hiramatsu
2015-07-15  9:14 ` [RFC PATCH perf/core v2 07/16] perf: Add lsdir to read a directory Masami Hiramatsu
2015-07-15  9:14 ` [RFC PATCH perf/core v2 08/16] perf-buildid-cache: Use lsdir for looking up buildid caches Masami Hiramatsu
2015-07-15  9:14 ` [RFC PATCH perf/core v2 09/16] perf probe: Add --cache option to cache the probe definitions Masami Hiramatsu
2015-07-15  9:15 ` [RFC PATCH perf/core v2 10/16] perf probe: Use cache entry if possible Masami Hiramatsu
2015-07-15  9:15 ` [RFC PATCH perf/core v2 11/16] perf probe: Show all cached probes Masami Hiramatsu
2015-07-15  9:15 ` [RFC PATCH perf/core v2 12/16] perf probe: Remove caches when --cache is given Masami Hiramatsu
2015-07-15  9:15 ` [RFC PATCH perf/core v2 13/16] perf/sdt: ELF support for SDT Masami Hiramatsu
2015-07-15  9:15 ` [RFC PATCH perf/core v2 14/16] perf probe: Add group name support Masami Hiramatsu
2015-07-19 10:16   ` Namhyung Kim
2015-07-20  4:48     ` Masami Hiramatsu
2015-07-20 15:31       ` Namhyung Kim
2015-07-15  9:15 ` [RFC PATCH perf/core v2 15/16] perf buildid-cache: Scan and import user SDT events to probe cache Masami Hiramatsu
2015-07-19 10:46   ` Namhyung Kim
2015-07-20  3:19     ` Masami Hiramatsu
2015-07-20 15:52       ` Namhyung Kim
2015-07-21 10:42         ` Masami Hiramatsu
2015-07-15  9:15 ` [RFC PATCH perf/core v2 16/16] perf probe: Accept %sdt and %cached event name Masami Hiramatsu
2015-07-19 10:53   ` Namhyung Kim
2015-07-20  3:03     ` Masami Hiramatsu
2015-07-16  3:13 ` [RFC PATCH perf/core v2 00/16] perf-probe --cache and SDT support Hemant Kumar
2015-07-17  3:21   ` Masami Hiramatsu
2015-07-19  4:24     ` Namhyung Kim
2015-07-20  5:47       ` Brendan Gregg
2015-07-20 16:20         ` Namhyung Kim [this message]
2015-07-21 10:34           ` Masami Hiramatsu
2015-07-22 14:12     ` Hemant Kumar
2015-07-23 13:13       ` Masami Hiramatsu
2015-07-23 14:01         ` Arnaldo Carvalho de Melo
2015-07-23 16:24           ` Masami Hiramatsu
2015-07-23 16:42             ` Arnaldo Carvalho de Melo
2015-07-24  7:55             ` Namhyung Kim
2015-07-24 15:52               ` Arnaldo Carvalho de Melo
2015-07-25  0:51                 ` Masami Hiramatsu
2015-07-27 14:03                 ` Re: " Namhyung Kim
2015-07-27 15:16                   ` Arnaldo Carvalho de Melo
2015-07-28  0:42                     ` Masami Hiramatsu
2015-07-28 13:45                       ` Arnaldo Carvalho de Melo
2015-07-20 18:36 ` Arnaldo Carvalho de Melo
2015-07-20 18:42   ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150720162029.GC9265@danjae.kornet \
    --to=namhyung@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=bp@suse.de \
    --cc=brendan.d.gregg@gmail.com \
    --cc=hemant@linux.vnet.ibm.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.