Re: [PATCH V4 4/7] perf/x86/intel: Support LBR event logging
From: Peter Zijlstra
Date: Thu Oct 19 2023 - 14:18:44 EST
On Thu, Oct 19, 2023 at 10:26:01AM -0400, Liang, Kan wrote:
> The original LBR event data is saved at offset 32 of LBR_INFO register.
> In get_lbr_events(), the data was simply copied to the offset 32 of
> cpuc->lbr_events.
Urgh, missed that. Clearly reading is a skill :-)
>
> The intel_pmu_update_lbr_event() reorders the value and saves it
> starting from the offset 0.
>
> I agree it's hard to read since it combines the src and dst into the
> same variable.
>
> I will use the suggested code and also update the get_lbr_events().
Thanks!