Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1297969rwd; Thu, 1 Jun 2023 13:25:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Ciq2QiUzEHaCdruguVys24JYfak3foKUmU7mPh5Fn2KaJkbXnrTN7Fdu6eNVJITkLnt2g X-Received: by 2002:a05:6a21:78b:b0:10c:2c30:4780 with SMTP id mg11-20020a056a21078b00b0010c2c304780mr7347754pzb.33.1685651124504; Thu, 01 Jun 2023 13:25:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685651124; cv=none; d=google.com; s=arc-20160816; b=k+tspFYiNaJbrDsuC7/uofvnxjmuPMTT1sBhcj7+Gj22fLisQ9Xhdn0qoXg8nGYbFG N9GSwXOk/Y9vKNh+pQ/czoqgfr4ce/jc4HsjQpTXl3CdE9R432NjEiNtyiMzUIZAbcAj ZmUjc1P1K4lzCrFXG/p+5tbVJjt1kXOrbQS/JG2hks3Bzmscn5bP+sV1vmUZukxeOXTM 4LAg47JGSIDro1XE9+5PJpiLhFoq8MuPMQMokjSBNsWtTcol5ZNEm7gEXsIFbAoMIWde i6sZHS1JOnmf3R1E7pECg3qaqg8YC0DJH1ikFmpSoQmegs72o7mbvXgVYDpMqW7Ygsuo oVSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oUEDdaWgPgOnUcc1hecY/19VCIzeNtPdaPGaRsrUzGs=; b=xNJVNF0Y5QqPprbrGDAKd/ip2f1oSzbKtmoG3HpQZ3FHO/7i9uhXT5XEQPnMwvSk8G gQrp7vKxKLvYya5LJKH0hkk8IsuVlnF4gr4hK326Ewdgz3BKH1eoSslYQzW1vTssWtLt XGi2esZJ3IFwcJ98W6RqWRnMEWLk3Q1B7qleHIa6LVQQ+pVnJnbcXGMKrv7pjmye01al kW7oGpJ2Me9TlHBnNw41pdySyrXdQIVOnAmqYOVswEW+wpL37WhVMBu5jK6io/bHRimx 0Ywtf8ddFpLjCNUDUBXcR4ceHCvv4otBnVJHgJUxwMBEmX+VNvoJh/06Fg48FrcBL1HO bcOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iYn0faRC; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t64-20020a638143000000b0053fb3688fadsi3503394pgd.144.2023.06.01.13.25.11; Thu, 01 Jun 2023 13:25:24 -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=@kernel.org header.s=k20201202 header.b=iYn0faRC; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232261AbjFAUVM (ORCPT + 99 others); Thu, 1 Jun 2023 16:21:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231139AbjFAUU7 (ORCPT ); Thu, 1 Jun 2023 16:20:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D94B1A6; Thu, 1 Jun 2023 13:20:35 -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 24BB064978; Thu, 1 Jun 2023 20:19:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E2E4C433D2; Thu, 1 Jun 2023 20:19:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685650777; bh=RGs/SUKoPaxdkxluJ+b5vvGwrcwCDZO9iUhGSIQLzOE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iYn0faRCsPjSa/kRRtYadpBK2Nym8KAbriZULBoh8Yg7Qh4zlyruNg8YrJFo4IeYC ua4AnK/AUipZ992fbbvqIFprmoGsNWt7vV9OLI5o8qcnf/7cFU8hzcs583bUKRA0Uq XD4etari9U1zlWy3UoXY/rYcAG+DzpLTOJkup6Il7nkKwIJwWf38o/9jdyk64TRNyv crChNj2APexeg2miknXqNJT1loPYIo41fL/UpIBd9Bmy3C7vjir55pO4YLRSciV5xq X0mbRgTGCjcMHJVZx73Q33bv1kXrxZZE3kDrn4HxMerPwRWnzpVM5oLfOwb0dXtd2E FIINcBhdL6eQg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id C706F40692; Thu, 1 Jun 2023 17:19:34 -0300 (-03) Date: Thu, 1 Jun 2023 17:19:34 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Ian Rogers , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Kan Liang , Rob Herring , Zhengjun Xing , James Clark , Suzuki Poulouse , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/2] perf pmu: Only warn about unsupported configs once Message-ID: References: <20230601023644.587584-1-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-7.3 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 Em Thu, Jun 01, 2023 at 01:04:30PM -0700, Namhyung Kim escreveu: > On Wed, May 31, 2023 at 7:36 PM Ian Rogers wrote: > > > > Avoid scanning format list for each event parsed. > > Maybe it's better to change the subject that it's about format.. > Other than that, Ok, I can fix that, applying. > Acked-by: Namhyung Kim > > Thanks, > Namhyung > > > > > > Signed-off-by: Ian Rogers > > --- > > tools/perf/util/pmu.c | 5 +++++ > > tools/perf/util/pmu.h | 5 +++++ > > 2 files changed, 10 insertions(+) > > > > diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c > > index 0520aa9fe991..204ce3f02e63 100644 > > --- a/tools/perf/util/pmu.c > > +++ b/tools/perf/util/pmu.c > > @@ -934,6 +934,11 @@ void perf_pmu__warn_invalid_formats(struct perf_pmu *pmu) > > { > > struct perf_pmu_format *format; > > > > + if (pmu->formats_checked) > > + return; > > + > > + pmu->formats_checked = true; > > + > > /* fake pmu doesn't have format list */ > > if (pmu == &perf_pmu__fake) > > return; > > diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h > > index 287f593b15c7..7a1535dc1f12 100644 > > --- a/tools/perf/util/pmu.h > > +++ b/tools/perf/util/pmu.h > > @@ -76,6 +76,11 @@ struct perf_pmu { > > * specific code. > > */ > > bool auxtrace; > > + /** > > + * @formats_checked: Only check PMU's formats are valid for > > + * perf_event_attr once. > > + */ > > + bool formats_checked; > > /** > > * @max_precise: Number of levels of :ppp precision supported by the > > * PMU, read from > > -- > > 2.41.0.rc0.172.g3f132b7071-goog > > -- - Arnaldo