diff options
author | Zhang Rui <rui.zhang@intel.com> | 2021-04-26 10:05:27 +0800 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2021-05-04 20:01:08 -0400 |
commit | e9d3092f6d7c21031c8ac10ba2016ae0482a39fe (patch) | |
tree | 7d41db3f33bbd173e391e80309b17e4f9421ad2c /tools | |
parent | 7ab5ff4937a338783d147ec2d8c8714f48a5de79 (diff) |
tools/power turbostat: save original CPU model
CPU model may get changed in intel_model_duplicates() for code reuse.
But there are still some cases we need the original CPU model to handle
minor differences between generations.
Thus save the original CPU model.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/power/x86/turbostat/turbostat.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index ee18966f65a4..d1ae6b248377 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -43,6 +43,10 @@ int *fd_percpu; int *fd_instr_count_percpu; struct timeval interval_tv = {5, 0}; struct timespec interval_ts = {5, 0}; + +/* Save original CPU model */ +unsigned int model_orig; + unsigned int num_iterations; unsigned int debug; unsigned int quiet; @@ -5257,6 +5261,7 @@ void process_cpuid() edx_flags & (1 << 29) ? "TM" : "-"); } if (genuine_intel) { + model_orig = model; model = intel_model_duplicates(model); } |