Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3702190rdb; Wed, 13 Sep 2023 23:03:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGcjrdw26KIxtC8UZAGpTLtlOGubBjAFQE1pDsqzfBq6F05f6rb2O71xjwKGSKSmow9Tp18 X-Received: by 2002:a05:6359:3509:b0:13a:a85b:a4dc with SMTP id un9-20020a056359350900b0013aa85ba4dcmr3353341rwb.29.1694671398538; Wed, 13 Sep 2023 23:03:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694671398; cv=none; d=google.com; s=arc-20160816; b=gHyt2EQVEcDpoWXYBIFkQhWWyhj98VXqJB+rv/HwfZbiTpzFEMCE2h8sPa6wrW1JHS s1yP40lOou7YRrAIDIoknnBpbMgrToX5bGPBdM+G08pGKuTsy+sodrkOCTwkOZrCJld7 nerRn8jpW4Vw/9FJmFpnFJCg0Qsw+IJ9lv8WHuLtF4az1H1R3pZrZJzT0YewybE8eYxs 0YsqmgxDnqcTRAJhl3xT4lgGeGb+xzj6LyBAKgW+t6d3ZRgjjCEA1AO85hq+e9uF5m4q ETy0lRYQhqTsXP47E4jI7z/5KUnUYXEjlhHPlBd/f/lf4Nz66DvqL9Xd2ZL6Dt5F1Aev hw8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:mime-version:message-id:date :dkim-signature; bh=HlEcmDja1ZIoCrnt8HbZ+hkvBpXdTmxF97ewUnwPOAQ=; fh=Fe9wmS649GCmP5qVanJWE/WIwB6khhySZn+fRCN7RHo=; b=SJ5FdMTeytZcMSDlweyfguKVHq4Tpe2Zw6QR/EzRJw0KML9AE/o8Z16qYUk+msC/dv HvyXXYKg45+m5I0J0vyfVk9pv0Nx1nrUsQXM5nacj2VpdU61CaCHxx0hhZ3IxBmtzrBZ SpqOv2rxH8lo9e6qtusqdbQwosp1+LtpxzZF3nDMjQG7jt9JKJdRDXzQvKxpO3fvo6BU dOQPvc+JfWQGqz0OnU1YB2AYk0UTh0jskWAUg6dmDHESKUiZgYaepgUKQIaWwXHFdb6V hWq93eHIudT7b41T17GUhOoXgy0cTs0xwJbElXwK/uZpk0fnc/TyhM9uMNklQ6GPNE0I iJRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=WX0imZaN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id v186-20020a6389c3000000b0057414fdee4asi805291pgd.274.2023.09.13.23.03.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 23:03:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=WX0imZaN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id EF327828C4B8; Wed, 13 Sep 2023 19:22:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232351AbjINCWO (ORCPT + 99 others); Wed, 13 Sep 2023 22:22:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232177AbjINCWM (ORCPT ); Wed, 13 Sep 2023 22:22:12 -0400 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D37E5198 for ; Wed, 13 Sep 2023 19:22:08 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-59beb3a8291so4246677b3.1 for ; Wed, 13 Sep 2023 19:22:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1694658128; x=1695262928; darn=vger.kernel.org; h=to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=HlEcmDja1ZIoCrnt8HbZ+hkvBpXdTmxF97ewUnwPOAQ=; b=WX0imZaN5CxKDVSlCgy83ocZjlPBL0dU+5rAn+1w5S6zBs1YQ4Psccd9fGd9YTbpeI 2F0hQqadDBj7wSfntqMNta2h9ai2hm+M2Do+8LAUy54fEes3ULEI80XmGlcgjdXFvP3k Kn9IAk3DuRlT2qzDAOJYmLSpQPf8mbsPaQS361i0dVOObJhBbuW06AglD2PTtnewO7E2 dU2eAeFmyEO8HB9Fv02bNSR+b4oSytvbrbhnbMnNIlRd1yz9LWBua6HYsWXq34f2wHfz JOBs022IJdgJN6bG188/ldJYlj48Ov3QSK6ozbgQaJiasnPiCfqo2CZ1Yt8XVobc/3PC 75lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694658128; x=1695262928; h=to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=HlEcmDja1ZIoCrnt8HbZ+hkvBpXdTmxF97ewUnwPOAQ=; b=g5nqINaoAyDkzpoL8uVrBoRYb/vyFSO2BF4QGkD+wXU0e0d7x/nUshMhSpsXLsx9EF cOLHfPBdkUvw6nN/NFOR7+g1y5phA05AvuuIHR5nilhCl6hmLOGxlz5ESC3D+Dvv932l atRX/AC9oIMbwGrI9lVBO6rrSvnCK82GErdolpwGDDTaTRLWSCrQMEa6KaET4Si+5nER isupyulT5aRmW/aYfR2avzhdhAiKw3DyPFGqKq8DbrjsdDy8UwqcLvb0Xv6Wka9Z2yrm MB+TXU581wQZ9SGDvZxt7ItLWWzqNRTdkGpTFiqc+4F2mzb5IIvhxI34QUVvofF5A16u 61GQ== X-Gm-Message-State: AOJu0Yx2ePs3vp0AIhcOJ6lepaRS9abBDfX54hctfWUGfmp08o6+EFrV dC855wzTJCU4eZqrgQ2NoFTHnXVrmxni X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:7612:4bb6:bcf1:779c]) (user=irogers job=sendgmr) by 2002:a81:ac20:0:b0:58c:6ddd:d27c with SMTP id k32-20020a81ac20000000b0058c6dddd27cmr105722ywh.6.1694658128069; Wed, 13 Sep 2023 19:22:08 -0700 (PDT) Date: Wed, 13 Sep 2023 19:22:04 -0700 Message-Id: <20230914022204.1488383-1-irogers@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.42.0.459.ge4e396fd5e-goog Subject: [PATCH v1] perf jevents metric: Fix type of strcmp_cpuid_str From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Kajol Jain , John Garry , James Clark , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 13 Sep 2023 19:22:14 -0700 (PDT) X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email The parser wraps all strings as Events, so the input is an Event. Using a string would be bad as functions like Simplify are called on the arguments, which wouldn't be present on a string. Fixes: 9d5da30e4ae9 ("perf jevents: Add a new expression builtin strcmp_cpuid_str()") Signed-off-by: Ian Rogers --- tools/perf/pmu-events/metric.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/pmu-events/metric.py b/tools/perf/pmu-events/metric.py index 0e9ec65d92ae..3e673f25d5fd 100644 --- a/tools/perf/pmu-events/metric.py +++ b/tools/perf/pmu-events/metric.py @@ -413,10 +413,10 @@ def has_event(event: Event) -> Function: # pylint: disable=invalid-name return Function('has_event', event) -def strcmp_cpuid_str(event: str) -> Function: +def strcmp_cpuid_str(cpuid: Event) -> Function: # pylint: disable=redefined-builtin # pylint: disable=invalid-name - return Function('strcmp_cpuid_str', event) + return Function('strcmp_cpuid_str', cpuid) class Metric: """An individual metric that will specifiable on the perf command line.""" -- 2.42.0.459.ge4e396fd5e-goog