diff options
author | Madhavan Srinivasan <maddy@linux.vnet.ibm.com> | 2017-04-11 07:21:06 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-04-19 20:00:21 +1000 |
commit | 79e96f8f930d425ab48c511f8a6db16ca7fc68b1 (patch) | |
tree | 3387541ca447b33b95fdbd736e392098bc392143 /arch/powerpc/perf/core-book3s.c | |
parent | 8c5073db0ee680c7e70e123918c9b260e49f757d (diff) | |
download | linux-stable-79e96f8f930d425ab48c511f8a6db16ca7fc68b1.tar.gz linux-stable-79e96f8f930d425ab48c511f8a6db16ca7fc68b1.tar.bz2 linux-stable-79e96f8f930d425ab48c511f8a6db16ca7fc68b1.zip |
powerpc/perf: Export memory hierarchy info to user space
The LDST field and DATA_SRC in SIER identifies the memory hierarchy level
(eg: L1, L2 etc), from which a data-cache miss for a marked instruction
was satisfied. Use the 'perf_mem_data_src' object to export this
hierarchy level to user space.
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/perf/core-book3s.c')
-rw-r--r-- | arch/powerpc/perf/core-book3s.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c index 2ff13249f87a..e241ebebab6f 100644 --- a/arch/powerpc/perf/core-book3s.c +++ b/arch/powerpc/perf/core-book3s.c @@ -2049,6 +2049,10 @@ static void record_and_restart(struct perf_event *event, unsigned long val, data.br_stack = &cpuhw->bhrb_stack; } + if (event->attr.sample_type & PERF_SAMPLE_DATA_SRC && + ppmu->get_mem_data_src) + ppmu->get_mem_data_src(&data.data_src, ppmu->flags, regs); + if (perf_event_overflow(event, &data, regs)) power_pmu_stop(event, 0); } |