From b7a6f8b5958292f83dce985499b0d3d6fa5afba4 Mon Sep 17 00:00:00 2001 From: Len Brown Date: Fri, 21 Sep 2012 22:56:06 -0400 Subject: [PATCH] --- yaml --- r: 331743 b: refs/heads/master c: 130ff304f6d31484fc73bb337bc635cba1ffe04c h: refs/heads/master i: 331741: 558023e4cad4b820acaf9dc979678a00657baf94 331739: 64569e2b08bc61b8e137d34630f5ff2392b3658f 331735: d732ff03a532c9bf2588f6dda4f44faf1e5df13b 331727: dc277e452e24ec2402523f6c6f8104ca8a92e5de 331711: 414a2da11baef7b0b9ee6caf6c5e5c28aa462b5b v: v3 --- [refs] | 2 +- trunk/tools/power/x86/turbostat/turbostat.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 2ed5cf9c421d..b84102b9c78c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6574a5d5053cd3b8e7c088900b80a9ff51895450 +refs/heads/master: 130ff304f6d31484fc73bb337bc635cba1ffe04c diff --git a/trunk/tools/power/x86/turbostat/turbostat.c b/trunk/tools/power/x86/turbostat/turbostat.c index 5db4addbe1d9..5ce88dd8c95a 100644 --- a/trunk/tools/power/x86/turbostat/turbostat.c +++ b/trunk/tools/power/x86/turbostat/turbostat.c @@ -223,6 +223,8 @@ void print_header(void) if (has_aperf) outp += sprintf(outp, " GHz"); outp += sprintf(outp, " TSC"); + if (extra_msr_offset) + outp += sprintf(outp, " MSR 0x%04X", extra_msr_offset); if (do_nhm_cstates) outp += sprintf(outp, " %%c1"); if (do_nhm_cstates) @@ -239,8 +241,6 @@ void print_header(void) outp += sprintf(outp, " %%pc6"); if (do_snb_cstates) outp += sprintf(outp, " %%pc7"); - if (extra_msr_offset) - outp += sprintf(outp, " MSR 0x%x ", extra_msr_offset); outp += sprintf(outp, "\n"); } @@ -361,6 +361,10 @@ int format_counters(struct thread_data *t, struct core_data *c, /* TSC */ outp += sprintf(outp, "%5.2f", 1.0 * t->tsc/units/interval_float); + /* MSR */ + if (extra_msr_offset) + outp += sprintf(outp, " 0x%016llx", t->extra_msr); + if (do_nhm_cstates) { if (!skip_c1) outp += sprintf(outp, " %6.2f", 100.0 * t->c1/t->tsc); @@ -392,8 +396,6 @@ int format_counters(struct thread_data *t, struct core_data *c, if (do_snb_cstates) outp += sprintf(outp, " %6.2f", 100.0 * p->pc7/t->tsc); done: - if (extra_msr_offset) - outp += sprintf(outp, " 0x%016llx", t->extra_msr); outp += sprintf(outp, "\n"); return 0;