]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
powerpc/perf/vpa-dtl: Add support to setup and free aux buffer for capturing DTL...
authorAthira Rajeev <atrajeev@linux.ibm.com>
Mon, 15 Sep 2025 10:29:44 +0000 (15:59 +0530)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Mon, 22 Sep 2025 09:18:57 +0000 (14:48 +0530)
commit5d75aed84d3b6d25c7c4bb4a212b14fae4d1020b
tree40af89ad121b174d5f68b4d4b94437af11f524a5
parent6f2c65680c336a274b69b1fdcbfa2eeb8159bee8
powerpc/perf/vpa-dtl: Add support to setup and free aux buffer for capturing DTL data

vpa dtl pmu has one hrtimer added per vpa-dtl pmu thread. When the
hrtimer expires, in the timer handler, code is added to save the DTL
data to perf event record. DTL (Dispatch Trace Log) contains information
about dispatch/preempt, enqueue time etc. We directly copy the DTL
buffer data as part of auxiliary buffer and it will be postprocessed
later. To enable the support for aux buffer, add the PMU callbacks for
setup_aux and free_aux.

In setup_aux, set up pmu-private data structures for an AUX
area. rb_alloc_aux uses "alloc_pages_node" and returns pointer to each
page address. Map these pages to contiguous space using vmap and use
that as base address. The aux private data structure ie,
"struct vpa_pmu_buf" mainly saves:
1. buf->base: aux buffer base address
2. buf->head: offset from base address where data will be written to.
3. buf->size: Size of allocated memory

free_aux will free pmu-private AUX data structures.

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-5-atrajeev@linux.ibm.com
arch/powerpc/perf/vpa-dtl.c