Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp370037lqp; Wed, 12 Jun 2024 04:19:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVHSiKbGIHCJD9W8i2Qmjr7q/UNESE6R3KAFXk7MgPu36jb72oo0Quk5RmCxGfiuzcCIhxQAikKJiZPWWwAD4AlyjBz7xzGyTsnItVjrw== X-Google-Smtp-Source: AGHT+IEk4AVFGKG3djGMOY0fJeiBK3AfJbceK1J82tHkwuQ8zLOZ/hmHyzAUGg5GA7oJY7YrWEM5 X-Received: by 2002:a17:90a:fb95:b0:2c1:e54a:19b9 with SMTP id 98e67ed59e1d1-2c4a764b460mr1570730a91.21.1718191198697; Wed, 12 Jun 2024 04:19:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718191198; cv=pass; d=google.com; s=arc-20160816; b=WyoOF2VgHEffPCCNyIot9rcp4ot6EghiawTz9+tJLApIoecerCbtYS00D9OsR5TLNj +jEctHm+/SanDoYBe5bU7zgGA1Stn7y1zg6YPiTShLmnaBb+DO7b8mbIRUoWWRDstC+Z 7CfCUJsD+xzfweYtgxzSfOspOjtHGWrTmsmoPnm/XqPzQP5dvcufRD98EHB8S+X4oXmx Pbl1jnBhqCf4GrgUTp9hbnOt5acCr1RQ+qeG97Vwr2SyZTUTc8TdeMw+sLb3yTPJ45eF /amc3u8kralEDkcNZk8XCaBoLAqv3Mzc5kmONmuBHgx6YQ+4jGNw/oX01FjnYdXcIOdO r2yw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:cc:content-language :references:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=CXnL4eUx7fJACjg740wkYr80L55JooNtrfEJOJGjKmk=; fh=PkqNwbTZo4DHSfXT9hNsEB3GalA5eXVWtpZOpw5waVw=; b=BM8FsfLpamwFD5HBBr8dq0u2sDPgENR01uvvcQV2haiw9YtldMEzbNGlbOWgd9f/eU 1IN3/7vXC0wEPBE7zcYxgtgP/OXq5uux07q98ZfAmL4Tt1fUqzg7DV34AckXiX1T/PJD Y9FrRzIbqn9mKPd8Hy7Zx8+ITSpNGPgOF8HSjSqQA+/xMj7LxyLt7eonEefw1sqvlj+P VRj1lcgQry1GRDD4hT2sMvEX0njBKDQ4z2UPdPS891v3qRqL2AQU1ZnilJ7sPHl+sIW5 8tSYGrULu2R2vY3cfGe4I9WWN4VQC591YG4FZ4xa/Koau3ne2EAdh6+D3PwdjJ3DjT7S YUlQ==; 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-211405-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211405-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e5a77455fdsi8539743a12.362.2024.06.12.04.19.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 04:19:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211405-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; 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-211405-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211405-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C7FC628764E for ; Wed, 12 Jun 2024 11:19:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A23B216F0E4; Wed, 12 Jun 2024 11:19:50 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D3A6C146017; Wed, 12 Jun 2024 11:19:47 +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=1718191190; cv=none; b=LQannDJ4wWMRhlizYf5mmtcgnfgfdN+21RZonDv94E4kYnM20YIu6tWxVr626GQHLLnl97MumPvDhZeIDH+IYqpwldgzqrpk9YwkLk5CdmY4Uj5QiNWMPS75P+YTxK8UXRlMFdipz+iwgWLaS4IBSWklD4RFymHtsT80eIb9t1M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718191190; c=relaxed/simple; bh=Ke+gHbevqiDiYBwn5rd9Bha6Ujph6NUBUgSVjAAi3LU=; h=Message-ID:Date:MIME-Version:Subject:To:References:Cc:From: In-Reply-To:Content-Type; b=nV+kMhgi9X5bOEsLcK5yS7gyx9PT6Xlb6Hb25cgwQVVHerCLrKb740A63mThAsYI7mxWXMycNJTlXHnztGLoJ7gajvztFiS28Ax0GracxuOSWwCqfm29tKiU410kJ3Lhu6hdkdPLW9uYvpEGQ/obazUCAzmUOvBNEu/uDhLbYOQ= 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 A95361595; Wed, 12 Jun 2024 04:20:11 -0700 (PDT) Received: from [10.57.4.35] (unknown [10.57.4.35]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6D1D13F73B; Wed, 12 Jun 2024 04:19:42 -0700 (PDT) Message-ID: Date: Wed, 12 Jun 2024 12:19:40 +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 v6 1/2] perf pmus: Sort/merge/aggregate PMUs like mrvl_ddr_pmu To: Ian Rogers References: <20240515060114.3268149-1-irogers@google.com> <20240515060114.3268149-2-irogers@google.com> Content-Language: en-US Cc: Tuan Phan , Robin Murphy , 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 , Mark Brown , Naresh Kamboju From: Aishwarya TCV In-Reply-To: <20240515060114.3268149-2-irogers@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 15/05/2024 07:01, Ian Rogers wrote: > The mrvl_ddr_pmu is uncore and has a hexadecimal address suffix while > the previous PMU sorting/merging code assumes uncore PMU names start > with uncore_ and have a decimal suffix. Because of the previous > assumption it isn't possible to wildcard the mrvl_ddr_pmu. > > Modify pmu_name_len_no_suffix but also remove the suffix number out > argument, this is because we don't know if a suffix number of say 100 > is in hexadecimal or decimal. As the only use of the suffix number is > in comparisons, it is safe there to compare the values as hexadecimal. > Modify perf_pmu__match_ignoring_suffix so that hexadecimal suffixes > are ignored. > > Only allow hexadecimal suffixes to be greater than length 2 (ie 3 or > more) so that S390's cpum_cf PMU doesn't lose its suffix. > > Change the return type of pmu_name_len_no_suffix to size_t to > workaround GCC incorrectly determining the result could be negative. > > Signed-off-by: Ian Rogers > --- > tools/perf/util/pmu.c | 33 +++++++++++++-------- > tools/perf/util/pmus.c | 67 ++++++++++++++++++++++++------------------ > tools/perf/util/pmus.h | 7 ++++- > 3 files changed, 65 insertions(+), 42 deletions(-) > Hi Ian, Perf test "perf_all_PMU_test" is failing when run against next-master(next-20240612) kernel with Arm64 on JUNO in our CI. It looks like it is failing when run on JUNO alone. Verified by running on other boards like RB5 and Ampere_altra and confirming that it does not fail on these boards. Suspecting that the suffixed 'armv8_pmuv3_0' naming could be the reason of test failure. Reverting the change (3241d46f5f54) seems to fix it. This works fine on Linux version v6.10-rc3 Failure log ------------ 110: perf all PMU test: --- start --- test child forked, pid 8279 Testing armv8_pmuv3/br_immed_retired/ Event 'armv8_pmuv3/br_immed_retired/' not printed in: # Running 'internals/synthesize' benchmark: Computing performance of single threaded perf event synthesis by synthesizing events on the perf process itself: Average synthesis took: 1169.431 usec (+- 0.144 usec) Average num. events: 35.000 (+- 0.000) Average time per event 33.412 usec Average data synthesis took: 1225.698 usec (+- 0.102 usec) Average num. events: 119.000 (+- 0.000) Average time per event 10.300 usec Performance counter stats for 'perf bench internals synthesize': 3263664785 armv8_pmuv3_0/br_immed_retired/ 25.472854464 seconds time elapsed 8.004791000 seconds user 17.060209000 seconds sys ---- end(-1) ---- 110: perf all PMU test : FAILED! Thanks, Aishwarya