Commit e9d3092f authored by Zhang Rui's avatar Zhang Rui Committed by Len Brown

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: default avatarZhang Rui <rui.zhang@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 7ab5ff49
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment