Re: [PATCH v1] perf pmu-events: Parallelize JSON and metric pre-computation in jevents.py
From: Namhyung Kim
Date: Sun Jul 26 2026 - 01:24:36 EST
On Wed, 22 Jul 2026 10:31:38 -0700, Ian Rogers wrote:
> Currently, jevents.py parses hundreds of JSON event and metric files
> sequentially across all CPU architectures during Kbuild startup,
> taking ~3.5 seconds of single-core execution time.
>
> Refactor jevents.py to pre-populate its internal JSON AST cache in
> parallel across all available CPU cores using
> ProcessPoolExecutor. First gather all the paths with ftw and
> collect_json, then spawn _parallel_read_json_events that starts
> workers to just read the json events. Define the worker process
> initializer _init_worker so that _arch_std_events is available under
> spawn multiprocessing semantics.
>
> [...]
Applied to perf-tools-next, thanks!
Best regards,
Namhyung