[PATCH 02/13] perf/core: Extend perf_sample_regs_intr() to include perf_arch_regs update
Madhavan Srinivasan
maddy at linux.vnet.ibm.com
Mon Aug 29 07:00:47 AEST 2016
Extend perf_sample_regs_intr() to support the updates needed for
perf_arch_reg structure and perf_arch_regs_mask. Also add code to
init the arch_regs_mask to zero incase of regs_user in
perf_sample_regs_user(). Ideally this should be done in perf_sample_data_init,
but due to commit 2565711fb7d7 ("perf: Improve the perf_sample_data struct layout")
moving it to this function.
Cc: Thomas Gleixner <tglx at linutronix.de>
Cc: Ingo Molnar <mingo at kernel.org>
Cc: Peter Zijlstra <peterz at infradead.org>
Cc: Jiri Olsa <jolsa at kernel.org>
Cc: Arnaldo Carvalho de Melo <acme at kernel.org>
Cc: Stephane Eranian <eranian at gmail.com>
Cc: Russell King <linux at arm.linux.org.uk>
Cc: Catalin Marinas <catalin.marinas at arm.com>
Cc: Will Deacon <will.deacon at arm.com>
Cc: Benjamin Herrenschmidt <benh at kernel.crashing.org>
Cc: Michael Ellerman <mpe at ellerman.id.au>
Cc: Sukadev Bhattiprolu <sukadev at linux.vnet.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy at linux.vnet.ibm.com>
---
kernel/events/core.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 2f6e6a16b117..8cf540275c34 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -5398,6 +5398,9 @@ static void perf_sample_regs_user(struct perf_regs *regs_user,
regs_user->abi = PERF_SAMPLE_REGS_ABI_NONE;
regs_user->regs = NULL;
}
+
+ /* Init arch_regs_mask to zero */
+ regs_user->arch_regs_mask = 0;
}
static void perf_sample_regs_intr(struct perf_regs *regs_intr,
@@ -5405,6 +5408,8 @@ static void perf_sample_regs_intr(struct perf_regs *regs_intr,
{
regs_intr->regs = regs;
regs_intr->abi = perf_reg_abi(current);
+ regs_intr->arch_regs_mask = perf_get_arch_regs_mask();
+ regs_intr->arch_regs = perf_get_arch_reg();
}
--
2.7.4
More information about the Linuxppc-dev
mailing list