From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751419AbdFZILJ (ORCPT ); Mon, 26 Jun 2017 04:11:09 -0400 Received: from mga07.intel.com ([134.134.136.100]:8804 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751353AbdFZILC (ORCPT ); Mon, 26 Jun 2017 04:11:02 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,394,1493708400"; d="asc'?scan'208";a="117448027" Date: Mon, 26 Jun 2017 16:06:26 +0800 From: "Du, Changbin" To: jolsa@kernel.org Cc: peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] perf sort: only insert overhead && overhead_children when no overhead* field given Message-ID: <20170626080626.GA3526@intel.com> References: <1496307801-24134-1-git-send-email-changbin.du@intel.com> <1496377320-6114-1-git-send-email-changbin.du@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="huq684BweRXVnRxX" Content-Disposition: inline In-Reply-To: <1496377320-6114-1-git-send-email-changbin.du@intel.com> 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 --huq684BweRXVnRxX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, Jiri, what is the status of this one? I didn't get a response of v2. thanks. On Fri, Jun 02, 2017 at 12:22:00PM +0800, changbin.du@intel.com wrote: > From: Changbin Du >=20 > If we always insert 'overhead' and 'overhead_children' as sort keys, > this make it impossible to sort as overhead (which displayed as Self) > first.Ths will be a problem if the data is collected with call-graph > enabled. Then we never can sort the result as self-overhead on this > data. And sometimes the data is hard to collect. >=20 > > perf record -ag > > perf report -s overhead,sym >=20 > Samples: 7K of event 'cycles', Event count (approx.): 865138253 > Children Self Symbol > + 26.41% 0.00% [k] verify_cpu > + 26.37% 0.04% [k] cpu_startup_entry > + 25.93% 0.27% [k] do_idle > + 19.88% 0.00% [k] start_secondary > .... >=20 > I intend to sort as 'Self', but actually it sort as 'Children'. >=20 > This patch fix this by only insert overhead && overhead_children > when no overhead* field given. >=20 > Signed-off-by: Changbin Du > --- > v2: Add the example in commit message. >=20 > --- > tools/perf/util/sort.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c > index 5762ae4..69eea3a 100644 > --- a/tools/perf/util/sort.c > +++ b/tools/perf/util/sort.c > @@ -2635,6 +2635,9 @@ static char *setup_overhead(char *keys) > if (sort__mode =3D=3D SORT_MODE__DIFF) > return keys; > =20 > + if (strstr(keys, "overhead")) > + return keys; > + > keys =3D prefix_if_not_in("overhead", keys); > =20 > if (symbol_conf.cumulate_callchain) > --=20 > 2.7.4 >=20 --=20 Thanks, Changbin Du --huq684BweRXVnRxX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJZUMCCAAoJEAanuZwLnPNUiskH/0/zFwm66Oq0gQgXTpoYgShm NpHxiyFxjTQqfNZOGpG+nLEWyJX9bWvHm/obKbC+/JgK+3oGNWEnT0gXnXHrAI5l ar+Lf7b5P+juOFYQRhoVmAcBkhbdBgp1fzGh4P7BOdsqaP0YKfOertLl4kuJJJ4r Dm3R0AeBpB8dRUwMymA2OiV5B4PGmxJU98Dr5LpIwm5rJmv+m4t/TeMRSFa+Fs3D 28IOrsEBirGnuhLcz3tF/Ca/Udc/Z8eUic+JjnkaT0XRBFOLdnd3biRQM5f7XocB 9JSvRZEx8B1duoHdiF4v+W0MmA6umcibYUFNoF2EsQa3LQ8iZlnR0IYZZZXLz3k= =FCp9 -----END PGP SIGNATURE----- --huq684BweRXVnRxX--