Linux Perf Users
 help / color / mirror / Atom feed
* [PATCH v2 0/7] perf: Support thread maps larger than one record
@ 2026-12-04 11:23 Leo Yan
  2026-12-04 11:23 ` [PATCH v2 1/7] perf stat: Release aggregation maps on report exit Leo Yan
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Leo Yan @ 2026-12-04 11:23 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Namhyung Kim, Jiri Olsa, Ian Rogers,
	Adrian Hunter, James Clark, Suyash Mahar, Amir Ayupov
  Cc: linux-perf-users, linux-kernel, Leo Yan

PERF_RECORD_THREAD_MAP has a 16-bit size field and can hold at most
2,729 entries. Larger maps overflow the size field, producing records
that readers reject.

This series splits large maps into records with a continuation flag and
updates perf script and perf stat report to assemble the complete map
before allocating per-thread counters. It also adds boundary tests and
documents the format.

Maps that fit in one record keep their existing encoding. Split maps
require updated readers.

Signed-off-by: Leo Yan <leo.yan@arm.com>
---
Changes in v2:
- Fixed leak issues (Sashiko).
- Published maps until the last map record is handled (Sashiko).
- Link to v1: https://lore.kernel.org/r/20261115-perf_fix_large_threads-v1-0-69c9b86b9ae5@arm.com

---
Leo Yan (7):
      perf stat: Release aggregation maps on report exit
      perf stat: Drop CPU and thread map references on report exit
      perf stat: Release the initial evlist before opening the session
      perf synthetic-events: Split oversized thread maps into records
      perf: Assemble split thread maps in script and stat report
      perf test: Cover multi-record thread map synthesis
      perf docs: Describe multi-record thread maps

 tools/lib/perf/include/perf/event.h                |   8 ++
 tools/perf/Documentation/perf.data-file-format.txt |  24 +++++
 tools/perf/builtin-script.c                        |  46 +++++++--
 tools/perf/builtin-stat.c                          |  67 +++++++++++--
 tools/perf/tests/thread-map.c                      | 111 +++++++++++++++++++++
 tools/perf/util/synthetic-events.c                 |  46 +++++++--
 tools/perf/util/thread_map.c                       |  51 ++++++++--
 tools/perf/util/thread_map.h                       |   2 +
 8 files changed, 318 insertions(+), 37 deletions(-)
---
base-commit: 316fdb2d4ed172316923794f91dc9cd2b44bebfd
change-id: 20261019-perf_fix_large_threads-f81558a92988

Best regards,
-- 
Leo Yan <leo.yan@arm.com>


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-12-04 13:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 11:23 [PATCH v2 0/7] perf: Support thread maps larger than one record Leo Yan
2026-12-04 11:23 ` [PATCH v2 1/7] perf stat: Release aggregation maps on report exit Leo Yan
2026-12-04 11:23 ` [PATCH v2 2/7] perf stat: Drop CPU and thread map references " Leo Yan
2026-12-04 11:23 ` [PATCH v2 3/7] perf stat: Release the initial evlist before opening the session Leo Yan
2026-12-04 11:23 ` [PATCH v2 4/7] perf synthetic-events: Split oversized thread maps into records Leo Yan
2026-12-04 12:15   ` sashiko-bot
2026-12-04 12:31     ` Leo Yan
2026-12-04 11:23 ` [PATCH v2 5/7] perf: Assemble split thread maps in script and stat report Leo Yan
2026-12-04 12:39   ` sashiko-bot
2026-12-04 11:23 ` [PATCH v2 6/7] perf test: Cover multi-record thread map synthesis Leo Yan
2026-12-04 13:22   ` sashiko-bot
2026-12-04 11:23 ` [PATCH v2 7/7] perf docs: Describe multi-record thread maps Leo Yan
2026-12-04 13:22 ` [PATCH v2 0/7] perf: Support thread maps larger than one record sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox