Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp619935ybt; Fri, 10 Jul 2020 08:14:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyugRb2T5Eg0ez8j8x5XWj1U2rCP717ZvzmXRpOepROToMHzL+vO6bL6cTcJubBMIZC3qf7 X-Received: by 2002:a05:6402:377:: with SMTP id s23mr79511292edw.200.1594394065622; Fri, 10 Jul 2020 08:14:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594394065; cv=none; d=google.com; s=arc-20160816; b=vxtl4KMvqisrzhglfaiVYKintF9JqN3LSuLR6Yy2H3++tZgneW1dZshjHyOEtj2Ofk Lt+nmkPuXkeUrYhe6n8y4v44HHxhl/O0CNS0yGo0cbzvCbi8looYCu/y0bZ3u93vLCjo Odk8m/JUmugVJTC13zuXYKRODxk0AQmfAuU3M1n3qEznq9uqSR3rVjXoDqnJ1XPWKMaY 81C/oAbZVZ6gk1XfGixxixRHxHFhc9SyyBuhEN/hXfREUEFpGUHlyWT6Jw5gX438ggfO gb+GqlQlRzdJRGQmJeOrbSygDbfQ/AFgWp5YGyvRGLuoAKfLWj7tAOcPH3NFjgGbGOhZ 3T/w== 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=44MLZoNk1OmvpNISwwnYBrXGHj5/i636vEvOD1gYqJM=; b=ze3oXq0zFDNQ6i1kq29pYjpkikdHZv26KfRCeura+epmIfFRH7xYrNXMpDUcCtLxvN cDR11B/F/cn93R+I8cvnt+K711DxjXY1w8jCIBF0zTJSuJ4lgh2j2otwR/TE7aC+k1fC 4HA2P8DaYLogj/ablqlhm7595ZpBpyWHS4m3SwleDETDNL0+QFm5LNp2FVIEz3GDlmXb ZHOhz1n0EkzEt7CBtMH7ARdZgMmPY8hYaV+fJcVUAqnIglTYiCplpo/ODVEbB/DgAiEo FHTNnQ/k+ClcPFifR/Al9BS8TQRTNc3HmbBFfV0s4gm4alzA40iJA8/AZd8qNqG6bvrg G5iw== 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 m8si4184334edv.543.2020.07.10.08.14.01; Fri, 10 Jul 2020 08:14:25 -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 S1727914AbgGJPMp (ORCPT + 99 others); Fri, 10 Jul 2020 11:12:45 -0400 Received: from mga09.intel.com ([134.134.136.24]:38264 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727031AbgGJPL4 (ORCPT ); Fri, 10 Jul 2020 11:11:56 -0400 IronPort-SDR: R9HQ+fRvLQMovk1s41cBHjVVUUfJfolNf/kkX7aXvz92LZALtA+vr8NQFAw7/pdY0UjVoXTGzG XcSba84OQ+2Q== X-IronPort-AV: E=McAfee;i="6000,8403,9678"; a="149686236" X-IronPort-AV: E=Sophos;i="5.75,336,1589266800"; d="scan'208";a="149686236" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jul 2020 08:11:53 -0700 IronPort-SDR: jkDt7nsWM9mcN+v+Xzef4FUr1qyvjNOYhFQ63kOIJ1iFl7+z5e55T8CEKCKaPqwdZBQdar4Ntp hYSzK0I3ym8Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,336,1589266800"; d="scan'208";a="484675474" Received: from ahunter-desktop.fi.intel.com ([10.237.72.73]) by fmsmga005.fm.intel.com with ESMTP; 10 Jul 2020 08:11:51 -0700 From: Adrian Hunter To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Andi Kleen , linux-kernel@vger.kernel.org Subject: [PATCH V2 03/12] perf tools: Improve aux_output not supported error Date: Fri, 10 Jul 2020 18:10:55 +0300 Message-Id: <20200710151104.15137-4-adrian.hunter@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200710151104.15137-1-adrian.hunter@intel.com> References: <20200710151104.15137-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 80a7f9862aec..6606c1e3b4fe 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -2539,6 +2539,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.17.1