From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753191AbdCNCTO (ORCPT ); Mon, 13 Mar 2017 22:19:14 -0400 Received: from mga09.intel.com ([134.134.136.24]:39198 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751422AbdCNCTN (ORCPT ); Mon, 13 Mar 2017 22:19:13 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,162,1486454400"; d="asc'?scan'208";a="235681800" Date: Tue, 14 Mar 2017 10:16:44 +0800 From: "Du, Changbin" To: Arnaldo Carvalho de Melo Cc: changbin.du@intel.com, peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf report: show sort_order in title Message-ID: <20170314021644.GA4265@intel.com> References: <20170313083635.24525-1-changbin.du@intel.com> <20170313144714.GO2750@kernel.org> <20170313145718.GP2750@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6c2NcOVqGQ03X4Wi" Content-Disposition: inline In-Reply-To: <20170313145718.GP2750@kernel.org> 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 --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 13, 2017 at 11:57:18AM -0300, Arnaldo Carvalho de Melo wrote: > > I'll just rename this to use the tools/perf/ style for such functions, > > making it: > >=20 > > static int hists__scnprintf_sort_fields(hists, buf, size) >=20 > But then, while testing,=20 >=20 > Before: >=20 > $ perf report > Samples: 405 of event 'cycles', Event count (approx.): 101733003 > Overhead Command Shared Object Symbol > 11.15% swapper [kernel.vmlinux] [k] int= el_idle > 3.00% firefox libxul.so [.] 0x0= 000000001298b8d > 1.74% swapper [kernel.vmlinux] [k] upd= ate_blocked_averages > 1.69% qemu-system-x86 [kernel.vmlinux] [k] __f= get > 1.18% swapper [kernel.vmlinux] [k] upd= ate_wall_time >=20 > Tip: Save output of perf stat using: perf stat record >=20 > After: >=20 > $ perf report > Samples: 405 of event 'cycles', Event count (approx.): 101733003, Sort= by: Children,Overhead,Command,Shared Object,Symbol > Overhead Command Shared Object Symbol > 11.15% swapper [kernel.vmlinux] [k] int= el_idle > 3.00% firefox libxul.so [.] 0x0= 000000001298b8d > 1.74% swapper [kernel.vmlinux] [k] upd= ate_blocked_averages > 1.69% qemu-system-x86 [kernel.vmlinux] [k] __f= get > 1.18% swapper [kernel.vmlinux] [k] upd= ate_wall_time >=20 >=20 > I see now duplication of info, where is the value? Can you show the useca= se in > a compelling way? >=20 > - Arnaldo Thanks for trying. The key idea is to show how does the data sort, especial= ly the first sort key. When I use some GUI based perf tool, I can see how my data is sorted by checking the report header status. I think this is a good for browser. You are right, the info is duplicated. I got another idea that we show a '= =E2=86=93' at the header string and only for the first sort key. What do you think? $ perf report Samples: 405 of event 'cycles', Event count (approx.): 101733003 =E2=86=93Overhead Command Shared Object = Symbol 11.15% swapper [kernel.vmlinux] [k] inte= l_idle 3.00% firefox libxul.so [.] 0x00= 00000001298b8d 1.74% swapper [kernel.vmlinux] [k] upda= te_blocked_averages Another idea I want to add is to support dynamic sorting. For me, I use per= f to analysing entire system performance, and the data is very large. Then somet= imes it take as long as ~10 minitues to read perf data. So I think if we can cha= nge sort w/o reload data will be good. --=20 Thanks, Changbin Du --6c2NcOVqGQ03X4Wi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJYx1KMAAoJEAanuZwLnPNUD6IH/RGEKKlRiJ5fhyvMn4eLtHcc ydsGB6jzutP7YXPl1jiURG8Lg4Eccd9bEGOUoWH0HbgRyK1cuu7tIoYjIYh+OYHk y++pqNPYoqlomdr/N+EZ0mj3gjU+2O3mHzSg0YKOnHEC3Ub3oZTqzTGDCPQQ4Dpk aIZOsERtmLevRwBneorQrpqL230YlZFqJk4Af+cTkgn+E4ApR3Pjm7OcxAHpKaEM /U/XYYKBoymMgRnevdLf29F6bdYI2tFJHKrwr+PfI6WRlZYNpLSgaHAp4B2hbm+p +EPP16H4oyUSzI6E9lqrT6OUQLI7JiPpsrgoumj/tg9fr5DDA/R4U/MbTR3kk4w= =luVh -----END PGP SIGNATURE----- --6c2NcOVqGQ03X4Wi--