Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3322355rdb; Wed, 13 Sep 2023 08:38:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGtq3WF5URF0N01HiJLkh0b5TmJw9yysKvsMWgnOwf1nXsmug2ykp7GgoTkCGAMTwqkCtkt X-Received: by 2002:a17:90b:1e10:b0:268:b682:23de with SMTP id pg16-20020a17090b1e1000b00268b68223demr2878539pjb.28.1694619515174; Wed, 13 Sep 2023 08:38:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694619515; cv=none; d=google.com; s=arc-20160816; b=RCJXTrRRVd/TjaMS5KQS7kWqDfzDti/BwHz2D1KvI+2FL4cYwUwVuxSZ0yc8eM5E2b hrfqZxF1NmLsTG+MZfgMsBk947GfluXMrX+tfFyvmb+JusHpA3BhMVWKtvSuwhEOWB5i rKPGCBmazv3JtnzNkjHHsnrNCXcHCZXkJIbtU7Lma1nrufDwPel+pLin5UJYNHli8To5 tyQgq9V7J8PiEmUSUoXJLxTUBG6c5owuR/szBN2HLcsf7WaZDTbK2G+yFJqogVTLnlXc BtykENoyQXS/ldZX3Ib7MRxVegKJunzs+C+kxV6euqHddcJG9x9Y2L02lkOt//hRNK0F yVDw== 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=qCPPafIvpeyAP1nyO+VmFnILLTcsmMzGTSTpEgaoMx0=; fh=avf+MRtEM7LDBJ6J8Zfb0DAkB4upBW3mgtIspi65OHY=; b=j9mB4NjMLR5lYKj/1t1BAxghxvjAmV2AvIh3uP8BMONp4xjv10WyLw0FEVZC0YB/HX 4nZIvWs0hjWP7tdyNDgmAFNFCI2aGIFDoTcqVOqrh5dRV3223xRlJSgEwfHhpv5oG3Je fJszQzAfLb7rEc0TQoDma6eIdtuHKZHBs9PMp/6pPEGrPCgeDG09//TQIFrYDhFuYi5Q 7fA2twGEAhapD9ooR7ehLN7MhxvCA77W9+toxh0+IXr25MgrJX0ciy2UPnSEV0OoHigL TvBkFl6y7XHLwbzpwQDjJ+8zU0jqJKwfTgCpz7G8lGZub15yx27zJULTWkyuOkMGuXuk DUqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id z16-20020a17090ab11000b0026d6ad52473si1701271pjq.34.2023.09.13.08.38.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 08:38:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 30E6781E1B52; Wed, 13 Sep 2023 08:34:56 -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 S229647AbjIMPeZ (ORCPT + 99 others); Wed, 13 Sep 2023 11:34:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229582AbjIMPeY (ORCPT ); Wed, 13 Sep 2023 11:34:24 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B642893; Wed, 13 Sep 2023 08:34:20 -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 5EF921FB; Wed, 13 Sep 2023 08:34:57 -0700 (PDT) Received: from localhost.localdomain (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 590393F5A1; Wed, 13 Sep 2023 08:34:17 -0700 (PDT) From: James Clark To: linux-perf-users@vger.kernel.org, irogers@google.com, acme@kernel.org Cc: James Clark , John Garry , Will Deacon , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Kan Liang , Haixin Yu , Jing Zhang , Eduard Zingerman , Ravi Bangoria , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/3] perf: strcmp_cpuid_str() expression fixups Date: Wed, 13 Sep 2023 16:33:47 +0100 Message-Id: <20230913153355.138331-1-james.clark@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 08:34:56 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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/ [2]: https://lore.kernel.org/linux-perf-users/ZQC7da2AM9ih8RMz@kernel.org/ --- Changes since v2: * Drop patches that were already applied (which makes the cover letter mostly redundant) * Avoid generating the compiler warning reported here [2] Changes since v1: * s -> haystack * find -> needle James Clark (3): 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/tests/expr.c | 2 +- tools/perf/util/expr.c | 2 +- tools/perf/util/pmu.c | 22 ---------------------- tools/perf/util/pmu.h | 3 +-- tools/perf/util/pmus.c | 8 +++++++- 6 files changed, 18 insertions(+), 39 deletions(-) -- 2.34.1