[PATCH 0/4] perf: Support thread maps larger than one record
From: Leo Yan
Date: Sun Nov 15 2026 - 08:34:54 EST
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@xxxxxxx>
---
Leo Yan (4):
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 | 21 +++-
tools/perf/builtin-stat.c | 25 +++--
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, 256 insertions(+), 32 deletions(-)
---
base-commit: e8b3879165c74999b15e918b14ece7564cb09c59
change-id: 20261019-perf_fix_large_threads-f81558a92988
Best regards,
--
Leo Yan <leo.yan@xxxxxxx>