From: Michael Ellerman <mpe@ellerman.id.au>
To: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>,
linuxppc-dev@lists.ozlabs.org,
Thomas Richter <tmricht@linux.vnet.ibm.com>,
Hendrik Brueckner <brueckner@linux.vnet.ibm.com>,
Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>,
Anju T Sudhakar <anju@linux.vnet.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@redhat.com>
Subject: Re: [PATCH RESEND] powerpc/perf: Update perf_regs structure to include SIER
Date: Thu, 29 Nov 2018 09:14:06 +1100 [thread overview]
Message-ID: <8736rk4zpt.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <7e8d41eb-9f8d-4d9b-2aeb-1670d582f529@linux.vnet.ibm.com>
Madhavan Srinivasan <maddy@linux.vnet.ibm.com> writes:
> On 28/11/18 9:04 AM, Michael Ellerman wrote:
>> Arnaldo Carvalho de Melo <acme@kernel.org> writes:
>>
>>> Em Mon, Nov 26, 2018 at 11:34:08PM +0530, Madhavan Srinivasan escreveu:
>>>> On each sample, Sample Instruction Event Register (SIER) content
>>>> is saved in pt_regs. SIER does not have a entry as-is in the pt_regs
>>>> but instead, SIER content is saved in the "dar" register of pt_regs.
>>>>
>>>> Patch adds another entry to the perf_regs structure to include the "SIER"
>>>> printing which internally maps to the "dar" of pt_regs.
>>> I think the patch is ok, when we talked in Vancouver I thought I saw
>>> something like this before, i.e. adding more registers to a perf_regs.h
>>> file, this was the cset:
>>>
>>> commit 0da0017f72554c005c1a04c3adc5da9eb64fa7e5
>>> Author: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
>>> Date: Wed Nov 8 07:30:15 2017 +0100
>>>
>>> s390/perf: extend perf_regs support to include floating-point registers
>>>
>>> That I came across because it broke the perf build, making me add this
>>> cset:
>>>
>>> commit 10b9baa701d5023897f70a4acb3bf0235da3dc4f
>>> Author: Arnaldo Carvalho de Melo <acme@redhat.com>
>>> Date: Tue Nov 28 11:08:41 2017 -0300
>>>
>>> tools arch s390: Do not include header files from the kernel sources
>>>
>>> :-)
>>>
>>> Michael? What about the ppc specific details?
>> The only possible objection is that not all CPUs have an SIER register,
>> so on CPUs without it you'll get the content of the DAR register rather
>> than the SIER (because we (ab)use the DAR slot of pt_regs for the SIER).
>>
>> Perhaps we should make sure that we return 0 on CPUs that don't have the
>> register?
>
>
> Yes this make sense. We should make it zero instead of having the DAR
> value. I will respin the patch with that change.
Thanks.
There's three cases we need to cover.
The first is when we're not using core-book3s.c at all, ie. when we're
using the Freescale PMU code. You can probably handle that at build time
using CONFIG_FSL_EMB_PERF_EVENT?
Then there's the 32-bit case in core-book3s.c, currently that version of
perf_read_regs() never sets a value in dar.
And then there's the 64-bit case but PPMU_HAS_SIER is not set.
cheers
next prev parent reply other threads:[~2018-11-28 22:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-26 18:04 [PATCH RESEND] powerpc/perf: Update perf_regs structure to include SIER Madhavan Srinivasan
2018-11-26 19:38 ` Arnaldo Carvalho de Melo
2018-11-28 3:34 ` Michael Ellerman
2018-11-28 5:02 ` Madhavan Srinivasan
2018-11-28 22:14 ` Michael Ellerman [this message]
2018-11-27 6:54 ` Christophe LEROY
2018-11-27 10:55 ` Madhavan Srinivasan
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=8736rk4zpt.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=anju@linux.vnet.ibm.com \
--cc=brueckner@linux.vnet.ibm.com \
--cc=jolsa@redhat.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.vnet.ibm.com \
--cc=namhyung@kernel.org \
--cc=ravi.bangoria@linux.vnet.ibm.com \
--cc=schwidefsky@de.ibm.com \
--cc=tmricht@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).