Skip to content

Commit 6799ba8

Browse files
Dan Merillatlenb
authored andcommitted
tools/power turbostat: fix dump for AMD cpus
turbostat --Dump exits early with status 243 (-13) get_counters() calls get_msr_sum() on zen CPUS for MSR_PKG_ENERGY_STAT, but per_cpu_msr_sum has not been initialized. Signed-off-by: Dan Merillat <git@dan.eginity.com> Signed-off-by: Len Brown <len.brown@intel.com>
1 parent 5dc241f commit 6799ba8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tools/power/x86/turbostat/turbostat.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6437,6 +6437,8 @@ int main(int argc, char **argv)
64376437

64386438
turbostat_init();
64396439

6440+
msr_sum_record();
6441+
64406442
/* dump counters and exit */
64416443
if (dump_only)
64426444
return get_and_dump_counters();
@@ -6448,7 +6450,6 @@ int main(int argc, char **argv)
64486450
return 0;
64496451
}
64506452

6451-
msr_sum_record();
64526453
/*
64536454
* if any params left, it must be a command to fork
64546455
*/

0 commit comments

Comments
 (0)