forked from Minki/linux
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>
This commit is contained in:
parent
5dc241f2b2
commit
6799ba84ca
@ -6437,6 +6437,8 @@ int main(int argc, char **argv)
|
||||
|
||||
turbostat_init();
|
||||
|
||||
msr_sum_record();
|
||||
|
||||
/* dump counters and exit */
|
||||
if (dump_only)
|
||||
return get_and_dump_counters();
|
||||
@ -6448,7 +6450,6 @@ int main(int argc, char **argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
msr_sum_record();
|
||||
/*
|
||||
* if any params left, it must be a command to fork
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user