lkml.org 
[lkml]   [2020]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 14/23] perf/x86/intel/lbr: Support Architectural LBR
On Tue, Jun 30, 2020 at 12:17:57PM -0400, Liang, Kan wrote:

> > > +static inline bool is_lbr_call_stack_bit_set(u64 config)
> > > +{
> > > + if (x86_pmu.arch_lbr)
> > > + return !!(config & ARCH_LBR_CALL_STACK);
> > > +
> > > + return !!(config & LBR_CALL_STACK);
> > > +}

> > > + x86_pmu.arch_lbr = true;

> > How about we make this here clear FEATURE_ARCH_LBR if it fails and then
> > do away with x86_pmu.arch_lbr and use
> > static_cpu_has(X86_FEATURE_ARCH_LBR) a lot more?
>
> Yes, it's doable. So we can save a bit for arch_lbr in structure x86_pmu.

Mostly it's about getting rid of a load-test-branch.

> I will clear the FEATURE_ARCH_LBR via clear_cpu_cap(&boot_cpu_data,
> X86_FEATURE_ARCH_LBR);, if the check fails.
> I will replace x86_pmu.arch_lbr with static_cpu_has(X86_FEATURE_ARCH_LBR)
> everywhere.

Thanks!

\
 
 \ /
  Last update: 2020-06-30 18:44    [W:0.072 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site