From nobody Tue Nov 11 13:16:34 2025 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) (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 CAD8734B41E for ; Tue, 11 Nov 2025 04:04:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762833883; cv=none; b=pG2/QPGezvwdo970goC9Signhpe9PMna88VotE817z8oKKqbEE2xzSBNtCTYAHi3MlLtlpaLPvVBqCuRi8f1FsA27aUuymr2bnfx+x9wKC5ikP5Lnf64O/CAmdaYSuw/e4uUdt7F/7At/sgmwRcE3jJ7IyAdl2ufhQ3Cp1hh608= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762833883; c=relaxed/simple; bh=cZF5rXK0ot4f5Ll54hzIMYMkIxY+GXfM/HIllfqaohs=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Content-Type; b=QVo5LVxfFMC1eQA+fVRcFNkCuhoWyGH4LVgFlTkOdaABoNimyJttCfPg5x9yJdC4I4HwQSJtLZt8J/4eUVRHfwlmobr1mmbEv8SQ2HkU+nsSFrZ8ZxHxgdfljn6uAzsNCDgeeK+HuzFjYYsK/U43oobTLrNY54hLbnDS8le4tfc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=tMHZ+qj8; arc=none smtp.client-ip=209.85.214.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="tMHZ+qj8" Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-297b35951b7so62947525ad.3 for ; Mon, 10 Nov 2025 20:04:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1762833881; x=1763438681; darn=vger.kernel.org; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=CJrFojSq6nlkAfypEMFi1zUKz5050bK3dx0VztPcSL4=; b=tMHZ+qj8E2QRfuhNUb4UXJNNDTw2JFFhWTcQT612muYlXUcXRAj772/9qMEvXT6Z3Q zL4BGjDwroZe4GLZueozy4yLTGLuTeOyPv2zsOGnSca339MkO4DTiPT0YXEmzwpimVGC +vN/slGRzVT+HZGC57XXAiUZQ1sGvw6i03BJHAUmvfk6HB6thkujsBRXlwtwiEOJ0Fhs aWMCJI6Y6QrmWbwh2kuGcA7J9NCSRIMATVmk7IvqFltowbluJe+zVFfuYzerWt+ds7f8 P5qq5+YXTWF7GniPmE0j/QNhBljK6Yq1Vlx0DjOYPatLdcs2IKhmaPmIu0xxYolDFM7I Rqlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762833881; x=1763438681; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CJrFojSq6nlkAfypEMFi1zUKz5050bK3dx0VztPcSL4=; b=byANOIeWNAiY5aLXZt3Fn7zPd0DBgfpXQvY4QTBLzfGH25yga2Tptug3ln09mXvo2I AxX1kESK+orOlKidWFov7oF5M6pT/fse05kvYFda64MpQzglFhjq1GGlTI68hXJ0qXXf XnkwM8JY85C+yXbn9kOPG20QOS4CMpMp6en6j7O8m5swFQPrkRnF85YofSa8YWJQsDeZ edNAgZUgJKgKzd2yWUX13gNOH25zs+bpjX9O6IYkOjvfEPLC9WDL7NmrKsGSjVJ8wdwZ WLpZKmMqElTUV6aopeks9ZJoos0SA3pifvtcngjjJBhTSFHX64uxT3KdtkebS0uoLxx+ Hx8Q== X-Forwarded-Encrypted: i=1; AJvYcCUFLYELFWix3Q8Su1w2anIl/TnfsvnDoJvnMyp5qEjegtdxzwYB8DXbCKMSKLGdNezFzoxsP7cr1n94Oi8=@vger.kernel.org X-Gm-Message-State: AOJu0Yz85k9FLkrGUK9CB4UqQ95rDznsaNALEHmRvgT4wM2kEhV/8pP6 E+DGVbpf8r2gkglmdE7kHIN6JhXBoMja/vaqHwJ7DoSMJ6/MrDgd3V+ElJTVRuF7ONv+1HmPY4d PY55XgHQ2IA== X-Google-Smtp-Source: AGHT+IF4k0uFcaS7/tC4cyXC8wsIhicVjSl/j9UnN2s9TsgyF6DRp0WIZCwddGEHn70Zm1RF4d0DU8ZooCF5 X-Received: from dlbqd3.prod.google.com ([2002:a05:7023:b03:b0:119:49ca:6b8c]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:da8c:b0:298:3e3a:ae6 with SMTP id d9443c01a7336-2983e3a0b4bmr30376125ad.48.1762833881039; Mon, 10 Nov 2025 20:04:41 -0800 (PST) Date: Mon, 10 Nov 2025 20:04:07 -0800 In-Reply-To: <20251111040417.270945-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251111040417.270945-1-irogers@google.com> X-Mailer: git-send-email 2.51.2.1041.gc1ab5b90ca-goog Message-ID: <20251111040417.270945-9-irogers@google.com> Subject: [PATCH v3 08/18] perf stat: Fix default metricgroup display on hybrid From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , James Clark , Xu Yang , Chun-Tse Shao , Thomas Richter , Sumanth Korikkar , Collin Funk , Thomas Falcon , Howard Chu , Dapeng Mi , Levi Yun , Yang Li , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Andi Kleen , Weilin Wang Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The logic to skip output of a default metric line was firing on Alderlake and not displaying 'TopdownL1 (cpu_atom)'. Remove the need_full_name check as it is equivalent to the different PMU test in the cases we care about, merge the 'if's and flip the evsel of the PMU test. The 'if' is now basically saying, if the output matches the last printed output then skip the output. Before: ``` TopdownL1 (cpu_core) # 11.3 % tma_bad_spe= culation # 24.3 % tma_fronten= d_bound TopdownL1 (cpu_core) # 33.9 % tma_backend= _bound # 30.6 % tma_retiring # 42.2 % tma_backend= _bound # 25.0 % tma_fronten= d_bound (49.81%) # 12.8 % tma_bad_spe= culation # 20.0 % tma_retirin= g (59.46%) ``` After: ``` TopdownL1 (cpu_core) # 8.3 % tma_bad_spe= culation # 43.7 % tma_fronten= d_bound # 30.7 % tma_backend= _bound # 17.2 % tma_retiring TopdownL1 (cpu_atom) # 31.9 % tma_backend= _bound # 37.6 % tma_fronten= d_bound (49.66%) # 18.0 % tma_bad_spe= culation # 12.6 % tma_retirin= g (59.58%) ``` Signed-off-by: Ian Rogers --- tools/perf/util/stat-shadow.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c index afbc49e8cb31..c1547128c396 100644 --- a/tools/perf/util/stat-shadow.c +++ b/tools/perf/util/stat-shadow.c @@ -256,11 +256,9 @@ static void perf_stat__print_metricgroup_header(struct= perf_stat_config *config, * event. Only align with other metics from * different metric events. */ - if (last_name && !strcmp(last_name, name)) { - if (!need_full_name || last_pmu !=3D evsel->pmu) { - out->print_metricgroup_header(config, ctxp, NULL); - return; - } + if (last_name && !strcmp(last_name, name) && last_pmu =3D=3D evsel->pmu) { + out->print_metricgroup_header(config, ctxp, NULL); + return; } =20 if (need_full_name && evsel->pmu) --=20 2.51.2.1041.gc1ab5b90ca-goog