Re: [tip: perf/core] perf: Use sample_flags for raw_data

From: Athira Rajeev
Date: Wed Oct 19 2022 - 07:45:41 EST




> On 28-Sep-2022, at 12:27 PM, tip-bot2 for Namhyung Kim <tip-bot2@xxxxxxxxxxxxx> wrote:
>
> The following commit has been merged into the perf/core branch of tip:
>
> Commit-ID: 838d9bb62d132ec3baf1b5aba2e95ef9a7a9a3cd
> Gitweb: https://git.kernel.org/tip/838d9bb62d132ec3baf1b5aba2e95ef9a7a9a3cd
> Author: Namhyung Kim <namhyung@xxxxxxxxxx>
> AuthorDate: Wed, 21 Sep 2022 15:00:32 -07:00
> Committer: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> CommitterDate: Tue, 27 Sep 2022 22:50:24 +02:00
>
> perf: Use sample_flags for raw_data
>
> Use the new sample_flags to indicate whether the raw data field is
> filled by the PMU driver. Although it could check with the NULL,
> follow the same rule with other fields.
>
> Remove the raw field from the perf_sample_data_init() to minimize
> the number of cache lines touched.
>
> Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
> Link: https://lkml.kernel.org/r/20220921220032.2858517-2-namhyung@xxxxxxxxxx

Hi Namhyung,

This commit ("perf: Use sample_flags for raw_data") added
PERF_SAMPLE_RAW check in perf_prepare_sample. To be in sync
while we output sample to memory, do we also need to add
similar check in perf_output_sample ? I am pasting change below.
Please share your thoughts.