Skip to content

Commit 3ba7bca

Browse files
spandruvadarafaeljw
authored andcommitted
cpufreq: intel_pstate: Add io_boost trace
Add io_boost percent to current pstate_sample tracepoint. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 09c448d commit 3ba7bca

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

‎drivers/cpufreq/intel_pstate.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,8 @@ static inline void intel_pstate_adjust_busy_pstate(struct cpudata *cpu)
13161316
sample->mperf,
13171317
sample->aperf,
13181318
sample->tsc,
1319-
get_avg_frequency(cpu));
1319+
get_avg_frequency(cpu),
1320+
fp_toint(cpu->iowait_boost * 100));
13201321
}
13211322

13221323
static void intel_pstate_update_util(struct update_util_data *data, u64 time,

‎include/trace/events/power.h‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ TRACE_EVENT(pstate_sample,
6969
u64 mperf,
7070
u64 aperf,
7171
u64 tsc,
72-
u32 freq
72+
u32 freq,
73+
u32 io_boost
7374
),
7475

7576
TP_ARGS(core_busy,
@@ -79,7 +80,8 @@ TRACE_EVENT(pstate_sample,
7980
mperf,
8081
aperf,
8182
tsc,
82-
freq
83+
freq,
84+
io_boost
8385
),
8486

8587
TP_STRUCT__entry(
@@ -91,6 +93,7 @@ TRACE_EVENT(pstate_sample,
9193
__field(u64, aperf)
9294
__field(u64, tsc)
9395
__field(u32, freq)
96+
__field(u32, io_boost)
9497
),
9598

9699
TP_fast_assign(
@@ -102,17 +105,19 @@ TRACE_EVENT(pstate_sample,
102105
__entry->aperf = aperf;
103106
__entry->tsc = tsc;
104107
__entry->freq = freq;
108+
__entry->io_boost = io_boost;
105109
),
106110

107-
TP_printk("core_busy=%lu scaled=%lu from=%lu to=%lu mperf=%llu aperf=%llu tsc=%llu freq=%lu ",
111+
TP_printk("core_busy=%lu scaled=%lu from=%lu to=%lu mperf=%llu aperf=%llu tsc=%llu freq=%lu io_boost=%lu",
108112
(unsigned long)__entry->core_busy,
109113
(unsigned long)__entry->scaled_busy,
110114
(unsigned long)__entry->from,
111115
(unsigned long)__entry->to,
112116
(unsigned long long)__entry->mperf,
113117
(unsigned long long)__entry->aperf,
114118
(unsigned long long)__entry->tsc,
115-
(unsigned long)__entry->freq
119+
(unsigned long)__entry->freq,
120+
(unsigned long)__entry->io_boost
116121
)
117122

118123
);

0 commit comments

Comments
 (0)