[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6850dc71-e709-42ce-9113-9cb5a7a590f7@linux.intel.com>
Date: Thu, 19 Oct 2023 10:28:52 -0400
From: "Liang, Kan" <kan.liang@...ux.intel.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: mingo@...hat.com, acme@...nel.org, linux-kernel@...r.kernel.org,
mark.rutland@....com, alexander.shishkin@...ux.intel.com,
jolsa@...nel.org, namhyung@...nel.org, irogers@...gle.com,
adrian.hunter@...el.com, ak@...ux.intel.com, eranian@...gle.com,
alexey.v.bayduraev@...ux.intel.com, tinghao.zhang@...el.com
Subject: Re: [PATCH V4 4/7] perf/x86/intel: Support LBR event logging
On 2023-10-19 7:00 a.m., Peter Zijlstra wrote:
> On Wed, Oct 04, 2023 at 11:40:41AM -0700, kan.liang@...ux.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?
Sure, I will use the name LBR_COUNTER_BITS.
Thanks,
Kan
Powered by blists - more mailing lists