lkml.org 
[lkml]   [2017]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf tools: unbreak perf record for arm/arm64
On Fri, Oct 06, 2017 at 07:38:22PM +0100, Mark Rutland wrote:
> Currently, perf record is broken on arm/arm64 systems when the PMU is
> specified explicitly as part of the event, e.g.
>
> $ ./perf record -e armv8_cortex_a53/cpu_cycles/u true
>
> In such cases, perf record fails to open events unless
> perf_event_paranoid is set to -1, even if the PMU in question supports
> mode exclusion. Further, even when perf_event_paranoid is toggled, no
> samples are recorded.
>
> This is an unintended side effect of commit:
>
> e3ba76deef23064f ("perf tools: Force uncore events to system wide monitoring)
>
> ... which assumes that if a PMU has an associated cpu_map, it is an
> uncore PMU, and forces events for such PMUs to be system-wide.
>
> This is not true for arm/arm64 systems, which can have heterogeneous
> CPUs. To account for this, multiple CPU PMUs are exposed, each with a
> "cpus" field under sysfs, which the perf tool parses into a cpu_map. ARM
> PMUs do not have a "cpumask" file, and only have a "cpus" file. For the
> gory details as to why, see commit:
>
> 7e3fcffe95544010 ("perf pmu: Support alternative sysfs cpumask")
>
> Given all of this, we can instead identify uncore PMUs by explicitly
> checking for a "cpumask" file, and restore arm/arm64 PMU support back to
> a working state. This patch does so, adding a new perf_pmu::is_uncore
> field, and splitting the existing cpumask parsing so that it can be
> reused.
>
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Fixes: e3ba76deef23064f ("perf tools: Force uncore events to system wide monitoring)

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka

\
 
 \ /
  Last update: 2017-10-09 11:41    [W:1.195 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site