Skip to content

Commit

Permalink
cpufreq: intel_pstate: Add io_boost trace
Browse files Browse the repository at this point in the history
Add io_boost percent to current pstate_sample tracepoint.

Signed-off-by: Srinivas Pandruvada <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
spandruvada authored and rafaeljw committed Sep 16, 2016
1 parent 09c448d commit 3ba7bca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion drivers/cpufreq/intel_pstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1316,7 +1316,8 @@ static inline void intel_pstate_adjust_busy_pstate(struct cpudata *cpu)
sample->mperf,
sample->aperf,
sample->tsc,
get_avg_frequency(cpu));
get_avg_frequency(cpu),
fp_toint(cpu->iowait_boost * 100));
}

static void intel_pstate_update_util(struct update_util_data *data, u64 time,
Expand Down
13 changes: 9 additions & 4 deletions include/trace/events/power.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ TRACE_EVENT(pstate_sample,
u64 mperf,
u64 aperf,
u64 tsc,
u32 freq
u32 freq,
u32 io_boost
),

TP_ARGS(core_busy,
Expand All @@ -79,7 +80,8 @@ TRACE_EVENT(pstate_sample,
mperf,
aperf,
tsc,
freq
freq,
io_boost
),

TP_STRUCT__entry(
Expand All @@ -91,6 +93,7 @@ TRACE_EVENT(pstate_sample,
__field(u64, aperf)
__field(u64, tsc)
__field(u32, freq)
__field(u32, io_boost)
),

TP_fast_assign(
Expand All @@ -102,17 +105,19 @@ TRACE_EVENT(pstate_sample,
__entry->aperf = aperf;
__entry->tsc = tsc;
__entry->freq = freq;
__entry->io_boost = io_boost;
),

TP_printk("core_busy=%lu scaled=%lu from=%lu to=%lu mperf=%llu aperf=%llu tsc=%llu freq=%lu ",
TP_printk("core_busy=%lu scaled=%lu from=%lu to=%lu mperf=%llu aperf=%llu tsc=%llu freq=%lu io_boost=%lu",
(unsigned long)__entry->core_busy,
(unsigned long)__entry->scaled_busy,
(unsigned long)__entry->from,
(unsigned long)__entry->to,
(unsigned long long)__entry->mperf,
(unsigned long long)__entry->aperf,
(unsigned long long)__entry->tsc,
(unsigned long)__entry->freq
(unsigned long)__entry->freq,
(unsigned long)__entry->io_boost
)

);
Expand Down

0 comments on commit 3ba7bca

Please sign in to comment.