lkml.org 
[lkml]   [2020]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 08/23] perf/x86: Expose CPUID enumeration bits for arch LBR
On Tue, Jun 30, 2020 at 11:36:29AM -0400, Liang, Kan wrote:
> > Why keep the full CPUID leaf here? What's wrong with something like:
> >
> > unsigned int lbr_depth_mask:8;
> > unsigned int lbr_deep_c_reset:1;
> > unsigned int lbr_lip:1;
> > unsigned int lbr_cpl:1;
> > unsigned int lbr_filter:1;
> > unsigned int lbr_call_stack:1;
> > unsigned int lbr_mispred:1;
> > unsigned int lbr_timed_lbr:1;
> > unsigned int lbr_br_type:1;
> >
> > That's only 2 bytes, instead of 24.
>
> Yes, it can save the space.
> I will add some codes in patch 14 to initialize these items in
> intel_pmu_arch_lbr_init().

It also makes stuff like:

> + if (!x86_pmu.lbr_ebx.split.lbr_cpl ||
> + !x86_pmu.lbr_ebx.split.lbr_filter ||
> + !x86_pmu.lbr_ebx.split.lbr_call_stack)

eminently more readable.

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