On Thu, Jan 12, 2023 at 1:40 PM Namhyung Kim <namhyung@xxxxxxxxxx> wrote: > > Factor out perf_prepare_header() so that it can call > perf_prepare_sample() without a header if not needed. > > Also it checks the filtered_sample_type to avoid duplicate > work when perf_prepare_sample() is called twice (or more). > > Cc: linux-s390@xxxxxxxxxxxxxxx > Cc: x86@xxxxxxxxxx > Suggested-by: Peter Zijlstr <peterz@xxxxxxxxxxxxx> > Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx> Acked-by: Song Liu <song@xxxxxxxxxx>