Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp751984lqp; Wed, 22 May 2024 20:55:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXTmDlkir/qW0X6dFBdfAKCpQfNXNM8YCuNGcO8e6+Y84k58kqGhGkTu6OhwkDgh7lsXOWt/81aJe8jVIFYkgdyyauoPEBhzpgStpQ0jA== X-Google-Smtp-Source: AGHT+IH0zRz+oIFx2f0Q6jnkxTPv91D4n01+jbobiislbBqrJNfTZD6/ygQ52f+5Y/uJ7VwiCWIo X-Received: by 2002:a17:907:508e:b0:a59:ab0a:a170 with SMTP id a640c23a62f3a-a623e8cb7f3mr64520566b.1.1716436510081; Wed, 22 May 2024 20:55:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716436510; cv=pass; d=google.com; s=arc-20160816; b=nmRdQwujZ+J2WDR5+TdbbAu9DawvAlKtnqypAxEu5YFi1XISAVdaFJ1fPrRr7+B+ma 38GNWvRnhYD3U6swOJH/KMDyWYVlv4eEye+pR8/llFmiIl9HRF/qf01TLOkpabNzLQmh QIfRGfDRqLJm2awsFZ+0JQywpQBVUZ1Nd4xl0sPGmTvuPOObrNhfshhea/L8w+qiAq1R ffNa78Im6kldh07qXmOSY8MCW/IXlUvJWyJddMNeSfJ6HYUlYkXOGjiB/Hf9i7n9TH8J HAemzwXAyXcrivTss+Qle2KNkrzAsqInjH/KZB7wP2vc2qvxWfjPK7w2Rf86RMB4exg2 lqKw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=pRPbctajEJQ+OrarxkB0WxLHRGG7ia+xYS63j1TiSgA=; fh=csTp5/hDPwKMu6m77VcrBl08Kl5tRjDkHtXEotTMXIs=; b=drlY+Dlf7kMnuHWuJepaXRuPbVcVts+8bUrCduWfVQ9e1DfrSOfPqo2Fo24SaTs+8Z mmA+acw0MhMSGJBMIcWXlcSFJFGlqtmrfMvwthfl+xZeWigGlnlg8DiGLAHiESrdAZ4f blQTdXx1UTcSbwfKMYEeEG05Ax1/0TTU2C7t8aSrvzok75TdiDbGNHHuloXHyfjm188V 86IO/eP3pVkHJFlJFIcrKxqXw8QlerhnGoe2kcZmUiAPNd+1x7YFTwSADnhbVnVcQ/RC SphDuAX8Ja3YpKSGy9auuWMmBzyCdrYxR1cRbEx825A8gVnufzcCSoy18tyj9ZPhAcQl 15tQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-186962-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186962-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17945d3bsi1530398466b.65.2024.05.22.20.55.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 20:55:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186962-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-186962-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186962-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CE5101F22106 for ; Thu, 23 May 2024 03:55:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 655B94778C; Thu, 23 May 2024 03:55:01 +0000 (UTC) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CDB12135A; Thu, 23 May 2024 03:54:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716436500; cv=none; b=kJeOylqySm+W/IMOcR4JcV65tAjcKjyHHPPL6Ne2QPkg7n4gkhWhE/B0/+KkUEgeMXrTqmuksd3QC+UYSKVvIq5NocWi60gyngTKPq9HWSvZQb4/zKYHHepdJ39zWIwKk2jBv2UDqyXU+LU/pHBzboka7l97T0a/RtNzOuPe19U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716436500; c=relaxed/simple; bh=Go6SiNCfeJUdVgN3zYhSpMRnchcwKA0GJsce12HTHDY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Q8HCAM2Bw3jDiOygJQUO/XwS7lgxst2qOcXFEtTMtHSkc7yog1cEpPC1n+/ofUWpYpdGFywpvqgNQDt6ZEC7k6waN07CQwRsRi0x/29OIb7RadZEeyx/qg/FBh38u8wXReEqs6lqCiOFQLs4LSf4nckHIfyFKR1KFEnlAbItvyk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.216.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-2b432be5cc9so1816689a91.3; Wed, 22 May 2024 20:54:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716436499; x=1717041299; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pRPbctajEJQ+OrarxkB0WxLHRGG7ia+xYS63j1TiSgA=; b=ED7DPr8Fe+ypSC2FSnF05sbTi9keBgpn7NlxJv1+KCWxWsUWrnQL/RFRjDC4q+9d9V BvERdd7dIX7/BFRkQ+/HAi5ft2pw4rtrcShEzf7qLlSb20wHqkJUCKu+SmuJ0CuY2xqQ ugJp00y134aKtmxGSN+xpwYrbRKH9+ncn+7g/oixHbOSgxlFk8Hp/wYLAURqdvYF93iM PmtuWtX92BhXlqhmGgcV2dU42ZBjC2r1pqfmzyDEgVJA2N61X2HdZFdmlYLKfq7C78Bf snxtwMtk5G/86gEDLU4OHdal+TmlKQ/sbh/nYNSzgzlAeh/5vLiDq1s9Ln7IHtKlU+0T wg4Q== X-Forwarded-Encrypted: i=1; AJvYcCUIGWPAtGhs4W0CXJMlWF7FTdk8iG0hAAAcsSU7fRNS+4bbpcvxJGsrIATkcmnDqEGz8f1TKnoWqVuEgqFrnsY2oV0fmWwfSrOQuAFCKEC0AYmrIldaUMjwJ/BV1fFbxPrS/I9e4yjp4f2sst+9Gg== X-Gm-Message-State: AOJu0Yzh3QqKMPz9mGKyZdqR+pgTwwhbYaZW0KsGpFh4/YBSTfvGEN9J HLpCRRw13hefOeKLh2pZzbTVKYgonC80oINauw4yYR6ygnqC415BUqvSc2gLcivXy7BDn9t8Map TYpQbsuF5+BLKzzRiEwJOrdbK1fk= X-Received: by 2002:a17:90a:cb04:b0:2b2:7c52:e175 with SMTP id 98e67ed59e1d1-2bd9f49cde3mr4257630a91.31.1716436498738; Wed, 22 May 2024 20:54:58 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240515060114.3268149-1-irogers@google.com> In-Reply-To: <20240515060114.3268149-1-irogers@google.com> From: Namhyung Kim Date: Wed, 22 May 2024 20:54:47 -0700 Message-ID: Subject: Re: [PATCH v6 0/2] perf pmus: Sort/merge/aggregate PMUs like mrvl_ddr_pmu To: Ian Rogers Cc: Tuan Phan , Robin Murphy , Thomas Richter , Bhaskara Budiredla , Bharat Bhushan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Kan Liang , James Clark , Ravi Bangoria , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Will Deacon , Stephane Eranian Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, May 14, 2024 at 11:01=E2=80=AFPM Ian Rogers wr= ote: > > The mrvl_ddr_pmu is uncore and has a hexadecimal address > suffix. Current PMU sorting/merging code assumes uncore PMU names > start with uncore_ and have a decimal suffix. Add support for > hexadecimal suffixes and add tests. > > v6. Add necessary fix in pmu.c to perf_pmu__match_ignoring_suffix that > also needs to ignore hex suffixes. > v5. In pmus.h remove needless addition of #include list.h but add > stddef.h for size_t. > v4. Workaround GCC build error by using unsigned types. Don't consider > short hex suffixes as suffixes (e.g. cpum_cf) and test this > behavior. > v3. Rebase and move tests from pmus.c to the existing pmu.c. > > Ian Rogers (2): > perf pmus: Sort/merge/aggregate PMUs like mrvl_ddr_pmu > perf tests: Add some pmu core functionality tests Acked-by: Namhyung Kim Thanks, Namhyung > > tools/perf/tests/pmu.c | 99 ++++++++++++++++++++++++++++++++++++++++++ > tools/perf/util/pmu.c | 33 ++++++++------ > tools/perf/util/pmus.c | 67 ++++++++++++++++------------ > tools/perf/util/pmus.h | 7 ++- > 4 files changed, 164 insertions(+), 42 deletions(-) > > -- > 2.45.0.rc1.225.g2a3ae87e7f-goog >