Re: [PATCH 1/8] perf/core: Save the dynamic parts of sample data size

From: Song Liu
Date: Fri Jan 13 2023 - 15:44:46 EST


On Thu, Jan 12, 2023 at 1:40 PM Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
>
> The perf sample data can be divided into parts. The event->header_size
> and event->id_header_size keep the static part of the sample data which
> is determined by the sample_type flags.
>
> But other parts like CALLCHAIN and BRANCH_STACK are changing dynamically
> so it needs to see the actual data. In preparation of handling repeated
> calls for perf_prepare_sample(), it can save the dynamic size to the
> perf sample data to avoid the duplicate work.
>
> Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>

Acked-by: Song Liu <song@xxxxxxxxxx>