diff options
author | Len Brown <len.brown@intel.com> | 2015-06-17 12:27:21 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2015-06-17 12:27:21 -0400 |
commit | bfae2052265cde825afaba35eb3a4d3889432734 (patch) | |
tree | 9abd87283740d759def86b80900286cc5aed8fda /tools | |
parent | 75fd7ffa7fab91c2c3234bd3e465ba4f366733f4 (diff) |
tools/power turbostat: cpu0 is no longer hard-coded, so update output
The --debug option reads a number of per-package MSRs.
Previously we explicitly read them on cpu0, but recently
turbostat changed to read them on the current "base_cpu".
Update the print-out to reflect base_cpu, rather than
the hard-coded cpu0.
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/power/x86/turbostat/turbostat.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 323b65edfc97..67162ec6e87b 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c | |||
@@ -1157,7 +1157,7 @@ dump_nhm_platform_info(void) | |||
1157 | 1157 | ||
1158 | get_msr(base_cpu, MSR_NHM_PLATFORM_INFO, &msr); | 1158 | get_msr(base_cpu, MSR_NHM_PLATFORM_INFO, &msr); |
1159 | 1159 | ||
1160 | fprintf(stderr, "cpu0: MSR_NHM_PLATFORM_INFO: 0x%08llx\n", msr); | 1160 | fprintf(stderr, "cpu%d: MSR_NHM_PLATFORM_INFO: 0x%08llx\n", base_cpu, msr); |
1161 | 1161 | ||
1162 | ratio = (msr >> 40) & 0xFF; | 1162 | ratio = (msr >> 40) & 0xFF; |
1163 | fprintf(stderr, "%d * %.0f = %.0f MHz max efficiency frequency\n", | 1163 | fprintf(stderr, "%d * %.0f = %.0f MHz max efficiency frequency\n", |
@@ -1168,8 +1168,8 @@ dump_nhm_platform_info(void) | |||
1168 | ratio, bclk, ratio * bclk); | 1168 | ratio, bclk, ratio * bclk); |
1169 | 1169 | ||
1170 | get_msr(base_cpu, MSR_IA32_POWER_CTL, &msr); | 1170 | get_msr(base_cpu, MSR_IA32_POWER_CTL, &msr); |
1171 | fprintf(stderr, "cpu0: MSR_IA32_POWER_CTL: 0x%08llx (C1E auto-promotion: %sabled)\n", | 1171 | fprintf(stderr, "cpu%d: MSR_IA32_POWER_CTL: 0x%08llx (C1E auto-promotion: %sabled)\n", |
1172 | msr, msr & 0x2 ? "EN" : "DIS"); | 1172 | base_cpu, msr, msr & 0x2 ? "EN" : "DIS"); |
1173 | 1173 | ||
1174 | return; | 1174 | return; |
1175 | } | 1175 | } |
@@ -1182,7 +1182,7 @@ dump_hsw_turbo_ratio_limits(void) | |||
1182 | 1182 | ||
1183 | get_msr(base_cpu, MSR_TURBO_RATIO_LIMIT2, &msr); | 1183 | get_msr(base_cpu, MSR_TURBO_RATIO_LIMIT2, &msr); |
1184 | 1184 | ||
1185 | fprintf(stderr, "cpu0: MSR_TURBO_RATIO_LIMIT2: 0x%08llx\n", msr); | 1185 | fprintf(stderr, "cpu%d: MSR_TURBO_RATIO_LIMIT2: 0x%08llx\n", base_cpu, msr); |
1186 | 1186 | ||
1187 | ratio = (msr >> 8) & 0xFF; | 1187 | ratio = (msr >> 8) & 0xFF; |
1188 | if (ratio) | 1188 | if (ratio) |
@@ -1204,7 +1204,7 @@ dump_ivt_turbo_ratio_limits(void) | |||
1204 | 1204 | ||
1205 | get_msr(base_cpu, MSR_TURBO_RATIO_LIMIT1, &msr); | 1205 | get_msr(base_cpu, MSR_TURBO_RATIO_LIMIT1, &msr); |
1206 | 1206 | ||
1207 | fprintf(stderr, "cpu0: MSR_TURBO_RATIO_LIMIT1: 0x%08llx\n", msr); | 1207 | fprintf(stderr, "cpu%d: MSR_TURBO_RATIO_LIMIT1: 0x%08llx\n", base_cpu, msr); |
1208 | 1208 | ||
1209 | ratio = (msr >> 56) & 0xFF; | 1209 | ratio = (msr >> 56) & 0xFF; |
1210 | if (ratio) | 1210 | if (ratio) |
@@ -1256,7 +1256,7 @@ dump_nhm_turbo_ratio_limits(void) | |||
1256 | 1256 | ||
1257 | get_msr(base_cpu, MSR_TURBO_RATIO_LIMIT, &msr); | 1257 | get_msr(base_cpu, MSR_TURBO_RATIO_LIMIT, &msr); |
1258 | 1258 | ||
1259 | fprintf(stderr, "cpu0: MSR_TURBO_RATIO_LIMIT: 0x%08llx\n", msr); | 1259 | fprintf(stderr, "cpu%d: MSR_TURBO_RATIO_LIMIT: 0x%08llx\n", base_cpu, msr); |
1260 | 1260 | ||
1261 | ratio = (msr >> 56) & 0xFF; | 1261 | ratio = (msr >> 56) & 0xFF; |
1262 | if (ratio) | 1262 | if (ratio) |
@@ -1312,8 +1312,8 @@ dump_knl_turbo_ratio_limits(void) | |||
1312 | 1312 | ||
1313 | get_msr(base_cpu, MSR_NHM_TURBO_RATIO_LIMIT, &msr); | 1313 | get_msr(base_cpu, MSR_NHM_TURBO_RATIO_LIMIT, &msr); |
1314 | 1314 | ||
1315 | fprintf(stderr, "cpu0: MSR_NHM_TURBO_RATIO_LIMIT: 0x%08llx\n", | 1315 | fprintf(stderr, "cpu%d: MSR_NHM_TURBO_RATIO_LIMIT: 0x%08llx\n", |
1316 | msr); | 1316 | base_cpu, msr); |
1317 | 1317 | ||
1318 | /** | 1318 | /** |
1319 | * Turbo encoding in KNL is as follows: | 1319 | * Turbo encoding in KNL is as follows: |
@@ -1371,7 +1371,7 @@ dump_nhm_cst_cfg(void) | |||
1371 | #define SNB_C1_AUTO_UNDEMOTE (1UL << 27) | 1371 | #define SNB_C1_AUTO_UNDEMOTE (1UL << 27) |
1372 | #define SNB_C3_AUTO_UNDEMOTE (1UL << 28) | 1372 | #define SNB_C3_AUTO_UNDEMOTE (1UL << 28) |
1373 | 1373 | ||
1374 | fprintf(stderr, "cpu0: MSR_NHM_SNB_PKG_CST_CFG_CTL: 0x%08llx", msr); | 1374 | fprintf(stderr, "cpu%d: MSR_NHM_SNB_PKG_CST_CFG_CTL: 0x%08llx", base_cpu, msr); |
1375 | 1375 | ||
1376 | fprintf(stderr, " (%s%s%s%s%slocked: pkg-cstate-limit=%d: %s)\n", | 1376 | fprintf(stderr, " (%s%s%s%s%slocked: pkg-cstate-limit=%d: %s)\n", |
1377 | (msr & SNB_C3_AUTO_UNDEMOTE) ? "UNdemote-C3, " : "", | 1377 | (msr & SNB_C3_AUTO_UNDEMOTE) ? "UNdemote-C3, " : "", |