From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933041AbbLTODd (ORCPT ); Sun, 20 Dec 2015 09:03:33 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:33655 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752086AbbLTODc (ORCPT ); Sun, 20 Dec 2015 09:03:32 -0500 Date: Sun, 20 Dec 2015 23:02:47 +0900 From: Namhyung Kim To: Jiri Olsa Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , LKML , David Ahern , Steven Rostedt , Frederic Weisbecker , Andi Kleen , Wang Nan Subject: Re: [PATCH 05/10] perf tools: Add dynamic sort key for tracepoint events Message-ID: <20151220140247.GA30977@danjae.kornet> References: <1450193743-4409-1-git-send-email-namhyung@kernel.org> <1450193743-4409-6-git-send-email-namhyung@kernel.org> <20151220135132.GA17267@krava.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20151220135132.GA17267@krava.local> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jiri, On Sun, Dec 20, 2015 at 02:51:32PM +0100, Jiri Olsa wrote: > On Wed, Dec 16, 2015 at 12:35:38AM +0900, Namhyung Kim wrote: > > SNIP > > > + > > + if (!len) > > + len = hde_width(hde); > > + > > + return len; > > +} > > + > > +static int __sort__hde_entry(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, > > + struct hist_entry *he) > > +{ > > + struct hpp_dynamic_entry *hde; > > + size_t len = fmt->user_len; > > + struct trace_seq seq; > > + int ret; > > + > > + hde = container_of(fmt, struct hpp_dynamic_entry, hpp); > > + > > + if (!len) > > + len = hde_width(hde); > > + > > + if (hists_to_evsel(he->hists) != hde->evsel) > > + return scnprintf(hpp->buf, hpp->size, "%*.*s", len, len, "N/A"); > > hum, how can this happen? ... "hists_to_evsel(he->hists) != hde->evsel" If there's more than one event, a dynamic sort key is defined for one event. So other events should not be affected by the sort key and show "N/A" in the output. Thanks, Namhyung