Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751572AbdFICwp (ORCPT ); Thu, 8 Jun 2017 22:52:45 -0400 Received: from mga14.intel.com ([192.55.52.115]:59848 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751502AbdFICwo (ORCPT ); Thu, 8 Jun 2017 22:52:44 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,316,1493708400"; d="scan'208";a="111014165" Date: Thu, 8 Jun 2017 19:52:43 -0700 From: Andi Kleen To: Milian Wolff Cc: Andi Kleen , acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf, tools, script: Allow adding and removing fields Message-ID: <20170609025243.GA28361@tassilo.jf.intel.com> References: <20170602154810.15875-1-andi@firstfloor.org> <4401931.mLE8BEDJl7@milian-kdab2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4401931.mLE8BEDJl7@milian-kdab2> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1108 Lines: 33 On Thu, Jun 08, 2017 at 02:59:58PM +0200, Milian Wolff wrote: > But I notice that this functionality is missing in other places too. Most > notably, I would like to be able to configure `perf stat` in a similar way. > Such that one could do: > > perf stat -e +cache-misses > > Instead of > > perf stat -e ,cache-misses The defaults are not great, so I'm not sure that is super useful. It's probably better to assemble reasonable groups, perhaps with groups of metrics. > But I cannot do: > > $ perf record -e "topdown-*" ls > event syntax error: 'topdown-*' That's actually good because the current topdown events are not useful to sample Usually you need to have at least some idea about the events you're collecting, and also for non trivial collections you need groups to get good results. I've been thinking about adding MetricGroups to the json files, that would allow to assemble reasonable groups. But it still wouldn't be wildcard. For a few things wildcards are useful, e.g. I implemented it recently for PMUs so that uncore PMUs are easier to handle. -Andi