[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231019110056.GH36211@noisy.programming.kicks-ass.net>
Date: Thu, 19 Oct 2023 13:00:56 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: kan.liang@...ux.intel.com
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 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?
Powered by blists - more mailing lists