From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751153AbdFBD1D (ORCPT ); Thu, 1 Jun 2017 23:27:03 -0400 Received: from mga05.intel.com ([192.55.52.43]:22572 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751120AbdFBD1B (ORCPT ); Thu, 1 Jun 2017 23:27:01 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,283,1493708400"; d="asc'?scan'208";a="94645017" Date: Fri, 2 Jun 2017 11:22:57 +0800 From: "Du, Changbin" To: "Du, Changbin" Cc: Jiri Olsa , peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf sort: only insert overhead && overhead_children when no overhead* field given Message-ID: <20170602032257.GA13003@intel.com> References: <1496307801-24134-1-git-send-email-changbin.du@intel.com> <20170601102139.GA13811@krava> <20170602025223.GA9307@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9amGYk9869ThD9tj" Content-Disposition: inline In-Reply-To: <20170602025223.GA9307@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 --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 02, 2017 at 10:52:24AM +0800, Du, Changbin wrote: > On Thu, Jun 01, 2017 at 12:21:39PM +0200, Jiri Olsa wrote: > > On Thu, Jun 01, 2017 at 05:03:21PM +0800, changbin.du@intel.com wrote: > > > 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 > > hum, you basicaly do what's at begining of prefix_if_not_in function: > >=20 > > static char *prefix_if_not_in(const char *pre, char *str) > > { > > char *n; > >=20 > > if (!str || strstr(str, pre)) > > return str; > > ... > >=20 > Thanks, will change it. > Misunderstood your words. This is not equal to prefix_if_not_in. # perf record -ag # perf report -s overhead,sym 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 .... 'Children' should not be here. > >=20 > > could you please provide the example described in changelog? > >=20 > Will add example cmdline there, Thanks. >=20 > > jirka >=20 > --=20 > Thanks, > Changbin Du --=20 Thanks, Changbin Du --9amGYk9869ThD9tj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJZMNoRAAoJEAanuZwLnPNUPrwIAKVpsh2YuVa3yIV9bWhulMF8 5+5lKwgKqkEygIAiXfGG9gz2+Q057LYOSvvNo2JJ48jq5oHPALLOJ94bW2ZLfjqx 6wBoSa4kZ3mdO927iaHvT/EIDoUXgssHDwHZpAGsQKpeQ9ebfCPO0iccttXgJQVv ItTsi4VqJi4qLmmKGFGVbP/urFbf1ChPxITwvTM1Xe4zYNLeofQbdHe9Zk4Asvqu joq3RbVDhmuEI/qVDGKhaO/wLLCMXMzwpIoWBT4ID1JEyuURUW4GMCrEcApM0wz1 NPqAQ7sB1amDhQZeyXlLNgnnUv7cuRgO6ZObTVfsz81UJgNMOQnJShRLGVSBalc= =pLWS -----END PGP SIGNATURE----- --9amGYk9869ThD9tj--