Commit f673b7c2 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'tools-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6

* 'tools-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6:
  tools/power turbostat: fit output into 80 columns on snb-ep
  tools/power x86_energy_perf_policy: fix print of uninitialized string
parents c299eba3 d30c4b7a
...@@ -128,9 +128,9 @@ unsigned long long get_msr(int cpu, off_t offset) ...@@ -128,9 +128,9 @@ unsigned long long get_msr(int cpu, off_t offset)
void print_header(void) void print_header(void)
{ {
if (show_pkg) if (show_pkg)
fprintf(stderr, "pkg "); fprintf(stderr, "pk");
if (show_core) if (show_core)
fprintf(stderr, "core"); fprintf(stderr, " cr");
if (show_cpu) if (show_cpu)
fprintf(stderr, " CPU"); fprintf(stderr, " CPU");
if (do_nhm_cstates) if (do_nhm_cstates)
...@@ -139,21 +139,21 @@ void print_header(void) ...@@ -139,21 +139,21 @@ void print_header(void)
fprintf(stderr, " GHz"); fprintf(stderr, " GHz");
fprintf(stderr, " TSC"); fprintf(stderr, " TSC");
if (do_nhm_cstates) if (do_nhm_cstates)
fprintf(stderr, " %%c1 "); fprintf(stderr, " %%c1");
if (do_nhm_cstates) if (do_nhm_cstates)
fprintf(stderr, " %%c3 "); fprintf(stderr, " %%c3");
if (do_nhm_cstates) if (do_nhm_cstates)
fprintf(stderr, " %%c6 "); fprintf(stderr, " %%c6");
if (do_snb_cstates) if (do_snb_cstates)
fprintf(stderr, " %%c7 "); fprintf(stderr, " %%c7");
if (do_snb_cstates) if (do_snb_cstates)
fprintf(stderr, " %%pc2 "); fprintf(stderr, " %%pc2");
if (do_nhm_cstates) if (do_nhm_cstates)
fprintf(stderr, " %%pc3 "); fprintf(stderr, " %%pc3");
if (do_nhm_cstates) if (do_nhm_cstates)
fprintf(stderr, " %%pc6 "); fprintf(stderr, " %%pc6");
if (do_snb_cstates) if (do_snb_cstates)
fprintf(stderr, " %%pc7 "); fprintf(stderr, " %%pc7");
if (extra_msr_offset) if (extra_msr_offset)
fprintf(stderr, " MSR 0x%x ", extra_msr_offset); fprintf(stderr, " MSR 0x%x ", extra_msr_offset);
...@@ -201,7 +201,7 @@ void print_cnt(struct counters *p) ...@@ -201,7 +201,7 @@ void print_cnt(struct counters *p)
fprintf(stderr, " "); fprintf(stderr, " ");
} else { } else {
if (show_pkg) if (show_pkg)
fprintf(stderr, "%4d", p->pkg); fprintf(stderr, "%d", p->pkg);
if (show_core) if (show_core)
fprintf(stderr, "%4d", p->core); fprintf(stderr, "%4d", p->core);
if (show_cpu) if (show_cpu)
...@@ -244,19 +244,19 @@ void print_cnt(struct counters *p) ...@@ -244,19 +244,19 @@ void print_cnt(struct counters *p)
fprintf(stderr, " ****"); fprintf(stderr, " ****");
} }
if (do_nhm_cstates) if (do_nhm_cstates)
fprintf(stderr, "%7.2f", 100.0 * p->c3/p->tsc); fprintf(stderr, " %6.2f", 100.0 * p->c3/p->tsc);
if (do_nhm_cstates) if (do_nhm_cstates)
fprintf(stderr, "%7.2f", 100.0 * p->c6/p->tsc); fprintf(stderr, " %6.2f", 100.0 * p->c6/p->tsc);
if (do_snb_cstates) if (do_snb_cstates)
fprintf(stderr, "%7.2f", 100.0 * p->c7/p->tsc); fprintf(stderr, " %6.2f", 100.0 * p->c7/p->tsc);
if (do_snb_cstates) if (do_snb_cstates)
fprintf(stderr, "%7.2f", 100.0 * p->pc2/p->tsc); fprintf(stderr, " %5.2f", 100.0 * p->pc2/p->tsc);
if (do_nhm_cstates) if (do_nhm_cstates)
fprintf(stderr, "%7.2f", 100.0 * p->pc3/p->tsc); fprintf(stderr, " %5.2f", 100.0 * p->pc3/p->tsc);
if (do_nhm_cstates) if (do_nhm_cstates)
fprintf(stderr, "%7.2f", 100.0 * p->pc6/p->tsc); fprintf(stderr, " %5.2f", 100.0 * p->pc6/p->tsc);
if (do_snb_cstates) if (do_snb_cstates)
fprintf(stderr, "%7.2f", 100.0 * p->pc7/p->tsc); fprintf(stderr, " %5.2f", 100.0 * p->pc7/p->tsc);
if (extra_msr_offset) if (extra_msr_offset)
fprintf(stderr, " 0x%016llx", p->extra_msr); fprintf(stderr, " 0x%016llx", p->extra_msr);
putc('\n', stderr); putc('\n', stderr);
......
...@@ -137,7 +137,6 @@ void cmdline(int argc, char **argv) ...@@ -137,7 +137,6 @@ void cmdline(int argc, char **argv)
void validate_cpuid(void) void validate_cpuid(void)
{ {
unsigned int eax, ebx, ecx, edx, max_level; unsigned int eax, ebx, ecx, edx, max_level;
char brand[16];
unsigned int fms, family, model, stepping; unsigned int fms, family, model, stepping;
eax = ebx = ecx = edx = 0; eax = ebx = ecx = edx = 0;
...@@ -160,8 +159,8 @@ void validate_cpuid(void) ...@@ -160,8 +159,8 @@ void validate_cpuid(void)
model += ((fms >> 16) & 0xf) << 4; model += ((fms >> 16) & 0xf) << 4;
if (verbose > 1) if (verbose > 1)
printf("CPUID %s %d levels family:model:stepping " printf("CPUID %d levels family:model:stepping "
"0x%x:%x:%x (%d:%d:%d)\n", brand, max_level, "0x%x:%x:%x (%d:%d:%d)\n", max_level,
family, model, stepping, family, model, stepping); family, model, stepping, family, model, stepping);
if (!(edx & (1 << 5))) { if (!(edx & (1 << 5))) {
......
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