diff options
author | Dan Merillat <git@dan.eginity.com> | 2021-05-09 11:08:55 +0200 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2022-04-17 03:58:14 +0200 |
commit | 6799ba84cab7784cb9f060a24790482de209e318 (patch) | |
tree | bd582d0f06ca57cbf024d752ffb25a788577fb00 /tools/power | |
parent | tools/power turbostat: tweak --show and --hide capability (diff) | |
download | linux-6799ba84cab7784cb9f060a24790482de209e318.tar.xz linux-6799ba84cab7784cb9f060a24790482de209e318.zip |
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>
Diffstat (limited to 'tools/power')
-rw-r--r-- | tools/power/x86/turbostat/turbostat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index c05099431378..1ba444d9b68a 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -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 */ |