Skip to content

Commit 0306e48

Browse files
shilpasrirafaeljw
authored andcommitted
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>
1 parent 96c4726 commit 0306e48

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

‎include/trace/events/power.h‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,28 @@ DEFINE_EVENT(cpu, cpu_idle,
3838
TP_ARGS(state, cpu_id)
3939
);
4040

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+
4163
TRACE_EVENT(pstate_sample,
4264

4365
TP_PROTO(u32 core_busy,

‎kernel/trace/power-traces.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@
1515

1616
EXPORT_TRACEPOINT_SYMBOL_GPL(suspend_resume);
1717
EXPORT_TRACEPOINT_SYMBOL_GPL(cpu_idle);
18+
EXPORT_TRACEPOINT_SYMBOL_GPL(powernv_throttle);
1819

0 commit comments

Comments
 (0)