Received: by 2002:a05:7412:3210:b0:e2:908c:2ebd with SMTP id eu16csp273593rdb; Thu, 31 Aug 2023 09:02:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IECzKwaH4GX10BSUfFMU0GkgPtu2qLwsD6ZbG3S0OJPEIYPpPwuOYHZNAAA1dX9NbThXZZX X-Received: by 2002:a05:6512:281f:b0:4fd:d172:fc2c with SMTP id cf31-20020a056512281f00b004fdd172fc2cmr4126667lfb.21.1693497746361; Thu, 31 Aug 2023 09:02:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693497746; cv=none; d=google.com; s=arc-20160816; b=B5TxlA0IPJqOiIYJlSk3s+z2Bk6wsZb4yUsTwkV/aZ7fBqtrbC5/3qeNvVCrWeuogb bTMYdWId2oiUHQ5mDiJusMifL3i6Ishm/3DWCG86WSU93SueEvWmch0Rwe6scfBIw3iy 5yDqsgkx0cIf5KbF3/EwY7AxgrbUmHQHixViu/reYyEC7S+WNiWQ+rSinXFLY4HwIYQC qPDyH49uTsuRUTlSCU7CGcF7MMwNJoBGNcYH8TTE314eBTrRJLSVnoTGtXYQyip/bVjx DOxV0L3HfJt05tXAPB0AqLhZHLdfbYT2ncCmcvNJoERm3w78+gaR9SKB76vTg3KNMuXc 3zqg== 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 :message-id:date:subject:cc:to:from; bh=xoitoE1QEQA/NSjaj43yLxXYedW4ahrRC6W4VxMwKvA=; fh=z/I2M+EpAky7jWdpVwoPEGdbI/L//g7WP50Uwn/LmA8=; b=B6NeilOeI8uI0NRy5C7UgLa3qc/J4A6TCYUyRFugOL174wmil6uOKSK0W76SDDX0/x iE8aI+A59QIWdLBMshT+WgCsPirOf7K5SezBZojoUAizD1hYIg4jYDWP587wk4EenRzB OgYYmaYK3DY8GcQ7jfqWpx/nf8HtKdsV9WiMtUdXyB+MtXePmZ2rVJXUGczw7MbcozMt tznvko/718ixeW9pP2QldVjKK9+eLnfK9jsvU931jZvrx0aJNrLqEpdk8CNZG94iW4x9 4R3w//4MDVrL/FyzwbmxSWVk6A+XAaxK4p99R+3hZd32E7vVg1JkqJSoSvOfzLt7hjgh KoIA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x7-20020a1709064a8700b009a1b305102asi1086016eju.127.2023.08.31.09.01.46; Thu, 31 Aug 2023 09:02:26 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242079AbjHaPQx (ORCPT + 99 others); Thu, 31 Aug 2023 11:16:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238333AbjHaPQx (ORCPT ); Thu, 31 Aug 2023 11:16:53 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B4CA5E4A; Thu, 31 Aug 2023 08:16:50 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A1D36C15; Thu, 31 Aug 2023 08:17:29 -0700 (PDT) Received: from localhost.localdomain (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id F2F4B3F64C; Thu, 31 Aug 2023 08:16:46 -0700 (PDT) From: James Clark To: linux-perf-users@vger.kernel.org, irogers@google.com Cc: James Clark , John Garry , Will Deacon , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Kan Liang , Haixin Yu , Jing Zhang , Kajol Jain , Ravi Bangoria , Yang Jihong , Eduard Zingerman , Chen Zhongjin , Miguel Ojeda , Liam Howlett , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/7] perf: strcmp_cpuid_str() expression fixups Date: Thu, 31 Aug 2023 16:16:11 +0100 Message-Id: <20230831151632.124985-1-james.clark@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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 Set of fixes related to the comments here [1]. Mainly cleanups, additional tests and refactoring since adding the new strcmp_cpuid_str() metric expression. I added the string replace function to the perf utils rather than tools/lib/string.c because it didn't seem easy to add tests for tools/lib. [1]: https://lore.kernel.org/linux-arm-kernel/CAP-5=fVnUx0BnJC7X1rrm42OD7Bk=ZsHWNwAZMBYyB7yWhBfhQ@mail.gmail.com/ James Clark (7): perf test: Check result of has_event(cycles) test perf jevents: Remove unused keyword perf util: Add a function for replacing characters in a string perf test: Add a test for strcmp_cpuid_str() expression perf pmu: Move pmu__find_core_pmu() to pmus.c perf pmus: Simplify perf_pmus__find_core_pmu() perf pmu: Remove unused function tools/perf/arch/arm64/util/pmu.c | 20 ++++++------- tools/perf/pmu-events/metric.py | 3 +- tools/perf/tests/Build | 1 + tools/perf/tests/builtin-test.c | 1 + tools/perf/tests/expr.c | 33 ++++++++++++++++++---- tools/perf/tests/tests.h | 1 + tools/perf/tests/util.c | 30 ++++++++++++++++++++ tools/perf/util/expr.c | 2 +- tools/perf/util/pmu.c | 22 --------------- tools/perf/util/pmu.h | 3 +- tools/perf/util/pmus.c | 6 ++++ tools/perf/util/string.c | 48 ++++++++++++++++++++++++++++++++ tools/perf/util/string2.h | 1 + 13 files changed, 127 insertions(+), 44 deletions(-) create mode 100644 tools/perf/tests/util.c -- 2.34.1