From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (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 D721733555B for ; Thu, 20 Nov 2025 14:19:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763648352; cv=none; b=NcIus3Ii2JhuCsSeYki+HYtXGRPlgJk4xvqQ2BFqghisLvS9T5XXq+Uj5y+30AY0/5HsFChFhunch84LNu0hENCUBHx/e6JD5ojyj692pCEmGKtuZ6f/KKXahOgZ6W4SvOn3+S/wcMqzB/1qgYJpkgClVJcax5VmuUvq9yF8YWQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763648352; c=relaxed/simple; bh=71xR6QYzJdwdOokv/CFKZ49LWyyZFU7pcNK54isomOg=; h=Message-ID:Date:MIME-Version:Subject:To:References:Cc:From: In-Reply-To:Content-Type; b=Wk9Wyar4OMgZbW6oDAd29Tp0Cx41/evlqDo0IczjTLAaHOriqjwUNIYYmLcHEX0I5d3AKoIZ5pXR4koehnawoEF+Vh+GCO5wiGcCL3WyLygfpaLcNOnsxrjTSFf7xk402WLZeMmZhry+mqQ9dXJT4zQnFKy/SX49EbU4bmxd4fA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=GOAjCdeF; arc=none smtp.client-ip=209.85.221.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GOAjCdeF" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-42b379cd896so547187f8f.3 for ; Thu, 20 Nov 2025 06:19:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1763648347; x=1764253147; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:cc:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=mzRUBgRnLtue7JLgqZDwQWS0Dekpvo9x0SVB1SOpe+o=; b=GOAjCdeFbeT8wcBSuw8LmpaU5Scl2R5gEKMp+xVIj5OwTuyE6TTWBkxPlkXct3DVcI aUrShZ1B0/05VOyOkH8pOP2g543Anrs4rc4V42foIHQJOyEX0M/9ClTkY/JdhPgwzVBs /BV0qyWVNKhj6V2N6nPxXnb9gVW8hotba73LkGHfEA6eN4wWxobZiLbMR7pAA1781klP t2dlBPskdC69NSAY6kULB5x+mx8t1Fsb3tcxwYSXF6/F8++uLIaAA6m7hqgF9iv3x9Yw SfXYSgIF4PfnaXER0UGhe7IqohWkXFtjITbqwW398ss74Q4qKrjnP3+X8WieMJVg1i5l pmcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763648347; x=1764253147; h=content-transfer-encoding:in-reply-to:from:cc:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mzRUBgRnLtue7JLgqZDwQWS0Dekpvo9x0SVB1SOpe+o=; b=MM5HoA/AQ5tSy7Ni4DuYj6S5UVsdJQxm8d5LWXFQVhaEW8yUBGcmNIx2DCET/r5ydd /GjncipJcjwTNu9gi1mYBRDO44CZhkTzrqGgjdfpub18DWwZKMNQp6h3V3XyCc43W0jr +Joeih+CTKgRWXwhRiwXX2dBxpRU0b0aeMena6F7SyZic7xrIZ3AgL7AQyVuJ0MF2eaF NouaLwBrSvOhhyliKbQEndAzFibn4ItMVXhtFy+0O2hLe/G5Bb4iMSI2YrzNMPyTncP9 sVjX6MXpOSlJOTXv3eki6DTaFHPiedDXrgEy1l4GVl67sxPXgi6yidDC/M5tPXeTfPzy 7aWw== X-Forwarded-Encrypted: i=1; AJvYcCXTXYpoa0wTsmz7Rz+PlLwA5HhWDPUxqT1QGke64TQkj11fulnaxYL4CET1Zo0qCxStC2HeOBGjNcothF0=@vger.kernel.org X-Gm-Message-State: AOJu0Yza54GJLUVmCQsoAOY7763eeoudVEP97DUFQqV46YFk9PoxhpBq POq0KLAM6h7EN9OjHpTGcc1Cn99WLz5HNtGjSZc+f7TstKN8cZW7s9z/OvhaTRcGHtauL9z1YhK jvWNKHSM= X-Gm-Gg: ASbGnct7E/wblVHz7v4pTPwtLTW36veJLThYWb0HsziUpwUM9zYquELAyJP+E4Of39v EPhqXJ5IIbvPiLLs8o8TIb/WvmrzJVLLkmS3vs5M7rTRrqo4dGm9lQQwTQSh7nYgwuyqz3bVfDw KY/7yc/QtM7AOXPJohKfbZTT+gjqBPaSl3ObuadjEHbE5PWB6ruTWbsrRql9iwZAjBnk/mt8spV 8RPZUdQmgD1sRsaWJp1vaG39+isLlKGOZmGz/63XDwnR14KLPD5PytNHyKkXgdIlaKE2BqyLzhb xyyLRW+rhQS6PJFT+dNc9rFtUnNOrL1rIRCFqXL8dZW0+fM42ojQKkfy8I5IzKaYQ1iLeX8qR0U WHBNUJ8NHa3NxksmsIacz6k5x2vOBDyib0Q4skbq8H/Gb1hBM9qJ65qOb3BmaFTASqUaDaUZh1n Iw/ksuopnGw01Tlj6U X-Google-Smtp-Source: AGHT+IEyXLt5JVQU6RfXVIsmFqkafV/foIUCJq4WJcs8aLMI+3oGtWeUMpw2rYrwctuS12CNjB8/Gg== X-Received: by 2002:a05:6000:25c4:b0:42b:3dfb:645c with SMTP id ffacd0b85a97d-42cb9a11829mr3019069f8f.12.1763648346883; Thu, 20 Nov 2025 06:19:06 -0800 (PST) Received: from [192.168.1.3] ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42cb7fd8c47sm5953302f8f.38.2025.11.20.06.19.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Nov 2025 06:19:06 -0800 (PST) Message-ID: Date: Thu, 20 Nov 2025 14:19:05 +0000 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 v1] perf test all metrics: Fully ignore Default metric failures To: Ian Rogers References: <20251119193047.2238095-1-irogers@google.com> Content-Language: en-US Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Jiri Olsa , Adrian Hunter , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Richter From: James Clark In-Reply-To: <20251119193047.2238095-1-irogers@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 19/11/2025 7:30 pm, Ian Rogers wrote: > Determine if a metric is default from `perf list --raw-dump $m` eg: > ``` > $ perf list --raw-dump l1_prefetch_miss_rate > Default4 l1_prefetch_miss_rate > ``` > If a metric has "not supported" or "no supported events" then ignore > these failures for default metrics. Tidy up the skip/fail messages in > the output to make them easier to spot/read. > > Reported-by: Thomas Richter > Closes: https://lore.kernel.org/linux-perf-users/20251119104751.51960-1-tmricht@linux.ibm.com/ > Reported-by: Namhyung Kim > Reported-by: James Clark > Closes: https://lore.kernel.org/lkml/aRi9xnwdLh3Dir9f@google.com/ > Signed-off-by: Ian Rogers Reviewed-by: James Clark > --- > tools/perf/tests/shell/stat_all_metrics.sh | 27 ++++++++++++++-------- > 1 file changed, 17 insertions(+), 10 deletions(-) > > diff --git a/tools/perf/tests/shell/stat_all_metrics.sh b/tools/perf/tests/shell/stat_all_metrics.sh > index a7edf01b3943..3dabb39c7cc8 100755 > --- a/tools/perf/tests/shell/stat_all_metrics.sh > +++ b/tools/perf/tests/shell/stat_all_metrics.sh > @@ -27,19 +27,20 @@ for m in $(perf list --raw-dump metrics); do > fi > if [[ "$result" =~ "Cannot resolve IDs for" || "$result" =~ "No supported events found" ]] > then > - if [[ "$m" == @(l1_prefetch_miss_rate|stalled_cycles_per_instruction) ]] > + if [[ $(perf list --raw-dump $m) == "Default"* ]] > then > - # Default metrics that may use unsupported events. > + echo "[Ignored $m] failed but as a Default metric this can be expected" > + echo $result > continue > fi > - echo "Metric contains missing events" > + echo "[Failed $m] Metric contains missing events" > echo $result > err=1 # Fail > continue > elif [[ "$result" =~ \ > "Access to performance monitoring and observability operations is limited" ]] > then > - echo "Permission failure" > + echo "[Skipped $m] Permission failure" > echo $result > if [[ $err -eq 0 ]] > then > @@ -48,7 +49,7 @@ for m in $(perf list --raw-dump metrics); do > continue > elif [[ "$result" =~ "in per-thread mode, enable system wide" ]] > then > - echo "Permissions - need system wide mode" > + echo "[Skipped $m] Permissions - need system wide mode" > echo $result > if [[ $err -eq 0 ]] > then > @@ -57,7 +58,13 @@ for m in $(perf list --raw-dump metrics); do > continue > elif [[ "$result" =~ "" ]] > then > - echo "Not supported events" > + if [[ $(perf list --raw-dump $m) == "Default"* ]] > + then > + echo "[Ignored $m] failed but as a Default metric this can be expected" > + echo $result > + continue > + fi > + echo "[Skipped $m] Not supported events" > echo $result > if [[ $err -eq 0 ]] > then > @@ -66,7 +73,7 @@ for m in $(perf list --raw-dump metrics); do > continue > elif [[ "$result" =~ "" ]] > then > - echo "Not counted events" > + echo "[Skipped $m] Not counted events" > echo $result > if [[ $err -eq 0 ]] > then > @@ -75,7 +82,7 @@ for m in $(perf list --raw-dump metrics); do > continue > elif [[ "$result" =~ "FP_ARITH" || "$result" =~ "AMX" ]] > then > - echo "FP issues" > + echo "[Skipped $m] FP issues" > echo $result > if [[ $err -eq 0 ]] > then > @@ -84,7 +91,7 @@ for m in $(perf list --raw-dump metrics); do > continue > elif [[ "$result" =~ "PMM" ]] > then > - echo "Optane memory issues" > + echo "[Skipped $m] Optane memory issues" > echo $result > if [[ $err -eq 0 ]] > then > @@ -101,7 +108,7 @@ for m in $(perf list --raw-dump metrics); do > # No error result and metric shown. > continue > fi > - echo "Metric '$m' has non-zero error '$result_err' or not printed in:" > + echo "[Failed $m] has non-zero error '$result_err' or not printed in:" > echo "$result" > err=1 > done