mirror-linux/arch/powerpc/perf
Athira Rajeev b5e71cafa0 powerpc/perf/vpa-dtl: Handle the writing of perf record when aux wake up is needed
Handle the case when the aux buffer is going to be full and
data needs to be written to the data file. perf_aux_output_begin()
function checks if there is enough space depending on the values of
aux_wakeup and aux_watermark which is part of "struct perf_buffer".
Inorder to maintain where to write to aux buffer, add two fields
to "struct vpa_pmu_buf". Field "threshold" to indicate total possible
DTL entries that can be contained in aux buffer and field "full" to
indicate anytime when buffer is full. In perf_aux_output_end, there
is check to see if wake up is needed based on aux head value.

In vpa_dtl_capture_aux(), check if there is enough space to contain the
DTL data. If not, save the data for available memory and set full to true.
Set head of private aux to zero when buffer is full so that next data
will be copied to beginning of the buffer. The address used for copying
to aux is "aux_copy_buf + buf->head". So once buffer is full, set head
to zero, so that next time it will be written from start of the buffer.

Signed-off-by: Athira Rajeev <atrajeev@linux.ibm.com>
Tested-by: Tejas Manhas <tejas05@linux.ibm.com>
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20250915102947.26681-7-atrajeev@linux.ibm.com
2025-09-22 14:48:57 +05:30
..
req-gen powerpc/hv-gpci: Fix hv_gpci event list 2022-12-02 20:39:26 +11:00
8xx-pmu.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
Makefile powerpc/vpa_dtl: Add interface to expose vpa dtl counters via perf 2025-09-22 14:48:57 +05:30
bhrb.S powerpc/64: asm use consistent global variable declaration and access 2022-09-28 19:22:12 +10:00
callchain.c perf/powerpc: Use perf_arch_instruction_pointer() 2024-11-14 10:40:01 +01:00
callchain.h powerpc/64s/hash: Make hash faults work in NMI context 2022-02-24 12:46:54 +11:00
callchain_32.c perf/powerpc: Use perf_arch_instruction_pointer() 2024-11-14 10:40:01 +01:00
callchain_64.c perf/powerpc: Use perf_arch_instruction_pointer() 2024-11-14 10:40:01 +01:00
core-book3s.c powerpc/perf: Remove driver-specific throttle support 2025-05-21 13:57:44 +02:00
core-fsl-emb.c powerpc/perf: Remove driver-specific throttle support 2025-05-21 13:57:44 +02:00
e500-pmu.c powerpc/perf: Use PVR rather than oprofile field to determine CPU version 2022-07-27 21:36:05 +10:00
e6500-pmu.c powerpc/perf: Use PVR rather than oprofile field to determine CPU version 2022-07-27 21:36:05 +10:00
generic-compat-pmu.c powerpc/perf: Add support for caps under sysfs in powerpc 2022-07-18 10:39:54 +10:00
hv-24x7-catalog.h
hv-24x7-domains.h
hv-24x7.c powerpc updates for 6.17 2025-07-29 20:28:38 -07:00
hv-24x7.h
hv-common.c
hv-common.h
hv-gpci-requests.h powerpc/hv-gpci: Fix hv_gpci event list 2022-12-02 20:39:26 +11:00
hv-gpci.c powerpc/hv-gpci: Fix the H_GET_PERF_COUNTER_INFO hcall return value checks 2024-03-03 23:05:21 +11:00
hv-gpci.h powerpc/hv-gpci: Fix hv_gpci event list 2022-12-02 20:39:26 +11:00
imc-pmu.c powerpc/imc-pmu: Add a null pointer check in update_events_in_group() 2023-12-13 22:19:43 +11:00
internal.h powerpc/perf: Power11 Performance Monitoring support 2024-02-21 23:11:00 +11:00
isa207-common.c arch/powerpc/perf: Update get_mem_data_src function to use saved values of sier and mmcra regs 2025-02-11 11:33:11 +05:30
isa207-common.h powerpc/perf: Update MMCR2 to support event exclude_idle 2022-06-29 19:42:41 +10:00
kvm-hv-pmu.c powerpc/kvm-hv-pmu: Add perf-events for Hostwide counters 2025-04-16 22:16:10 +05:30
mpc7450-pmu.c powerpc/perf: Properly detect mpc7450 family 2023-03-30 23:35:43 +11:00
perf_regs.c powerpc: Use the newly added is_tsk_32bit_task() macro 2022-02-12 22:47:42 +11:00
power5+-pmu.c powerpc/perf: Use PVR rather than oprofile field to determine CPU version 2022-07-27 21:36:05 +10:00
power5-pmu.c powerpc/perf: Use PVR rather than oprofile field to determine CPU version 2022-07-27 21:36:05 +10:00
power6-pmu.c powerpc/perf: Optimize find_alternatives_list() using binary search 2023-10-19 23:18:59 +11:00
power7-events-list.h
power7-pmu.c powerpc/perf: Use PVR rather than oprofile field to determine CPU version 2022-07-27 21:36:05 +10:00
power8-events-list.h
power8-pmu.c powerpc/perf: Use PVR rather than oprofile field to determine CPU version 2022-07-27 21:36:05 +10:00
power9-events-list.h
power9-pmu.c powerpc/perf: Use PVR rather than oprofile field to determine CPU version 2022-07-27 21:36:05 +10:00
power10-events-list.h
power10-pmu.c powerpc/perf: Set cpumode flags using sample address 2024-06-17 22:47:16 +10:00
ppc970-pmu.c powerpc/perf: Use PVR rather than oprofile field to determine CPU version 2022-07-27 21:36:05 +10:00
vpa-dtl.c powerpc/perf/vpa-dtl: Handle the writing of perf record when aux wake up is needed 2025-09-22 14:48:57 +05:30
vpa-pmu.c powerpc/perf: Fix ref-counting on the PMU 'vpa_pmu' 2025-03-07 20:15:49 +05:30