Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1291765

Re: [RFC/PATCHSET 0/6] perf tools: Support dynamic sort keys for tracepoints (v1)

Path csiph.com!au2pb.net!2.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!nntpspool01.opticnetworks.net!aioe.org!bofh.it!news.nic.it!robomod
From Namhyung Kim <namhyung@kernel.org>
Newsgroups linux.kernel
Subject Re: [RFC/PATCHSET 0/6] perf tools: Support dynamic sort keys for tracepoints (v1)
Date Tue, 15 Dec 2015 02:50:01 +0100
Message-ID <qFMUx-5Li-3@gated-at.bofh.it> (permalink)
References <qFDxU-83l-1@gated-at.bofh.it> <qFFq3-Q8-21@gated-at.bofh.it> <qFJWH-3Ss-57@gated-at.bofh.it>
X-Original-To David Ahern <dsahern@gmail.com>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=t5zoYGhuIbICQveqx27bkvRzXmxjrj/pznIid85EPLA=; b=NuhQPdBTJ0Ygz/q5R4mFA798HAKyK4ixs/JgmSz6GA7UwGibPAHtkHVhqkURH2X9nI YHSf9AukN0xqK9cfD+ki4BjgRyWEIXG5vJs/IIJdkUC+eMSdycf6ChvGCCm0o3OGi30F vBA/qAWjyBx6mh2EoBUOd97bjm5UhKkpEeAYk2owr4Yn7xE35I46MkJBPeQ0vekUO3Al 9ZWdLhKhmvYZgwY4aKuU9E3w2C5ZRqxzlDt3Nnabul4qxp2DE38mY88ltGqQYhcZneLi vCnxgFtdsDmZ0SamS8DC5cgmT7FbDqjtuf5lKQA4xByeFfv6UjRXFwZbF9iwOxd1JJhO vJ/w==
X-Received by 10.66.62.137 with SMTP id y9mr51219173par.123.1450143753963; Mon, 14 Dec 2015 17:42:33 -0800 (PST)
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Disposition inline
User-Agent Mutt/1.5.24 (2015-08-30)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 90
Organization linux.* mail to news gateway
X-Original-Cc Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>, Ingo Molnar <mingo@kernel.org>, Peter Zijlstra <a.p.zijlstra@chello.nl>, Jiri Olsa <jolsa@redhat.com>, LKML <linux-kernel@vger.kernel.org>, Steven Rostedt <rostedt@goodmis.org>, Frederic Weisbecker <fweisbec@gmail.com>, Andi Kleen <andi@firstfloor.org>, Wang Nan <wangnan0@huawei.com>
X-Original-Date Tue, 15 Dec 2015 10:41:52 +0900
X-Original-Message-ID <20151215014152.GA32522@danjae.kornet>
X-Original-References <1450107973-2447-1-git-send-email-namhyung@kernel.org> <20151214174723.GT6843@kernel.org> <566F4366.3070601@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1291765

Show key headers only | View raw


Hi David and Arnaldo,

On Mon, Dec 14, 2015 at 03:32:06PM -0700, David Ahern wrote:
> On 12/14/15 10:47 AM, Arnaldo Carvalho de Melo wrote:
> >>With dynamic sort keys, you can use <event.field> as a sort key.  Those
> >>dynamic keys are checked and created on demand.  For instance, below is
> >>to sort by next_pid field on the same data file.
> >>
> >>   $ perf report -s comm,sched:sched_switch.next_pid --stdio
> >>   ...
> >>   # Overhead  Command            next_pid
> >>   # ........  ...............  ..........
> >>   #
> >>       21.23%  transmission-gt           0
> >>       20.86%  swapper               17773
> >>        6.62%  netctl-auto               0
> >>        5.25%  swapper                 109
> >>        5.21%  kworker/0:1H              0
> >>        1.98%  Xephyr                    0
> >>        1.98%  swapper                6524
> >>        1.98%  swapper               27478
> >>        1.37%  swapper               27476
> >>        1.17%  swapper                 233
> >>
> >>Multiple dynamic sort keys are also supported:
> >>
> >>   $ perf report -s comm,sched:sched_switch.next_pid,sched:sched_switch.next_comm --stdio
> >>   ...
> >>   # Overhead  Command            next_pid         next_comm
> >>   # ........  ...............  ..........  ................
> >>   #
> >>       20.86%  swapper               17773   transmission-gt
> >>        9.64%  transmission-gt           0         swapper/0
> >>        9.16%  transmission-gt           0         swapper/2
> >>        5.25%  swapper                 109      kworker/0:1H
> >>        5.21%  kworker/0:1H              0         swapper/0
> >>        2.14%  netctl-auto               0         swapper/2
> >>        1.98%  netctl-auto               0         swapper/0
> >>        1.98%  swapper                6524            Xephyr
> >>        1.98%  swapper               27478       netctl-auto
> >>        1.78%  transmission-gt           0         swapper/3
> >>        1.53%  Xephyr                    0         swapper/0
> >>        1.29%  netctl-auto               0         swapper/1
> >>        1.29%  swapper               27476       netctl-auto
> >>        1.21%  netctl-auto               0         swapper/3
> >>        1.17%  swapper                 233    irq/33-iwlwifi
> >>
> >>Note that pid 0 exists for each cpu so have comm of 'swapper/N'.
> >
> >>This is available on 'perf/dynamic-sort-v1' branch in my tree
> >>
> >>   git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git
> >>
> >>Any comments are welcome, thanks!
> >>Namhyung
> >
> >I'll look at the patches for style, but the idea is so nice and natural
> >I thought about blind merging it :-)

Hehe, thanks!


> 
> yes, that is a cool feature.
> 
> For scheduling tracepoints the analysis could be added to perf-sched to ease
> the burden of the command line syntax.

Yes, the existing tracepoints analysis command might use or wrap it.

For command line syntax, I think it'd be better to provide shorter way
to identify the events - like (non-ambiguous) substring match or
positional parameter (e.g. %1 for first event).

For example, the last example above can be:

  $ perf report -s comm,switch.next_pid,switch.next_comm

or

  $ perf report -s comm,%1.next_pid,%1.next_comm


Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC/PATCHSET 0/6] perf tools: Support dynamic sort keys for tracepoints (v1) Namhyung Kim <namhyung@kernel.org> - 2015-12-14 16:50 +0100
  [PATCH 1/6] perf hist: Pass struct sample to __hists__add_entry() Namhyung Kim <namhyung@kernel.org> - 2015-12-14 16:50 +0100
  [PATCH 3/6] tools lib traceevent: Factor out and export print_event_field() Namhyung Kim <namhyung@kernel.org> - 2015-12-14 16:50 +0100
  [PATCH 4/6] perf tools: Pass evlist to setup_sorting() Namhyung Kim <namhyung@kernel.org> - 2015-12-14 16:50 +0100
  [PATCH 2/6] perf hist: Save raw_data/size for tracepoint events Namhyung Kim <namhyung@kernel.org> - 2015-12-14 16:50 +0100
  Re: [RFC/PATCHSET 0/6] perf tools: Support dynamic sort keys for  tracepoints (v1) Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-14 18:50 +0100
    Re: [RFC/PATCHSET 0/6] perf tools: Support dynamic sort keys for  tracepoints (v1) David Ahern <dsahern@gmail.com> - 2015-12-14 23:40 +0100
      Re: [RFC/PATCHSET 0/6] perf tools: Support dynamic sort keys for  tracepoints (v1) Namhyung Kim <namhyung@kernel.org> - 2015-12-15 02:50 +0100

csiph-web