Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cpufreq: powernv/tracing: Add powernv_throttle tracepoint

This patch adds the powernv_throttle tracepoint to trace the CPU
frequency throttling event, which is used by the powernv-cpufreq
driver in POWER8.

Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Shilpasri G Bhat and committed by
Rafael J. Wysocki
0306e481 96c4726f

+23
+22
include/trace/events/power.h
··· 38 38 TP_ARGS(state, cpu_id) 39 39 ); 40 40 41 + TRACE_EVENT(powernv_throttle, 42 + 43 + TP_PROTO(int chip_id, const char *reason, int pmax), 44 + 45 + TP_ARGS(chip_id, reason, pmax), 46 + 47 + TP_STRUCT__entry( 48 + __field(int, chip_id) 49 + __string(reason, reason) 50 + __field(int, pmax) 51 + ), 52 + 53 + TP_fast_assign( 54 + __entry->chip_id = chip_id; 55 + __assign_str(reason, reason); 56 + __entry->pmax = pmax; 57 + ), 58 + 59 + TP_printk("Chip %d Pmax %d %s", __entry->chip_id, 60 + __entry->pmax, __get_str(reason)) 61 + ); 62 + 41 63 TRACE_EVENT(pstate_sample, 42 64 43 65 TP_PROTO(u32 core_busy,
+1
kernel/trace/power-traces.c
··· 15 15 16 16 EXPORT_TRACEPOINT_SYMBOL_GPL(suspend_resume); 17 17 EXPORT_TRACEPOINT_SYMBOL_GPL(cpu_idle); 18 + EXPORT_TRACEPOINT_SYMBOL_GPL(powernv_throttle); 18 19