Messages in this thread | | | Date | Thu, 19 Oct 2023 13:00:56 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH V4 4/7] perf/x86/intel: Support LBR event logging |
| |
On Wed, Oct 04, 2023 at 11:40:41AM -0700, kan.liang@linux.intel.com wrote:
> +static ssize_t branch_counter_width_show(struct device *cdev, > + struct device_attribute *attr, > + char *buf) > +{ > + return snprintf(buf, PAGE_SIZE, "2\n"); > +}
> +#define ARCH_LBR_EVENT_LOG_WIDTH 2
I'm assuming this is the same '2' ? And having it hard-coded in two locations is awesome..
> +#define ARCH_LBR_EVENT_LOG_MASK 0x3
Should probably be ((1<<2)-1)
As per that other email, the naming is confusing, should this not be:
ARCH_LBR_EVENT_COUNTER_BITS
or, since it's all local to lbr.c something shorter still, like:
LBR_COUNTER_BITS
hmm?
| |