Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3512146pxb; Tue, 19 Apr 2022 04:23:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXCR4AZydwqDnMrB6CXzAzm4/5gVXz1vwfB+jwLxLycRO0TE2A3JJT9XN/rjNjYzg2RPru X-Received: by 2002:a05:6402:42ca:b0:423:8082:6cd3 with SMTP id i10-20020a05640242ca00b0042380826cd3mr16092500edc.85.1650367437447; Tue, 19 Apr 2022 04:23:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650367437; cv=none; d=google.com; s=arc-20160816; b=uzq7GnZ/S9kIdpq0sHLf8fZJKNeh710qUgqW1fHNg3oR3n/in4HbmcL6GRpCA7u8CS iRqmB+QjB1nhr3n2KNuICx3tgJtvi6bCjufZih9Ey4r/2OwFk8dYWIcR932zI3ZbLDZU bBcA2qdwI2bZwZKatasuO3JVSTX+O//7MUpvq9khvvHTTZmgu2VLXu6PxdvlLE4R5DRE vF6b+kCcyn/lxz34osD2/C7MAZtQxqovh7XsJi/03BtNTgAYI2EVxsvPyaOo2f+ALlbK hgp/jFgXFVyTy/cpJzbyVfAoxxAHHRA7gN5nF61cNJzjF6QTqiUDhSQ/46z5FXcWI/// DUxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=g1BOQQxgsJbjmq0bz2R/JZPLLVjk2nV9AaLc4XoNiNw=; b=h4ZAm28X5FjHv9lcFy9DteweRReZko0/HSXNDKzGiuRS3k0YV7aq8Oz66xawelRndY WV5Ut0dmiJA5yp5IRgdMBJvh7AexoI4gLBC4BodAYuDAJrCNbLBpSOxbNvUYJN4DRCrb TeQjQg62N1CeC+yPCrsFyIQsc+YHGgXRryUbaWgtx+8My8TANYtdYJxC8qlWv/VQV9DP hXSdPZjIEmG4iwXbZar5QwEw8fjkfwyAGeAiYXRfxlytrk6t2VhGDa8xIH2yp2nS11Ef gITQnvqgJfc2V6zz8PFfc/5Mw9IVQDBFg3PykcxzcJV3PPnAZQNdH1yA6Xcqwr+BZTSz F9cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lnixXNmP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cm8-20020a0564020c8800b0041d70951197si7453536edb.530.2022.04.19.04.23.32; Tue, 19 Apr 2022 04:23:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lnixXNmP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229876AbiDRM3s (ORCPT + 99 others); Mon, 18 Apr 2022 08:29:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237083AbiDRM0c (ORCPT ); Mon, 18 Apr 2022 08:26:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC27D12760; Mon, 18 Apr 2022 05:20:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5561F60F0A; Mon, 18 Apr 2022 12:20:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E62BC385A1; Mon, 18 Apr 2022 12:20:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650284440; bh=WQwPEHSCem5xKkdX+CUKjM6gepLC47qMUwijbu0hyO8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lnixXNmPhPQo7NDLjQtujQHhWHyDEolAvkJHEINt2ZeYtZbA2QSBT6T8LgPhWmRHt A3AGtVGzlyct0z/kHOS6fNoHx4wsTJILMbWxcTQoYhSHmve7PoXe4I+DajIN/jR+7+ NR1RYRX/LVFUsmB31Th45SrjnxNulTH04mvCB81c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Adrian Hunter , Ian Rogers , Jiri Olsa , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 5.17 116/219] perf tools: Fix misleading add event PMU debug message Date: Mon, 18 Apr 2022 14:11:25 +0200 Message-Id: <20220418121210.146768167@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121203.462784814@linuxfoundation.org> References: <20220418121203.462784814@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Adrian Hunter [ Upstream commit f034fc50d3c7d9385c20d505ab4cf56b8fd18ac7 ] Fix incorrect debug message: Attempting to add event pmu 'intel_pt' with '' that may result in non-fatal errors which always appears with perf record -vv and intel_pt e.g. perf record -vv -e intel_pt//u uname The message is incorrect because there will never be non-fatal errors. Suppress the message if the PMU is 'selectable' i.e. meant to be selected directly as an event. Fixes: 4ac22b484d4c79e8 ("perf parse-events: Make add PMU verbose output clearer") Signed-off-by: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20220411061758.2458417-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/util/parse-events.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 24997925ae00..dd84fed698a3 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -1523,7 +1523,9 @@ int parse_events_add_pmu(struct parse_events_state *parse_state, bool use_uncore_alias; LIST_HEAD(config_terms); - if (verbose > 1) { + pmu = parse_state->fake_pmu ?: perf_pmu__find(name); + + if (verbose > 1 && !(pmu && pmu->selectable)) { fprintf(stderr, "Attempting to add event pmu '%s' with '", name); if (head_config) { @@ -1536,7 +1538,6 @@ int parse_events_add_pmu(struct parse_events_state *parse_state, fprintf(stderr, "' that may result in non-fatal errors\n"); } - pmu = parse_state->fake_pmu ?: perf_pmu__find(name); if (!pmu) { char *err_str; -- 2.35.1