Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1599935ybt; Thu, 9 Jul 2020 10:40:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrRimq2PsCttb8R4H1ORwpRE2k3J1v5/43HBuDNG96rpkzZdVrFwTjuroJdJXsj1+4KiBY X-Received: by 2002:a17:906:1c0d:: with SMTP id k13mr59889155ejg.477.1594316432944; Thu, 09 Jul 2020 10:40:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594316432; cv=none; d=google.com; s=arc-20160816; b=LHcngXC0VZYLNxyKBH5VNnXAYlWlbSnmUZ+EZlPWEdAmadSHb9Tv9NYazQzFMiv67H tAnbSwDqrWtT6j/qfy++55m892s/36C3pLK5FQOJ5ZSD4sZQqrzGYcciYWMRNpgsyjI9 qxwjJQy41fAlGqon7nQD2GcR0CzeJMGa+lm5hq7URkZrVHSziVgXPC+VgWCpIpmX/KT7 e3oe2cw5LbH5DS/FdcVwLc3OU0aXWXLyL8/+iSOMVSlPBZCqBUX7HzJlbwIPtL+gTXZt xrchkhpPhMbKFO2AQT+ypqClBYh5GQsnLele3pBChZf5gzdqRe2fMe3RYnFQMYrmm04s fv0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=0/ms+DyF4WzZcRYM72xcPZ8QDjQEKaOy4ntapLtwTyc=; b=kMMGSbfpBkmhW74X06pbAfXvyuZ8c0P58x9lONghahiQv569hx4VU8RY3u0QRfcacR N5Itejns2O2ZM2XWHSZA5Zg6vH7SXemA0ipbFptO1uU9oEalV2WAcq8OWppvnojMCOYF bWHILd5p2LtOvYNhaMYpq5JfioEkwv1mbqHxcbDzlJIT/ctvTOwNUsAKT4smKH/D31CB 8qVeLfjYyxXClrwrXWsLKo9NRnJNTukF+6+8HXySzqmKQ0qiv6gi1pxbQzDlBkJn1ejK lZB/VmZniB4BEPB1JikJcJddg2ZNtmKeD419xsBsmk11GIhveQ6vXm4Rs4D3JrBOzRVH 2/1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id du7si3075090ejc.341.2020.07.09.10.40.10; Thu, 09 Jul 2020 10:40:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728579AbgGIRhs (ORCPT + 99 others); Thu, 9 Jul 2020 13:37:48 -0400 Received: from mga09.intel.com ([134.134.136.24]:35028 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728398AbgGIRhQ (ORCPT ); Thu, 9 Jul 2020 13:37:16 -0400 IronPort-SDR: pBZO6JDcm570SfIVwA/WuOPRBmQ2FlveFpdmhHBcN/xvQYMNeakf5uMIKko3DI5aw6oTlM4ejV Jdad/ANS2Mlg== X-IronPort-AV: E=McAfee;i="6000,8403,9677"; a="149537109" X-IronPort-AV: E=Sophos;i="5.75,332,1589266800"; d="scan'208";a="149537109" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2020 10:37:16 -0700 IronPort-SDR: tPzh02zc/A+ExKzN+NbLgM1H9JyR/9Uq344Pp+2wgkj9MIDi9dEvN21rodV3JHL8RCPz2cavpe Q8SariMjisCA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,332,1589266800"; d="scan'208";a="324292511" Received: from ahunter-desktop.fi.intel.com ([10.237.72.73]) by orsmga007.jf.intel.com with ESMTP; 09 Jul 2020 10:37:14 -0700 From: Adrian Hunter To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Andi Kleen , linux-kernel@vger.kernel.org Subject: [PATCH 03/11] perf tools: Improve aux_output not supported error Date: Thu, 9 Jul 2020 20:36:20 +0300 Message-Id: <20200709173628.5613-4-adrian.hunter@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200709173628.5613-1-adrian.hunter@intel.com> References: <20200709173628.5613-1-adrian.hunter@intel.com> Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For example: Before: $ perf record -e '{intel_pt/branch=0/,branch-loads/aux-output/ppp}' -- ls -l Error: branch-loads: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat' After: $ perf record -e '{intel_pt/branch=0/,branch-loads/aux-output/ppp}' -- ls -l Error: branch-loads: PMU Hardware doesn't support 'aux_output' feature Signed-off-by: Adrian Hunter --- tools/perf/util/evsel.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 9aa51a65593d..9c5c72094112 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -2533,6 +2533,10 @@ int evsel__open_strerror(struct evsel *evsel, struct target *target, "No such device - did you specify an out-of-range profile CPU?"); break; case EOPNOTSUPP: + if (evsel->core.attr.aux_output) + return scnprintf(msg, size, + "%s: PMU Hardware doesn't support 'aux_output' feature", + evsel__name(evsel)); if (evsel->core.attr.sample_period != 0) return scnprintf(msg, size, "%s: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat'", -- 2.25.1