Skip to content

Commit 6b401a5

Browse files
kaushlenshuahkh
authored andcommitted
cpupower: idle_monitor: fix incorrect value logged after stop
The cpuidle sysfs monitor printed the previous sample’s counter value in cpuidle_stop() instead of the freshly read one. The dprint line used previous_count[cpu][state] while current_count[cpu][state] had just been populated. This caused misleading debug output. Switch the logging to current_count so the post-interval snapshot matches the displayed value. Link: https://lore.kernel.org/r/20251202044012.3844790-1-kaushlendra.kumar@intel.com Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
1 parent 8f0b4cc commit 6b401a5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static int cpuidle_stop(void)
7070
current_count[cpu][state] =
7171
cpuidle_state_time(cpu, state);
7272
dprint("CPU %d - State: %d - Val: %llu\n",
73-
cpu, state, previous_count[cpu][state]);
73+
cpu, state, current_count[cpu][state]);
7474
}
7575
}
7676
return 0;

0 commit comments

Comments
 (0)