Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750997AbdCOCOI (ORCPT ); Tue, 14 Mar 2017 22:14:08 -0400 Received: from mga03.intel.com ([134.134.136.65]:23569 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750835AbdCOCOG (ORCPT ); Tue, 14 Mar 2017 22:14:06 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,166,1486454400"; d="asc'?scan'208";a="75497381" Date: Wed, 15 Mar 2017 10:11:37 +0800 From: "Du, Changbin" To: Arnaldo Carvalho de Melo Cc: "Du, Changbin" , peterz@infradead.org, Namhyung Kim , Jiri Olsa , Wang Nan , David Ahern , Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf report: show sort_order in title Message-ID: <20170315021137.GB28871@intel.com> References: <20170313083635.24525-1-changbin.du@intel.com> <20170313144714.GO2750@kernel.org> <20170313145718.GP2750@kernel.org> <20170314021644.GA4265@intel.com> <20170314130416.GB3089@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QTprm0S8XgL7H0Dt" Content-Disposition: inline In-Reply-To: <20170314130416.GB3089@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 Content-Length: 3975 Lines: 115 --QTprm0S8XgL7H0Dt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 14, 2017 at 10:04:16AM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Mar 14, 2017 at 10:16:44AM +0800, Du, Changbin escreveu: > > On Mon, Mar 13, 2017 at 11:57:18AM -0300, Arnaldo Carvalho de Melo wrot= e: > > > But then, while testing,=20 >=20 > > > Before: >=20 > > > $ perf report > > > Samples: 405 of event 'cycles', Event count (approx.): 101733003 > > > Overhead Command Shared Object Sym= bol > > > 11.15% swapper [kernel.vmlinux] [k]= intel_idle >=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 Sym= bol > > > 11.15% swapper [kernel.vmlinux] [k]= intel_idle >=20 > > > I see now duplication of info, where is the value? Can you show the u= secase in > > > a compelling way? > =20 > > Thanks for trying. The key idea is to show how does the data sort, espe= cially > > 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. > =20 > > 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? > =20 > > $ perf report > > Samples: 405 of event 'cycles', Event count (approx.): 101733003 > > =E2=86=93Overhead Command Shared Object = Symbol >=20 > this is much more compact, but you need to make it abundantly clear what > you are trying to achieve by showind counter examples were what we get > on that line starting with your suggested marker isn't the sort order. > Otherwise even a character is one too much :-) >=20 Yes, I just want get know how does perf data sort. Because sometimes the real sort order doesn't match the '-s' option I given. In this case, I was confused about the sorting before reading into the code. > > 11.15% swapper [kernel.vmlinux] [k] = intel_idle > > 3.00% firefox libxul.so [.] = 0x0000000001298b8d > > 1.74% swapper [kernel.vmlinux] [k] = update_blocked_averages >=20 > > Another idea I want to add is to support dynamic sorting. For me, I use= perf to > > analysing entire system performance, and the data is very large. Then s= ometimes > > it take as long as ~10 minitues to read perf data. So I think if we can= change > > sort w/o reload data will be good. >=20 > And in some cases it is even possible! I.e. if you haven't collapsed too > much, you will not have to reprocess the file to get to the new order. >=20 > BTW, have you played with: >=20 > perf top --hierarchy >=20 > Try it with -g and --call-graph dwarf >=20 > Also try: >=20 > perf report --hierarchy >=20 > - Arnaldo Sounds great! I tried '--hierarchy' option, but still don't know how to resort the report. Could you give a hint? --=20 Thanks, Changbin Du --QTprm0S8XgL7H0Dt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJYyKLZAAoJEAanuZwLnPNUS+kH/i24qyFn64z4fMGbOLtpau47 dDcK4nNEbpFP+W+pzTqXhp4gKIr1nmBXaawPftwjPYLHHVHrRYFjyhdMl843vvRF 3k83BqrxhU1MO2CRopfvF0gMRO4ZsFo69xnZ06uTRw3UnAd99SElZh2aI+Jo5CiL P/HY8/ws+3c1cgFv0hL7eO4KaI2HsulroipUuia+cXZw0yymj4HAeaLBgTOxWYDt BfG2Qp/n6uOAaTgJ/FDWe1bkHjrfj8OfTU2ildKiNaXcc1hsYEo5LzDQXQZaKr83 tn78Hvk8EAVewrv3rFcAotBbNXiXOCAkRqd+Ig3nex2rgSTMLnt77fHyoLfoOIA= =jBBX -----END PGP SIGNATURE----- --QTprm0S8XgL7H0Dt--