perf: introduce new pmu and event to show package energy status in perf
Subsystems (2)
RFC PATCH 2/3 perf: introduce new pmu and event to show package energy status in perf
Introduce new pmu and event to show package energy status in perf.
Signed-off-by Zhang Rui <[email protected]>
--- drivers/platform/x86/Kconfig | 8 + drivers/platform/x86/Makefile | 1 drivers/platform/x86/intel_rapl.c | 217 ++++++++++++++++++++++++++++++++++++++ include/linux/perf_event.h | 1 4 files changed, 227 insertions(+)
drivers/platform/x86/Kconfig +8 -0
@@ -541,4 +541,12 @@ config INTEL_SCU_IPC some embedded Intel x86 platforms. This is not needed for PC-type machines. +config INTEL_RAPL + tristate "Intel RAPL Support" + depends on X86 + default y + ---help--- + RAPL, AKA, Running Average Power Limit provides mechanisms to enforce + power consumption limit. + endif # X86_PLATFORM_DEVICES
drivers/platform/x86/Makefile +1 -0
@@ -26,3 +26,4 @@ obj-$(CONFIG_TOPSTAR_LAPTOP) += topstar- obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o obj-$(CONFIG_TOSHIBA_BT_RFKILL) += toshiba_bluetooth.o obj-$(CONFIG_INTEL_SCU_IPC) += intel_scu_ipc.o +obj-$(CONFIG_INTEL_RAPL) += intel_rapl.o
include/linux/perf_event.h +1 -0
@@ -105,6 +105,7 @@ enum perf_sw_ids {PERF_COUNT_SW_PAGE_FAULTS_MAJ =6 ,PERF_COUNT_SW_ALIGNMENT_FAULTS =7 ,PERF_COUNT_SW_EMULATION_FAULTS =8 , +PERF_COUNT_SW_RAPL_ENERGY =9 , PERF_COUNT_SW_MAX, /* non-ABI */ };
drivers/platform/x86/intel_rapl.c new file +217 -0
217 lines not on this page · raw message