aboutsummaryrefslogtreecommitdiffstats
path: root/tools/power
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2011-07-31 18:19:33 -0400
committerLen Brown <len.brown@intel.com>2011-08-02 18:33:31 -0400
commitd30c4b7a87e8b19583d5ef1402d9b38f51e30f44 (patch)
tree6b23107235dece94092d0042618b56e6f9f392cf /tools/power
parente4c0d0e22ce5cf84b3993b5af6c2dac08d52f06b (diff)
tools/power turbostat: fit output into 80 columns on snb-ep
Reduce columns for package number to 1. If you can afford more than 9 packages, you can also afford a terminal with more than 80 columns:-) Also shave a column also off the package C-states Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'tools/power')
-rw-r--r--tools/power/x86/turbostat/turbostat.c46
1 files changed, 23 insertions, 23 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)
128void print_header(void) 128void 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);