linux/arch/powerpc
Athira Rajeev d137845c97 powerpc/perf: Record counter overflow always if SAMPLE_IP is unset
While sampling for marked events, currently we record the sample only
if the SIAR valid bit of Sampled Instruction Event Register (SIER) is
set. SIAR_VALID bit is used for fetching the instruction address from
Sampled Instruction Address Register(SIAR). But there are some
usecases, where the user is interested only in the PMU stats at each
counter overflow and the exact IP of the overflow event is not
required. Dropping SIAR invalid samples will fail to record some of
the counter overflows in such cases.

Example of such usecase is dumping the PMU stats (event counts) after
some regular amount of instructions/events from the userspace (ex: via
ptrace). Here counter overflow is indicated to userspace via signal
handler, and captured by monitoring and enabling I/O signaling on the
event file descriptor. In these cases, we expect to get
sample/overflow indication after each specified sample_period.

Perf event attribute will not have PERF_SAMPLE_IP set in the
sample_type if exact IP of the overflow event is not requested. So
while profiling if SAMPLE_IP is not set, just record the counter
overflow irrespective of SIAR_VALID check.

Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
[mpe: Reflow comment and if formatting]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1612516492-1428-1-git-send-email-atrajeev@linux.vnet.ibm.com
2021-02-09 01:09:46 +11:00
..
boot powerpc/boot: Fix build of dts/fsl 2020-12-21 22:06:09 +11:00
configs powerpc/akebono: Fix unmet dependency errors 2021-02-09 00:10:50 +11:00
crypto crypto: powerpc/sha256-spe - Fix sparse endianness warning 2020-11-27 17:13:41 +11:00
include powerpc/64s: Implement ptep_clear_flush_young that does not flush TLBs 2021-02-09 01:09:45 +11:00
kernel powerpc/44x: Fix a spelling mismach to mismatch in head_44x.S 2021-02-09 00:10:51 +11:00
kexec arch, drivers: replace for_each_membock() with for_each_mem_range() 2020-10-13 18:38:35 -07:00
kvm powerpc: convert interrupt handlers to use wrappers 2021-02-09 00:02:12 +11:00
lib powerpc/sstep: Fix incorrect return from analyze_instr() 2021-01-30 11:40:04 +11:00
math-emu
mm powerpc/64s/radix: serialize_against_pte_lookup IPIs trim mm_cpumask 2021-02-09 01:09:45 +11:00
net bpf, powerpc: Fix misuse of fallthrough in bpf_jit_comp() 2020-09-29 16:39:11 +02:00
oprofile powerpc/oprofile: fix spelling mistake "contex" -> "context" 2020-08-25 01:31:33 +10:00
perf powerpc/perf: Record counter overflow always if SAMPLE_IP is unset 2021-02-09 01:09:46 +11:00
platforms powerpc/pseries/dlpar: handle ibm, configure-connector delay status 2021-02-09 01:09:46 +11:00
purgatory powerpc/kexec_file: Enable early kernel OPAL calls 2020-07-29 23:47:55 +10:00
sysdev powerpc/xive: Improve error reporting of OPAL calls 2020-12-11 09:53:11 +11:00
tools powerpc/tools: Remove 90 line limit in checkpatch script 2020-09-08 22:57:11 +10:00
xmon powerpc/xmon: Enable breakpoints on 8xx 2021-01-31 22:35:51 +11:00
Kbuild
Kconfig powerpc/64: context tracking remove _TIF_NOHZ 2021-02-09 00:02:12 +11:00
Kconfig.debug powerpc/xmon: Select CONSOLE_POLL for the 8xx 2021-01-31 22:35:51 +11:00
Makefile powerpc updates for 5.11 2020-12-17 13:34:25 -08:00
Makefile.postlink powerpc: unrel_branch_check.sh: use nm to find symbol value 2020-09-02 11:00:22 +10:00