Re: [PATCH v3 06/15] perf/x86/amd: Support PERF_SAMPLE_PHY_ADDR

From: Ravi Bangoria
Date: Fri Sep 30 2022 - 01:05:58 EST


>> diff --git a/kernel/events/core.c b/kernel/events/core.c
>> index e1ffdb861b53..49bc3b5e6c8a 100644
>> --- a/kernel/events/core.c
>> +++ b/kernel/events/core.c
>> @@ -7435,7 +7435,8 @@ void perf_prepare_sample(struct perf_event_header *header,
>> header->size += size;
>> }
>>
>> - if (sample_type & PERF_SAMPLE_PHYS_ADDR)
>> + if (sample_type & PERF_SAMPLE_PHYS_ADDR &&
>> + filtered_sample_type & PERF_SAMPLE_PHYS_ADDR)
>
> It'd be enough to check the filtered_sample_type only.

+1. Will fix it.

Thanks,
Ravi