Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2088076lqo; Mon, 13 May 2024 07:36:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWAJeYj2slUrS5xnE2PGNDHcin3wkknnkAlZ4H81i7iGheMMeCEmrK/cFedNM9HMKq7KCuQpM0KpvO2UsczQwDChnZIeyLkyFi0J1wfew== X-Google-Smtp-Source: AGHT+IEafIuK3QGaZTYKjHOj18Ngn8Zk/LxQn3GeJGi9VT6dCDHbSS/kPI6qJlAUFuQnmA9dwOv9 X-Received: by 2002:a05:6a00:1254:b0:6ed:e1c:102b with SMTP id d2e1a72fcca58-6f4e026bc23mr12250703b3a.4.1715610970809; Mon, 13 May 2024 07:36:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715610970; cv=pass; d=google.com; s=arc-20160816; b=bd1dCq4c3P9ZhojZy8gtMJM7h0uwjbfdtqc2eGa88czlzOJWCjqNR34WApVDp8ZqsM 5Mqy0KoJR/ApEl4O/fJlhOhy/LGqvhWzoWnY9ZG/O3Wniw7V4iEs5iAm6dXIZu2yEFU1 lwQfjQTDycYc+YR1uKJSlp4PjTLAhdmzJkNS3sJ3CNwzjuJ+kuFTzgAbSIK7KPdScHSg D/XqucV4FmcKpfB2W9+kCf34EJWX/CFZ2OZhSwAG376NIlG3UEvF8FkCA+Gq7VjgoBPY WHlkbc/zcrBvOX1XaKMiKJ2IcoslDLEtPfiRslhB7DH+SWh76P4gg3ENKLS9shpfqQXd 1btA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:from :references:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=9lj/EqHvl9QLqOFf4M+vngTd8LYxzZ0b5bT9f7+G4jA=; fh=zWyQk+Hz5MkYTOLYWcNcVG9JQZmuig4cwOtlMLE9OVY=; b=q0Rgd9q9IkImD7qq9tunLU7jwosI/J6ffXRXwicfxRT1j1amAjQMZBxiQwl2XhxoyS +imaT+oMIF0zgn37tuGf4Yj2azvSXmagCZzkp7L06+9vvDlYUqZdqSqBtuTr2jSgRLbg yWYQrMjt8JGZzoFbVM2N+cwZ2jb2SUMV5hNf3xrZqOWPUaHIMBCdG6BLWde/UBVE31WJ Qf7yabfRosFVfdgvYk4/4oKe7AecTfkuFmyOV0kd/00xU0WY3sckP5OSgCPVkapcvwFm QqTLWtNT2lb31r+kqjrkrnnUJlB7kz0l4W2/GgFwdyxkFI6rODpdbbcSK+ZbkmRhG9m+ JgOg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-177700-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177700-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2a72697si9531474b3a.10.2024.05.13.07.36.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 07:36:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177700-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-177700-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177700-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B3AADB227DA for ; Mon, 13 May 2024 14:36:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C195256D; Mon, 13 May 2024 14:35:58 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 82D1F185E; Mon, 13 May 2024 14:35:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715610958; cv=none; b=kiOwWDU+0O9KeHdUUJa6leqYil6HMc12eg1aWPEdzNpmQfKSAaHhyaZzF+59SRKc/SBlHrkA/8yPzCZRWn0wx8CUeojlEdB/7wbKwmmW7ySw73JUx8aHqRqfIY5IwoyGdRndKOgopw0q5On2JXUc66wgy+p39UCjsxYbvCxGUBc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715610958; c=relaxed/simple; bh=WSXI9MXhlrXxHPeLSW0/uP1SfeIiG3D+XQjGy1TUxu4=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=hEPnC0KkGagBEknkr1NQxMlzHZ3MruonsXOJBIyBqEkzQPFtmWn9GdLDXrXAE3Yc80JvhkC5S37gG8nFy5VhufpG4tpTV2Ps4iYw3UmuvXb0nJalhYXJMwM84BVMW9I6WV4fEY9NpJzgXiGg9Sqp93tXsdjn3r5bQdQHdY57pgQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 170701007; Mon, 13 May 2024 07:36:19 -0700 (PDT) Received: from [10.57.4.233] (unknown [10.57.4.233]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 24FCF3F7A6; Mon, 13 May 2024 07:35:50 -0700 (PDT) Message-ID: <34da7677-9c77-4efa-ae32-e0ef9a94013d@arm.com> Date: Mon, 13 May 2024 15:35:43 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 0/2] perf pmus: Sort/merge/aggregate PMUs like mrvl_ddr_pmu To: Ian Rogers , Thomas Richter , Bhaskara Budiredla , Bharat Bhushan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , 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 , Tuan Phan References: <20240505031624.299361-1-irogers@google.com> From: Robin Murphy Content-Language: en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024-05-10 8:15 pm, Ian Rogers wrote: > On Fri, May 10, 2024 at 11:13 AM Ian Rogers wrote: >> >> On Sat, May 4, 2024 at 8:16 PM Ian Rogers wrote: >>> >>> 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. >>> >>> 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 >> >> Hi, these patches have been hanging around since March [1], it would >> be nice to either be landing them or getting feedback on what to fix. >> >> Thanks, >> Ian >> >> [1] https://lore.kernel.org/lkml/20240329064803.3058900-1-irogers@google.com/ > > +Tuan Phan, Robin Murphy > > Here is another PMU with the same suffix convention/issue: > https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/drivers/perf/arm_dmc620_pmu.c?h=perf-tools-next#n706 There are at least one or two more as well - certainly arm_smmuv3_pmu which I think may have been where this pattern first started. Now that we've finally done the right thing with the parent mechanism to provide a user-visible relationship of PMU instances to their corresponding Devicetree/ACPI devices, hopefully we can discourage any further use of this rather clunky trick of using the MMIO address as an identifier in the PMU name. However there's then also stuff like dwc_pcie_pmu which encodes a PCI ID as a hex suffix, so understanding hex suffixes in general might still be a reasonable idea for the tool, if the alternative would be maintaining a list of specific prefixes (even if that would be hoped to remain fairly small). Thanks, Robin.