public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: linux-kernel@vger.kernel.org, jolsa@kernel.org, acme@redhat.com,
	stable@vger.kernel.org, Adrian Hunter <adrian.hunter@intel.com>,
	Borislav Petkov <bp@alien8.de>, David Ahern <dsahern@gmail.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Will Deacon <will.deacon@arm.com>
Subject: Re: [PATCH] perf tools: unbreak perf record for arm/arm64
Date: Mon, 9 Oct 2017 11:38:38 +0200	[thread overview]
Message-ID: <20171009093838.GB12516@krava> (raw)
In-Reply-To: <1507315102-5942-1-git-send-email-mark.rutland@arm.com>

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

  reply	other threads:[~2017-10-09  9:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-06 18:38 [PATCH] perf tools: unbreak perf record for arm/arm64 Mark Rutland
2017-10-09  9:38 ` Jiri Olsa [this message]
2017-10-09 10:22 ` Will Deacon
2017-10-09 10:51   ` Mark Rutland
2017-10-09 19:00   ` Arnaldo Carvalho de Melo
2017-10-09 19:02     ` Will Deacon
2017-10-10 17:28 ` [tip:perf/urgent] perf pmu: Unbreak perf record for arm/arm64 with events with explicit PMU tip-bot for Mark Rutland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171009093838.GB12516@krava \
    --to=jolsa@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=bp@alien8.de \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=namhyung@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox