From nobody Sun Feb 8 15:58:40 2026 Received: from mail-dl1-f74.google.com (mail-dl1-f74.google.com [74.125.82.74]) (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 C32E2335542 for ; Thu, 8 Jan 2026 21:27:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767907639; cv=none; b=U16q0K4IfSOZwV4ret6aVei5pfAEFF/rpI2E2YB8kReL3DR9jIHA2HYCNhcecVBCcKpBX9NVDAd+zRI1swmo+TqdkPBOiX2G2C/+J1yqsUFUYXA//UTVuZoFK4v6qy5JxTffv4iTR8ACxW1DVdB6OHQA/dqDEKaUhWt5ecLdZRc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767907639; c=relaxed/simple; bh=gij9HVFo+8YcRc2A29tLhsb/VSjGl5q57WrozqE/p1Y=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Content-Type; b=uPEAGkXEqpK4zGPlyySF5fJYh40GG0dt+jMjOBi97jIs1ZfMmL0hMSWqCyuo+tkk3twOiT2arqLQsGwOYOLJEBaMBlBWVlQZLDwh4bXq7XD/DWqTYsVlFuyOyaWD2iMVZxEqkQWcN7FodYaLB3tbwkmYTFAELr8y4PIDz4NX15o= 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=UCrOpSXg; arc=none smtp.client-ip=74.125.82.74 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="UCrOpSXg" Received: by mail-dl1-f74.google.com with SMTP id a92af1059eb24-11b94abc09dso4342917c88.1 for ; Thu, 08 Jan 2026 13:27:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767907637; x=1768512437; 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=JJOaT7VWATb5931yVIrXVJY+gMVDezHuu16jYMmARaA=; b=UCrOpSXgqwAsUkAgqDurT+7VYRIqgEbFbUOTDI6pOnKlEUlbTA3m2fDAn5QbGG012S RLn8cgcU92fJZviNUpKhhFwxd27xutyZE2w/xfqMJ30TTOovnaaN0WKT18JVZNb6qhV8 8kJ2pde9h//k7u1es3Twkvl8kt+ZSR6hnCldt1OivhsHSzI2RcsCYQqlQKSg3+QromiR GM3CM7w2kBrcfvwW78N/qtIDy/KTO/8bgc9Da/w8w8ih8Z1/DBXx7EIF1bV0Q77ERfZa lvwhdyLAminjl861NUryJ597GUH3/hLHwKg9MdAny3leqEnCRInfybYwaPXX06mi9qfT +QyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767907637; x=1768512437; 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=JJOaT7VWATb5931yVIrXVJY+gMVDezHuu16jYMmARaA=; b=fyY0R0ptqCQXGUCmlYwC/umKYcyOiB5+GwbNSm1bRXb44KAi1bXUCFh3FZoN09UGxV HPlRiRJ/zFAVel31+WNdaE7JioJXQVomuZTgSh0Rv44VMmptVUnJZl4jUNjYs12Lic2O XqIPn8RR3aOrKf8F2w6rvYmoELQfBRY+rIwXg6fdutckUrqwRtwYohhm6JNgoMutZv5/ K03A7+0SLCrVk/jYReQky5AH3Eg/fbDmaUxwOHVHa6RjXz/yreaaRAFe3ji6tkvMfQHZ 00wlEMC5JHLlDSAKYobsrm3SJ2ZlrkBNg2gUs6KNLhsgfTwEYkyWyOqoR5ET7ZBhrGm8 lZ9g== X-Forwarded-Encrypted: i=1; AJvYcCUGFg9zPn37+DNhTzb1XbiikZKQDQU9xKo+6DefJ7/Kprc+B5k4WOVFWvU8ubtqAgiXgIF1vT1ioj/WWH8=@vger.kernel.org X-Gm-Message-State: AOJu0YwVystQXVPbfuOiIrd6d3OLd9Hwqo9SYKLCy4CrzY/FMn9aoXXz SMgFPvJcufL+dbEoGZKhnYQa1SluQaTOKJebpzPDaFhi1S+hpVV3MM8ZzhFepXu0lu1lZHfKpR4 H7T+35LAdzQ== X-Google-Smtp-Source: AGHT+IFz3KgK5j6u4eklj/8Bl9SBNLi5PlkGJkS2SZG1fYowmsCYCqslh5e1ENtRqxQ9ZP9/Pnu5lyK/YAWa X-Received: from dlbqi2.prod.google.com ([2002:a05:7022:ebc2:b0:120:5def:9544]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:fe08:b0:122:1d4:28ff with SMTP id a92af1059eb24-12201d42ac2mr2248712c88.26.1767907636815; Thu, 08 Jan 2026 13:27:16 -0800 (PST) Date: Thu, 8 Jan 2026 13:26:50 -0800 In-Reply-To: <20260108212652.768875-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: <20260108212652.768875-1-irogers@google.com> X-Mailer: git-send-email 2.52.0.457.g6b5491de43-goog Message-ID: <20260108212652.768875-2-irogers@google.com> Subject: [PATCH v6 1/3] perf evlist: Missing TPEBS close in evlist__close From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , "Dr. David Alan Gilbert" , Yang Li , James Clark , Thomas Falcon , Thomas Richter , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Andi Kleen , Dapeng Mi Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The libperf evsel close won't close TPEBS events properly. Add a test to do this. The libperf close routine is used in evlist__close for affinity reasons. Signed-off-by: Ian Rogers --- tools/perf/util/evlist.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 649519628541..bb042d89e6a0 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -1356,6 +1356,8 @@ void evlist__close(struct evlist *evlist) return; =20 evlist__for_each_cpu(evlist_cpu_itr, evlist, &affinity) { + if (evlist_cpu_itr.cpu_map_idx =3D=3D 0 && evsel__is_retire_lat(evlist_c= pu_itr.evsel)) + evsel__tpebs_close(evlist_cpu_itr.evsel); perf_evsel__close_cpu(&evlist_cpu_itr.evsel->core, evlist_cpu_itr.cpu_map_idx); } --=20 2.52.0.457.g6b5491de43-goog