From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932230AbbEHTl2 (ORCPT ); Fri, 8 May 2015 15:41:28 -0400 Received: from mail.kernel.org ([198.145.29.136]:53210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751435AbbEHTl0 (ORCPT ); Fri, 8 May 2015 15:41:26 -0400 Date: Fri, 8 May 2015 16:41:22 -0300 From: Arnaldo Carvalho de Melo To: Adrian Hunter Cc: Peter Zijlstra , linux-kernel@vger.kernel.org, David Ahern , Frederic Weisbecker , Jiri Olsa , Namhyung Kim , Stephane Eranian Subject: Re: [PATCH V4 18/24] perf tools: Add Intel BTS support Message-ID: <20150508194122.GR7862@kernel.org> References: <1430404667-10593-1-git-send-email-adrian.hunter@intel.com> <1430404667-10593-19-git-send-email-adrian.hunter@intel.com> <20150505195141.GY10475@kernel.org> <20150505210918.GZ10475@kernel.org> <5549BF5C.7070906@intel.com> <20150506133550.GA5203@kernel.org> <554B0EB8.1080702@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <554B0EB8.1080702@intel.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, May 07, 2015 at 10:05:28AM +0300, Adrian Hunter escreveu: > On 06/05/15 16:35, Arnaldo Carvalho de Melo wrote: > > Em Wed, May 06, 2015 at 10:14:36AM +0300, Adrian Hunter escreveu: > >> Perhaps we should disallow intel_bts and intel_pt PMU events > >> explicitly and put that change back to v4.1 stable at least? > >> > >> I tried adding: > >> > >> diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c > >> index 244c66f..5d3ab7c 100644 > >> --- a/tools/perf/util/pmu.c > >> +++ b/tools/perf/util/pmu.c > >> @@ -442,6 +442,10 @@ static struct perf_pmu *pmu_lookup(const char *name) > >> LIST_HEAD(aliases); > >> __u32 type; > >> > >> + /* No support for intel_bts or intel_pt so disallow them */ > >> + if (!strcmp(name, "intel_bts") || !strcmp(name, "intel_pt")) > >> + return NULL; > >> + > >> /* > >> * The pmu data we store & need consists of the pmu > >> * type value and format definitions. Load both right > >> > >> > >> And now I get: > >> > >> $ tools/perf/perf record -e intel_bts//u ls > >> invalid or unsupported event: 'intel_bts//u' > >> Run 'perf list' for a list of valid events > > > > Unsure, when did we start accepting intel_bts in event names? In this patchkit? > > Any old version of perf tools will accept PMU names as events. It validates > against /sys/bus/event_source/devices. > > So "intel_pt" and "intel_bts" will turn up in v4.1, so I was suggesting > disallowing them in perf tools for v4.1 since there is no tool support until > v4.2. Well, please add that to some patchkit after I process the current set of patches, which I'll try to after pushing a batch that I have, to avoid spamming lkml too much each time :-) - Arnaldo