Skip to content

Commit ff72619

Browse files
kaushlenshuahkh
authored andcommitted
tools/power cpupower: Show C0 in idle-info dump
`cpupower idle-info -o` skipped C0 because the loop began at 1: before: states: C1 ... latency[002] residency[00002] C2 ... latency[010] residency[00020] C3 ... latency[133] residency[00600] after: states: C0 ... latency[000] residency[00000] C1 ... latency[002] residency[00002] C2 ... latency[010] residency[00020] C3 ... latency[133] residency[00600] Start iterating at index 0 so the idle report mirrors sysfs and includes C0 stats. Link: https://lore.kernel.org/r/20251202065403.1492807-1-kaushlendra.kumar@intel.com Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
1 parent f9bd376 commit ff72619

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/power/cpupower/utils/cpuidle-info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static void proc_cpuidle_cpu_output(unsigned int cpu)
111111
printf(_("max_cstate: C%u\n"), cstates-1);
112112
printf(_("maximum allowed latency: %lu usec\n"), max_allowed_cstate);
113113
printf(_("states:\t\n"));
114-
for (cstate = 1; cstate < cstates; cstate++) {
114+
for (cstate = 0; cstate < cstates; cstate++) {
115115
printf(_(" C%d: "
116116
"type[C%d] "), cstate, cstate);
117117
printf(_("promotion[--] demotion[--] "));

0 commit comments

Comments
 (0)