Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
powerpc/vpa_pmu: Add interface to expose vpa counters via perf
The pseries SPLPAR machines can retrieve a log of dispatch and preempt events from the hypervisor using data from Disptach Trace Log(DTL) buffer. With this information, user can retrieve when and why each dispatch & preempt has occured. Add an interface to expose the Virtual Processor Area(VPA) dtl counters via perf. The following events are available and exposed in sysfs: vpa_dtl/dtl_cede/ - Trace voluntary (OS initiated) virtual processor waits vpa_dtl/dtl_preempt/ - Trace time slice preempts vpa_dtl/dtl_fault/ - Trace virtual partition memory page faults. vpa_dtl/dtl_all/ - Trace all (dtl_cede/dtl_preempt/dtl_fault) Added interface defines supported event list, config fields for the event attributes and their corresponding bit values which are exported via sysfs. User could use the standard perf tool to access perf events exposed via vpa-pmu. The VPA DTL PMU counters do not interrupt on overflow. Therefore, the kernel needs to poll the counters to avoid missing an overflow. Added hrtimer code to do this. The timer interval can be provided by user via sample_period field. There is one hrtimer per-cpu. Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
- Loading branch information