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>
This commit is contained in:
committed by
Rafael J. Wysocki
parent
652ed95d5f
commit
b69880f9cc
@@ -35,6 +35,59 @@ DEFINE_EVENT(cpu, cpu_idle,
|
||||
TP_ARGS(state, cpu_id)
|
||||
);
|
||||
|
||||
TRACE_EVENT(pstate_sample,
|
||||
|
||||
TP_PROTO(u32 core_busy,
|
||||
u32 scaled_busy,
|
||||
u32 state,
|
||||
u64 mperf,
|
||||
u64 aperf,
|
||||
u32 energy,
|
||||
u32 freq
|
||||
),
|
||||
|
||||
TP_ARGS(core_busy,
|
||||
scaled_busy,
|
||||
state,
|
||||
mperf,
|
||||
aperf,
|
||||
energy,
|
||||
freq
|
||||
),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(u32, core_busy)
|
||||
__field(u32, scaled_busy)
|
||||
__field(u32, state)
|
||||
__field(u64, mperf)
|
||||
__field(u64, aperf)
|
||||
__field(u32, energy)
|
||||
__field(u32, freq)
|
||||
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->core_busy = core_busy;
|
||||
__entry->scaled_busy = scaled_busy;
|
||||
__entry->state = state;
|
||||
__entry->mperf = mperf;
|
||||
__entry->aperf = aperf;
|
||||
__entry->energy = energy;
|
||||
__entry->freq = freq;
|
||||
),
|
||||
|
||||
TP_printk("core_busy=%lu scaled=%lu state=%lu mperf=%llu aperf=%llu energy=%lu freq=%lu ",
|
||||
(unsigned long)__entry->core_busy,
|
||||
(unsigned long)__entry->scaled_busy,
|
||||
(unsigned long)__entry->state,
|
||||
(unsigned long long)__entry->mperf,
|
||||
(unsigned long long)__entry->aperf,
|
||||
(unsigned long)__entry->energy,
|
||||
(unsigned long)__entry->freq
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
/* This file can get included multiple times, TRACE_HEADER_MULTI_READ at top */
|
||||
#ifndef _PWR_EVENT_AVOID_DOUBLE_DEFINING
|
||||
#define _PWR_EVENT_AVOID_DOUBLE_DEFINING
|
||||
|
||||
Reference in New Issue
Block a user