From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933067AbbLNWcM (ORCPT ); Mon, 14 Dec 2015 17:32:12 -0500 Received: from mail-oi0-f53.google.com ([209.85.218.53]:34535 "EHLO mail-oi0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932725AbbLNWcI (ORCPT ); Mon, 14 Dec 2015 17:32:08 -0500 Subject: Re: [RFC/PATCHSET 0/6] perf tools: Support dynamic sort keys for tracepoints (v1) To: Arnaldo Carvalho de Melo , Namhyung Kim References: <1450107973-2447-1-git-send-email-namhyung@kernel.org> <20151214174723.GT6843@kernel.org> Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , Steven Rostedt , Frederic Weisbecker , Andi Kleen , Wang Nan From: David Ahern Message-ID: <566F4366.3070601@gmail.com> Date: Mon, 14 Dec 2015 15:32:06 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20151214174723.GT6843@kernel.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/14/15 10:47 AM, Arnaldo Carvalho de Melo wrote: >> With dynamic sort keys, you can use 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 :-) > 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.