From: Kim Phillips <kim.phillips@arm.com>
To: Will Deacon <will.deacon@arm.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: <linux-arm-kernel@lists.infradead.org>, <marc.zyngier@arm.com>,
<mark.rutland@arm.com>, <tglx@linutronix.de>,
<peterz@infradead.org>, <alexander.shishkin@linux.intel.com>,
<robh@kernel.org>, <suzuki.poulose@arm.com>, <pawel.moll@arm.com>,
<mathieu.poirier@linaro.org>, <mingo@redhat.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 6/7] drivers/perf: Add support for ARMv8.2 Statistical Profiling Extension
Date: Fri, 29 Sep 2017 17:19:40 -0500 [thread overview]
Message-ID: <20170929171940.2aa33d00463b1e9c987aea15@arm.com> (raw)
In-Reply-To: <1506607791-8621-7-git-send-email-will.deacon@arm.com>
On Thu, 28 Sep 2017 15:09:50 +0100
Will Deacon <will.deacon@arm.com> wrote:
> +/* Perf callbacks */
> +static int arm_spe_pmu_event_init(struct perf_event *event)
> +{
> + u64 reg;
> + struct perf_event_attr *attr = &event->attr;
> + struct arm_spe_pmu *spe_pmu = to_spe_pmu(event->pmu);
> +
> + /* This is, of course, deeply driver-specific */
> + if (attr->type != event->pmu->type)
> + return -ENOENT;
> +
> + if (event->cpu >= 0 &&
> + !cpumask_test_cpu(event->cpu, &spe_pmu->supported_cpus))
> + return -ENOENT;
So -ENOENT will make tools/perf/util/evsel.c tell the user "The %s event is not
supported." whereas returning -ENODEV will say "No such device - did
you specify an out-of-range profile CPU?" which may or may not be more
appropriate for this check.
> + if (arm_spe_event_to_pmsevfr(event) & SYS_PMSEVFR_EL1_RES0)
> + return -EOPNOTSUPP;
> + if (attr->exclude_idle)
> + return -EOPNOTSUPP;
"PMU Hardware doesn't support sampling/overflow-interrupts." will be
printed if the user didn't specify a sample period. Otherwise, a
string with "/bin/dmesg may provide additional information." will be
printed.
I was hoping for a response from acme by now for this:
https://www.spinics.net/lists/linux-perf-users/msg04066.html
Alas, nothing. Looking at the #ifdef x86 in evsel.c, I'm guessing
it'll be ok, although I'm still not sure how PMU-specific we can get in
evsel.c, nor whether it's ok to communicate lists of h/w supported
sample periods through /sys/bus/event_source/devices/...
acme? OK to refactor evsel messaging for Arm, including parsing for
which PMUs are being used, so customize the message?
Kim
next prev parent reply other threads:[~2017-09-29 22:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-28 14:09 [PATCH v5 0/7] Add support for the " Will Deacon
2017-09-28 14:09 ` [PATCH v5 1/7] genirq: export irq_get_percpu_devid_partition to modules Will Deacon
2017-09-28 14:09 ` [PATCH v5 2/7] perf/core: Export AUX buffer helpers " Will Deacon
2017-09-28 14:09 ` [PATCH v5 3/7] perf/core: Add PERF_AUX_FLAG_COLLISION to report colliding samples Will Deacon
2017-09-28 14:09 ` [PATCH v5 4/7] arm64: sysreg: Move SPE registers and PSB into common header files Will Deacon
2017-10-02 9:53 ` Marc Zyngier
2017-10-02 9:55 ` Mark Rutland
2017-09-28 14:09 ` [PATCH v5 5/7] arm64: head: Init PMSCR_EL2.{PA,PCT} when entered at EL2 without VHE Will Deacon
2017-10-02 10:03 ` Mark Rutland
2017-09-28 14:09 ` [PATCH v5 6/7] drivers/perf: Add support for ARMv8.2 Statistical Profiling Extension Will Deacon
2017-09-29 22:19 ` Kim Phillips [this message]
2017-10-02 14:14 ` Will Deacon
2017-10-02 16:49 ` Arnaldo Carvalho de Melo
2017-10-02 23:35 ` Kim Phillips
2017-10-03 14:22 ` Will Deacon
2017-10-24 8:42 ` Kim Phillips
2017-09-28 14:09 ` [PATCH v5 7/7] dt-bindings: Document devicetree binding for ARM SPE Will Deacon
2017-10-02 10:07 ` 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=20170929171940.2aa33d00463b1e9c987aea15@arm.com \
--to=kim.phillips@arm.com \
--cc=acme@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=mathieu.poirier@linaro.org \
--cc=mingo@redhat.com \
--cc=pawel.moll@arm.com \
--cc=peterz@infradead.org \
--cc=robh@kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=tglx@linutronix.de \
--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
Powered by JetHome