From: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, x86@kernel.org
Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Jiri Olsa <jolsa@kernel.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Stephane Eranian <eranian@gmail.com>,
Russell King <linux@arm.linux.org.uk>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Subject: [RFC PATCH 0/3]perf/core: extend perf_reg and perf_sample_regs_intr
Date: Thu, 5 Nov 2015 02:16:15 +0530 [thread overview]
Message-ID: <1446669978-6366-1-git-send-email-maddy@linux.vnet.ibm.com> (raw)
This patchset extend the perf sample regs infrastructure
to include architecture specific regs. Current perf_sample_regs_intr
exports only registers in the pt_regs to perf.data using
PERF_SAMPLE_REGS_INTR sample type. But sometimes we end up looking
for or prefer raw register values at the interrupt during debug.
This patchset extends the perf_regs to include arch specific struct,
and makes perf_sample_regs_intr in kernel/event/core.c as __weak__
function. This way, an arch specific implementation of
perf_sample_regs_intr() can update the arch specific data to
the perf_regs.
First patch defines a new structure arch_misc_reg and updates the same
in the struct perf_regs. Patch also modifies the perf_reg_value()
and perf_output_sample_regs() to take perf_regs parameter instead of pt_regs.
Second patch updates struct arch_misc_reg for arch/powerpc with pmu registers
and adds offsetof macro for the same. It extends perf_reg_value()
to use reg idx to decide on struct to return value from.
Third patch adds arch specific perf_sample_regs_intr() in arch/powerpc
to hook up the arch_misc_regs to perf_regs.
This patchset depends on the recent posting by Anju T in
linuxppc-dev@lists.ozlabs.org to enable PERF_SAMPLE_REGS_INTR
support in arch/powerpc.
https://patchwork.ozlabs.org/patch/539242/
https://patchwork.ozlabs.org/patch/539243/
https://patchwork.ozlabs.org/patch/539244/
Would appreciate comments and feedback.
Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Stephane Eranian <eranian@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Madhavan Srinivasan (3):
perf/core: extend perf_regs to include arch specific regs
perf/powerpc: update macros and add regs to arch_misc_reg struct
perf/powerpc: Functions to update arch_misc_regs
arch/arm/include/asm/ptrace.h | 2 ++
arch/arm/kernel/perf_regs.c | 4 +++-
arch/arm64/include/asm/ptrace.h | 2 ++
arch/arm64/kernel/perf_regs.c | 4 +++-
arch/powerpc/include/uapi/asm/perf_regs.h | 10 ++++++++++
arch/powerpc/include/uapi/asm/ptrace.h | 11 +++++++++++
arch/powerpc/perf/core-book3s.c | 29 +++++++++++++++++++++++++++++
arch/powerpc/perf/perf_regs.c | 28 ++++++++++++++++++++++++++--
arch/x86/include/asm/ptrace.h | 2 ++
arch/x86/kernel/perf_regs.c | 4 +++-
include/linux/perf_regs.h | 5 +++--
kernel/events/core.c | 8 ++++----
tools/perf/arch/powerpc/include/perf_regs.h | 16 ++++++++++++++++
13 files changed, 114 insertions(+), 11 deletions(-)
--
1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: maddy@linux.vnet.ibm.com (Madhavan Srinivasan)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 0/3]perf/core: extend perf_reg and perf_sample_regs_intr
Date: Thu, 5 Nov 2015 02:16:15 +0530 [thread overview]
Message-ID: <1446669978-6366-1-git-send-email-maddy@linux.vnet.ibm.com> (raw)
This patchset extend the perf sample regs infrastructure
to include architecture specific regs. Current perf_sample_regs_intr
exports only registers in the pt_regs to perf.data using
PERF_SAMPLE_REGS_INTR sample type. But sometimes we end up looking
for or prefer raw register values at the interrupt during debug.
This patchset extends the perf_regs to include arch specific struct,
and makes perf_sample_regs_intr in kernel/event/core.c as __weak__
function. This way, an arch specific implementation of
perf_sample_regs_intr() can update the arch specific data to
the perf_regs.
First patch defines a new structure arch_misc_reg and updates the same
in the struct perf_regs. Patch also modifies the perf_reg_value()
and perf_output_sample_regs() to take perf_regs parameter instead of pt_regs.
Second patch updates struct arch_misc_reg for arch/powerpc with pmu registers
and adds offsetof macro for the same. It extends perf_reg_value()
to use reg idx to decide on struct to return value from.
Third patch adds arch specific perf_sample_regs_intr() in arch/powerpc
to hook up the arch_misc_regs to perf_regs.
This patchset depends on the recent posting by Anju T in
linuxppc-dev at lists.ozlabs.org to enable PERF_SAMPLE_REGS_INTR
support in arch/powerpc.
https://patchwork.ozlabs.org/patch/539242/
https://patchwork.ozlabs.org/patch/539243/
https://patchwork.ozlabs.org/patch/539244/
Would appreciate comments and feedback.
Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Stephane Eranian <eranian@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Madhavan Srinivasan (3):
perf/core: extend perf_regs to include arch specific regs
perf/powerpc: update macros and add regs to arch_misc_reg struct
perf/powerpc: Functions to update arch_misc_regs
arch/arm/include/asm/ptrace.h | 2 ++
arch/arm/kernel/perf_regs.c | 4 +++-
arch/arm64/include/asm/ptrace.h | 2 ++
arch/arm64/kernel/perf_regs.c | 4 +++-
arch/powerpc/include/uapi/asm/perf_regs.h | 10 ++++++++++
arch/powerpc/include/uapi/asm/ptrace.h | 11 +++++++++++
arch/powerpc/perf/core-book3s.c | 29 +++++++++++++++++++++++++++++
arch/powerpc/perf/perf_regs.c | 28 ++++++++++++++++++++++++++--
arch/x86/include/asm/ptrace.h | 2 ++
arch/x86/kernel/perf_regs.c | 4 +++-
include/linux/perf_regs.h | 5 +++--
kernel/events/core.c | 8 ++++----
tools/perf/arch/powerpc/include/perf_regs.h | 16 ++++++++++++++++
13 files changed, 114 insertions(+), 11 deletions(-)
--
1.9.1
next reply other threads:[~2015-11-04 20:46 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 20:46 Madhavan Srinivasan [this message]
2015-11-04 20:46 ` [RFC PATCH 0/3]perf/core: extend perf_reg and perf_sample_regs_intr Madhavan Srinivasan
2015-11-04 20:46 ` [RFC PATCH 1/3] perf/core: extend perf_regs to include arch specific regs Madhavan Srinivasan
2015-11-04 20:46 ` Madhavan Srinivasan
2015-11-04 20:46 ` Madhavan Srinivasan
2015-11-04 20:46 ` [RFC PATCH 2/3]perf/powerpc: update macros and add regs to arch_misc_reg struct Madhavan Srinivasan
2015-11-04 20:46 ` Madhavan Srinivasan
2015-11-04 20:46 ` Madhavan Srinivasan
2015-11-04 20:46 ` [RFC PATCH 3/3]perf/powerpc: Functions to update arch_misc_regs Madhavan Srinivasan
2015-11-04 20:46 ` Madhavan Srinivasan
2015-11-05 13:07 ` [RFC PATCH 0/3]perf/core: extend perf_reg and perf_sample_regs_intr Peter Zijlstra
2015-11-05 13:07 ` Peter Zijlstra
2015-11-06 2:58 ` Sukadev Bhattiprolu
2015-11-06 2:58 ` Sukadev Bhattiprolu
2015-11-06 7:47 ` Madhavan Srinivasan
2015-11-06 7:47 ` Madhavan Srinivasan
2015-11-06 9:39 ` Michael Ellerman
2015-11-06 9:39 ` Michael Ellerman
2015-11-06 7:27 ` Madhavan Srinivasan
2015-11-06 7:27 ` Madhavan Srinivasan
2015-11-06 9:24 ` Peter Zijlstra
2015-11-06 9:24 ` Peter Zijlstra
2015-11-06 10:04 ` Michael Ellerman
2015-11-06 10:04 ` Michael Ellerman
2015-11-06 10:25 ` Peter Zijlstra
2015-11-06 10:25 ` Peter Zijlstra
2015-11-07 4:29 ` Madhavan Srinivasan
2015-11-07 4:29 ` Madhavan Srinivasan
2015-11-10 0:21 ` Michael Ellerman
2015-11-10 0:21 ` Michael Ellerman
2015-11-07 4:28 ` Madhavan Srinivasan
2015-11-07 4:28 ` Madhavan Srinivasan
2015-11-05 14:42 ` Stephane Eranian
2015-11-05 14:42 ` Stephane Eranian
2015-11-06 7:33 ` Madhavan Srinivasan
2015-11-06 7:33 ` 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=1446669978-6366-1-git-send-email-maddy@linux.vnet.ibm.com \
--to=maddy@linux.vnet.ibm.com \
--cc=acme@kernel.org \
--cc=benh@kernel.crashing.org \
--cc=catalin.marinas@arm.com \
--cc=eranian@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=peterz@infradead.org \
--cc=sukadev@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.com \
--cc=x86@kernel.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.