diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-03 03:17:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-03 03:17:39 -0400 |
commit | f673b7c2c5c79ec239aca504452d2584b0bad34a (patch) | |
tree | 79773ad1f500253dbd2c5926221ea8d38dd641f3 /tools | |
parent | c299eba3c5a801657f275d33be588b34831cd30e (diff) | |
parent | d30c4b7a87e8b19583d5ef1402d9b38f51e30f44 (diff) |
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
Diffstat (limited to 'tools')
-rw-r--r-- | tools/power/x86/turbostat/turbostat.c | 46 | ||||
-rw-r--r-- | tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c | 5 |
2 files changed, 25 insertions, 26 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 6d8ef4a3a9b5..8b2d37b59c9e 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c | |||
@@ -128,34 +128,34 @@ unsigned long long get_msr(int cpu, off_t offset) | |||
128 | void print_header(void) | 128 | void print_header(void) |
129 | { | 129 | { |
130 | if (show_pkg) | 130 | if (show_pkg) |
131 | fprintf(stderr, "pkg "); | 131 | fprintf(stderr, "pk"); |
132 | if (show_core) | 132 | if (show_core) |
133 | fprintf(stderr, "core"); | 133 | fprintf(stderr, " cr"); |
134 | if (show_cpu) | 134 | if (show_cpu) |
135 | fprintf(stderr, " CPU"); | 135 | fprintf(stderr, " CPU"); |
136 | if (do_nhm_cstates) | 136 | if (do_nhm_cstates) |
137 | fprintf(stderr, " %%c0 "); | 137 | fprintf(stderr, " %%c0 "); |
138 | if (has_aperf) | 138 | if (has_aperf) |
139 | fprintf(stderr, " GHz"); | 139 | fprintf(stderr, " GHz"); |
140 | fprintf(stderr, " TSC"); | 140 | fprintf(stderr, " TSC"); |
141 | if (do_nhm_cstates) | 141 | if (do_nhm_cstates) |
142 | fprintf(stderr, " %%c1 "); | 142 | fprintf(stderr, " %%c1"); |
143 | if (do_nhm_cstates) | 143 | if (do_nhm_cstates) |
144 | fprintf(stderr, " %%c3 "); | 144 | fprintf(stderr, " %%c3"); |
145 | if (do_nhm_cstates) | 145 | if (do_nhm_cstates) |
146 | fprintf(stderr, " %%c6 "); | 146 | fprintf(stderr, " %%c6"); |
147 | if (do_snb_cstates) | 147 | if (do_snb_cstates) |
148 | fprintf(stderr, " %%c7 "); | 148 | fprintf(stderr, " %%c7"); |
149 | if (do_snb_cstates) | 149 | if (do_snb_cstates) |
150 | fprintf(stderr, " %%pc2 "); | 150 | fprintf(stderr, " %%pc2"); |
151 | if (do_nhm_cstates) | 151 | if (do_nhm_cstates) |
152 | fprintf(stderr, " %%pc3 "); | 152 | fprintf(stderr, " %%pc3"); |
153 | if (do_nhm_cstates) | 153 | if (do_nhm_cstates) |
154 | fprintf(stderr, " %%pc6 "); | 154 | fprintf(stderr, " %%pc6"); |
155 | if (do_snb_cstates) | 155 | if (do_snb_cstates) |
156 | fprintf(stderr, " %%pc7 "); | 156 | fprintf(stderr, " %%pc7"); |
157 | if (extra_msr_offset) | 157 | if (extra_msr_offset) |
158 | fprintf(stderr, " MSR 0x%x ", extra_msr_offset); | 158 | fprintf(stderr, " MSR 0x%x ", extra_msr_offset); |
159 | 159 | ||
160 | putc('\n', stderr); | 160 | putc('\n', stderr); |
161 | } | 161 | } |
@@ -194,14 +194,14 @@ void print_cnt(struct counters *p) | |||
194 | /* topology columns, print blanks on 1st (average) line */ | 194 | /* topology columns, print blanks on 1st (average) line */ |
195 | if (p == cnt_average) { | 195 | if (p == cnt_average) { |
196 | if (show_pkg) | 196 | if (show_pkg) |
197 | fprintf(stderr, " "); | 197 | fprintf(stderr, " "); |
198 | if (show_core) | 198 | if (show_core) |
199 | fprintf(stderr, " "); | 199 | fprintf(stderr, " "); |
200 | if (show_cpu) | 200 | if (show_cpu) |
201 | fprintf(stderr, " "); | 201 | fprintf(stderr, " "); |
202 | } else { | 202 | } else { |
203 | if (show_pkg) | 203 | if (show_pkg) |
204 | fprintf(stderr, "%4d", p->pkg); | 204 | fprintf(stderr, "%d", p->pkg); |
205 | if (show_core) | 205 | if (show_core) |
206 | fprintf(stderr, "%4d", p->core); | 206 | fprintf(stderr, "%4d", p->core); |
207 | if (show_cpu) | 207 | if (show_cpu) |
@@ -241,22 +241,22 @@ void print_cnt(struct counters *p) | |||
241 | if (!skip_c1) | 241 | if (!skip_c1) |
242 | fprintf(stderr, "%7.2f", 100.0 * p->c1/p->tsc); | 242 | fprintf(stderr, "%7.2f", 100.0 * p->c1/p->tsc); |
243 | else | 243 | else |
244 | fprintf(stderr, " ****"); | 244 | fprintf(stderr, " ****"); |
245 | } | 245 | } |
246 | if (do_nhm_cstates) | 246 | if (do_nhm_cstates) |
247 | fprintf(stderr, "%7.2f", 100.0 * p->c3/p->tsc); | 247 | fprintf(stderr, " %6.2f", 100.0 * p->c3/p->tsc); |
248 | if (do_nhm_cstates) | 248 | if (do_nhm_cstates) |
249 | fprintf(stderr, "%7.2f", 100.0 * p->c6/p->tsc); | 249 | fprintf(stderr, " %6.2f", 100.0 * p->c6/p->tsc); |
250 | if (do_snb_cstates) | 250 | if (do_snb_cstates) |
251 | fprintf(stderr, "%7.2f", 100.0 * p->c7/p->tsc); | 251 | fprintf(stderr, " %6.2f", 100.0 * p->c7/p->tsc); |
252 | if (do_snb_cstates) | 252 | if (do_snb_cstates) |
253 | fprintf(stderr, "%7.2f", 100.0 * p->pc2/p->tsc); | 253 | fprintf(stderr, " %5.2f", 100.0 * p->pc2/p->tsc); |
254 | if (do_nhm_cstates) | 254 | if (do_nhm_cstates) |
255 | fprintf(stderr, "%7.2f", 100.0 * p->pc3/p->tsc); | 255 | fprintf(stderr, " %5.2f", 100.0 * p->pc3/p->tsc); |
256 | if (do_nhm_cstates) | 256 | if (do_nhm_cstates) |
257 | fprintf(stderr, "%7.2f", 100.0 * p->pc6/p->tsc); | 257 | fprintf(stderr, " %5.2f", 100.0 * p->pc6/p->tsc); |
258 | if (do_snb_cstates) | 258 | if (do_snb_cstates) |
259 | fprintf(stderr, "%7.2f", 100.0 * p->pc7/p->tsc); | 259 | fprintf(stderr, " %5.2f", 100.0 * p->pc7/p->tsc); |
260 | if (extra_msr_offset) | 260 | if (extra_msr_offset) |
261 | fprintf(stderr, " 0x%016llx", p->extra_msr); | 261 | fprintf(stderr, " 0x%016llx", p->extra_msr); |
262 | putc('\n', stderr); | 262 | putc('\n', stderr); |
diff --git a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c index 2618ef2ba31f..33c5c7ee148f 100644 --- a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c +++ b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c | |||
@@ -137,7 +137,6 @@ void cmdline(int argc, char **argv) | |||
137 | void validate_cpuid(void) | 137 | void validate_cpuid(void) |
138 | { | 138 | { |
139 | unsigned int eax, ebx, ecx, edx, max_level; | 139 | unsigned int eax, ebx, ecx, edx, max_level; |
140 | char brand[16]; | ||
141 | unsigned int fms, family, model, stepping; | 140 | unsigned int fms, family, model, stepping; |
142 | 141 | ||
143 | eax = ebx = ecx = edx = 0; | 142 | eax = ebx = ecx = edx = 0; |
@@ -160,8 +159,8 @@ void validate_cpuid(void) | |||
160 | model += ((fms >> 16) & 0xf) << 4; | 159 | model += ((fms >> 16) & 0xf) << 4; |
161 | 160 | ||
162 | if (verbose > 1) | 161 | if (verbose > 1) |
163 | printf("CPUID %s %d levels family:model:stepping " | 162 | printf("CPUID %d levels family:model:stepping " |
164 | "0x%x:%x:%x (%d:%d:%d)\n", brand, max_level, | 163 | "0x%x:%x:%x (%d:%d:%d)\n", max_level, |
165 | family, model, stepping, family, model, stepping); | 164 | family, model, stepping, family, model, stepping); |
166 | 165 | ||
167 | if (!(edx & (1 << 5))) { | 166 | if (!(edx & (1 << 5))) { |