All of lore.kernel.org
 help / color / mirror / Atom feed
From: Suzuki Kuruppassery Poulose <suzuki.poulose@arm.com>
To: Leo Yan <leo.yan@linaro.org>, James Clark <james.clark@arm.com>
Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	nd@arm.com, Mathieu Poirier <mathieu.poirier@linaro.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	Igor Lubashev <ilubashe@akamai.com>
Subject: Re: [PATCH] perf tools: Fix bug when recording SPE and non SPE events
Date: Mon, 13 Jan 2020 12:27:38 +0000	[thread overview]
Message-ID: <fd4f4278-fa43-86dc-1f2f-3439f19fea9e@arm.com> (raw)
In-Reply-To: <20191223034852.GB3981@leoy-ThinkPad-X240s>

Hi Leo,

On 23/12/2019 03:48, Leo Yan wrote:
> Hi James,
> 
> On Fri, Dec 20, 2019 at 11:05:25AM +0000, James Clark wrote:
>> This patch fixes an issue when non Arm SPE events are specified after an
>> Arm SPE event. In that case, perf will exit with an error code and not
>> produce a record file. This is because a loop index is used to store the
>> location of the relevant Arm SPE PMU, but if non SPE PMUs follow, that
>> index will be overwritten. Fix this issue by saving the PMU into a
>> variable instead of using the index, and also add an error message.
>>
>> Before the fix:
>>      ./perf record -e arm_spe/ts_enable=1/ -e branch-misses ls; echo $?
>>      237
>>
>> After the fix:
>>      ./perf record -e arm_spe/ts_enable=1/ -e branch-misses ls; echo $?
>>      ...
>>      0
> 
> Just bring up a question related with PMU event registration.  Let's
> see the DT binding in arch/arm64/boot/dts/arm/fvp-base-revc.dts:
> 
>           spe-pmu {
>                   compatible = "arm,statistical-profiling-extension-v1";
>                   interrupts = <GIC_PPI 5 IRQ_TYPE_LEVEL_HIGH>;
>           };
> 
> 
> Now SPE registers PMU event for every CPU; seem to me, though SPE is an

Do you mean "SPE PMU" here ? SPE is different from ETM, where the trace
data is micro-architecture dependent. And thus you cannot mix the trace
on different CPUs with different micro-archs.

As such I don't see any issue with this patch.

Suzuki

  parent reply	other threads:[~2020-01-13 12:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-20 11:05 [PATCH] perf tools: Fix bug when recording SPE and non SPE events James Clark
2019-12-23  3:48 ` Leo Yan
2020-01-02 11:05   ` James Clark
2020-01-02 11:44     ` Leo Yan
2020-01-13 12:27   ` Suzuki Kuruppassery Poulose [this message]
2020-01-13 14:17     ` Leo Yan
2020-01-13 14:58       ` Leo Yan
2020-01-15 13:15         ` James Clark
2020-01-13 12:28 ` Suzuki Kuruppassery Poulose

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=fd4f4278-fa43-86dc-1f2f-3439f19fea9e@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=ilubashe@akamai.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@redhat.com \
    --cc=leo.yan@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=nd@arm.com \
    --cc=peterz@infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.