[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230406151022.GB11802@willie-the-truck>
Date: Thu, 6 Apr 2023 16:10:23 +0100
From: Will Deacon <will@...nel.org>
To: Peter Newman <peternewman@...gle.com>
Cc: mark.rutland@....com, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
acme@...nel.org, adrian.hunter@...el.com,
alexander.shishkin@...ux.intel.com, catalin.marinas@....com,
eranian@...gle.com, irogers@...gle.com, jolsa@...nel.org,
mingo@...hat.com, namhyung@...nel.org, peterz@...radead.org
Subject: Re: [PATCH v5] arm64: pmuv3: dynamically map
PERF_COUNT_HW_BRANCH_INSTRUCTIONS
Hi Peter,
On Mon, Apr 03, 2023 at 11:15:47AM +0200, Peter Newman wrote:
> From: Stephane Eranian <eranian@...gle.com>
>
> The mapping of perf_events generic hardware events to actual PMU events on
> ARM PMUv3 may not always be correct. This is in particular true for the
> PERF_COUNT_HW_BRANCH_INSTRUCTIONS event. Although the mapping points to an
> architected event, it may not always be available. This can be seen with a
> simple:
>
> $ perf stat -e branches sleep 0
> Performance counter stats for 'sleep 0':
>
> <not supported> branches
>
> 0.001401081 seconds time elapsed
>
> Yet the hardware does have an event that could be used for branches.
>
> Dynamically check for a supported hardware event which can be used for
> PERF_COUNT_HW_BRANCH_INSTRUCTIONS at mapping time.
>
> And with that:
>
> $ perf stat -e branches sleep 0
>
> Performance counter stats for 'sleep 0':
>
> 166,739 branches
>
> 0.000832163 seconds time elapsed
>
> Co-Developed-by: Stephane Eranian <eranian@...gle.com>
> Signed-off-by: Stephane Eranian <eranian@...gle.com>
> Co-Developed-by: Mark Rutland <mark.rutland@....com>
> Signed-off-by: Mark Rutland <mark.rutland@....com>
> Co-Developed-by: Peter Newman <peternewman@...gle.com>
> Signed-off-by: Peter Newman <peternewman@...gle.com>
> Link: https://lore.kernel.org/all/YvunKCJHSXKz%2FkZB@FVFF77S0Q05N
> ---
> v4->v5:
> - update changelog tags
Thanks, this looks good to me.
Please can you rebase it on my for-next/perf branch so that I can queue it
up? More of the PMU code has moved out into drivers/perf/.
Cheers,
Will
[1] https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git/log/?h=for-next/perf
Powered by blists - more mailing lists