[PATCH 0/6] perf session: Extend reader object to allow multiple readers
From: Alexey Bayduraev
Date: Wed Sep 29 2021 - 04:42:02 EST
Patch set adds state info and decompressor object into reader object
that made possible to split reader__process_events function into three
logical parts: init/exit, map/unmap and single event reader which are
used in events reader loop. This approach allows reading multiple trace
files at the same time.
The design and implementation are based on the prototype [1], [2].
The patch set was separated from [3] and already was rewieved by
Namhyung Kim and Riccardo Mancini. The difference from [3] is that
this patch set keeps reader object allocation on the stack.
Tested:
tools/perf/perf record -o prof.data -- matrix.gcc.g.O3
tools/perf/perf record -o prof.data -z -- matrix.gcc.g.O3
tools/perf/perf report -i prof.data
tools/perf/perf report -i prof.data --call-graph=callee
tools/perf/perf report -i prof.data --stdio --header
tools/perf/perf report -i prof.data -D --header
[1] git clone https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git -b perf/record_threads
[2] https://lore.kernel.org/lkml/20180913125450.21342-1-jolsa@xxxxxxxxxx/
[3] https://lore.kernel.org/lkml/cover.1629186429.git.alexey.v.bayduraev@xxxxxxxxxxxxxxx/
Alexey Bayduraev (6):
perf session: Move reader structure to the top
perf session: Introduce reader_state in reader object
perf session: Introduce decompressor into reader object
perf session: Move init/exit into reader__init/reader__exit functions
perf session: Move map/unmap into reader__mmap function
perf session: Load single file for analysis
tools/perf/util/session.c | 272 +++++++++++++++++++++++++-------------
tools/perf/util/session.h | 2 +
2 files changed, 179 insertions(+), 95 deletions(-)
--
2.19.0