diff options
author | Dirk Brandewie <dirk.j.brandewie@intel.com> | 2014-01-16 13:32:25 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-01-16 20:00:44 -0500 |
commit | b69880f9ccf7e13b2e2cb38f49a2451d7aa548b3 (patch) | |
tree | 65f402f165b9b4f33ccac597202a82acfe845bdf /include/trace/events/power.h | |
parent | 652ed95d5fa6074b3c4ea245deb0691f1acb6656 (diff) |
intel_pstate: Add trace point to report internal state.
Add perf trace event "power:pstate_sample" to report driver state to
aid in diagnosing issues reported against intel_pstate.
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/trace/events/power.h')
-rw-r--r-- | include/trace/events/power.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/include/trace/events/power.h b/include/trace/events/power.h index cda100d6762d..9e9475c85de5 100644 --- a/include/trace/events/power.h +++ b/include/trace/events/power.h | |||
@@ -35,6 +35,59 @@ DEFINE_EVENT(cpu, cpu_idle, | |||
35 | TP_ARGS(state, cpu_id) | 35 | TP_ARGS(state, cpu_id) |
36 | ); | 36 | ); |
37 | 37 | ||
38 | TRACE_EVENT(pstate_sample, | ||
39 | |||
40 | TP_PROTO(u32 core_busy, | ||
41 | u32 scaled_busy, | ||
42 | u32 state, | ||
43 | u64 mperf, | ||
44 | u64 aperf, | ||
45 | u32 energy, | ||
46 | u32 freq | ||
47 | ), | ||
48 | |||
49 | TP_ARGS(core_busy, | ||
50 | scaled_busy, | ||
51 | state, | ||
52 | mperf, | ||
53 | aperf, | ||
54 | energy, | ||
55 | freq | ||
56 | ), | ||
57 | |||
58 | TP_STRUCT__entry( | ||
59 | __field(u32, core_busy) | ||
60 | __field(u32, scaled_busy) | ||
61 | __field(u32, state) | ||
62 | __field(u64, mperf) | ||
63 | __field(u64, aperf) | ||
64 | __field(u32, energy) | ||
65 | __field(u32, freq) | ||
66 | |||
67 | ), | ||
68 | |||
69 | TP_fast_assign( | ||
70 | __entry->core_busy = core_busy; | ||
71 | __entry->scaled_busy = scaled_busy; | ||
72 | __entry->state = state; | ||
73 | __entry->mperf = mperf; | ||
74 | __entry->aperf = aperf; | ||
75 | __entry->energy = energy; | ||
76 | __entry->freq = freq; | ||
77 | ), | ||
78 | |||
79 | TP_printk("core_busy=%lu scaled=%lu state=%lu mperf=%llu aperf=%llu energy=%lu freq=%lu ", | ||
80 | (unsigned long)__entry->core_busy, | ||
81 | (unsigned long)__entry->scaled_busy, | ||
82 | (unsigned long)__entry->state, | ||
83 | (unsigned long long)__entry->mperf, | ||
84 | (unsigned long long)__entry->aperf, | ||
85 | (unsigned long)__entry->energy, | ||
86 | (unsigned long)__entry->freq | ||
87 | ) | ||
88 | |||
89 | ); | ||
90 | |||
38 | /* This file can get included multiple times, TRACE_HEADER_MULTI_READ at top */ | 91 | /* This file can get included multiple times, TRACE_HEADER_MULTI_READ at top */ |
39 | #ifndef _PWR_EVENT_AVOID_DOUBLE_DEFINING | 92 | #ifndef _PWR_EVENT_AVOID_DOUBLE_DEFINING |
40 | #define _PWR_EVENT_AVOID_DOUBLE_DEFINING | 93 | #define _PWR_EVENT_AVOID_DOUBLE_DEFINING |