From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934166AbbIDWxA (ORCPT ); Fri, 4 Sep 2015 18:53:00 -0400 Received: from mail.kernel.org ([198.145.29.136]:33120 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933970AbbIDWw7 (ORCPT ); Fri, 4 Sep 2015 18:52:59 -0400 Date: Fri, 4 Sep 2015 19:52:55 -0300 From: Arnaldo Carvalho de Melo To: kan.liang@intel.com Cc: jolsa@kernel.org, namhyung@kernel.org, adrian.hunter@intel.com, eranian@google.com, ak@linux.intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/5] perf,tools: Support new sort type --socket Message-ID: <20150904225255.GF3475@kernel.org> References: <1441377946-44429-1-git-send-email-kan.liang@intel.com> <1441377946-44429-2-git-send-email-kan.liang@intel.com> <20150904224139.GC3475@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150904224139.GC3475@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, Sep 04, 2015 at 07:41:39PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Fri, Sep 04, 2015 at 10:45:43AM -0400, kan.liang@intel.com escreveu: > > From: Kan Liang > > > > This patch enable perf report to sort by processor socket > > > > $ perf report --stdio --sort socket,comm,dso,symbol > > # To display the perf.data header info, please use > > --header/--header-only options. > > # > > # > > # Total Lost Samples: 0 > > # > > # Samples: 686 of event 'cycles' > > # Event count (approx.): 349215462 > > # > > # Overhead SOCKET Command Shared Object Symbol > > # ........ ...... ......... ................ > > ................................. > > So this works in 'perf top' only for the first screen rendering, when it > refreshes we lose the "SOCKET" header (why all caps?) and the colum > stops being %03d and instead becomes %d, I am checking now. Patch below fix this, but we stumble in another problem, when zooming it is not eliding the SOCKET column, i.e. if we're zooming into a column, it will have the same value for all entries, no use in showing it, save some columns, will check that as well. Will fold the fixes to the patches where the problems were introduced, the feature is cool, one more zoom! :-) Thanks, - Arnaldo diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index bb633cd4730a..67b48616ab31 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -146,6 +146,7 @@ void hists__calc_col_len(struct hists *hists, struct hist_entry *h) hists__set_unres_dso_col_len(hists, HISTC_MEM_DADDR_DSO); } + hists__new_col_len(hists, HISTC_SOCKET, 6); hists__new_col_len(hists, HISTC_MEM_LOCKED, 6); hists__new_col_len(hists, HISTC_MEM_TLB, 22); hists__new_col_len(hists, HISTC_MEM_SNOOP, 12);