aboutsummaryrefslogtreecommitdiffstats
path: root/tools/power/x86/turbostat/turbostat.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2014-08-14 21:22:13 -0400
committerLen Brown <len.brown@intel.com>2014-08-15 17:34:44 -0400
commite7c95ff32d0075736cbdd8d38d954fb4ed6ced9b (patch)
tree16fde981623b79d550e13ab3bc5e836827a0d2d4 /tools/power/x86/turbostat/turbostat.c
parenta138b56800f4b83a7af69a9958d04f0f124eb37b (diff)
tools/power turbostat: tweak whitespace in output format
turbostat -S output was off by 1 space before this patch. Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'tools/power/x86/turbostat/turbostat.c')
-rw-r--r--tools/power/x86/turbostat/turbostat.c80
1 files changed, 40 insertions, 40 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index d0396af99fa0..5b1b807265a1 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -267,90 +267,90 @@ int get_msr(int cpu, off_t offset, unsigned long long *msr)
267/* 267/*
268 * Example Format w/ field column widths: 268 * Example Format w/ field column widths:
269 * 269 *
270 * Package Core CPU Avg_MHz Bzy_MHz TSC_MHz SMI %Busy CPU_%c1 CPU_%c3 CPU_%c6 CPU_%c7 CoreTmp PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 PkgWatt CorWatt GFXWatt 270 * Package Core CPU Avg_MHz Bzy_MHz TSC_MHz SMI %Busy CPU_%c1 CPU_%c3 CPU_%c6 CPU_%c7 CoreTmp PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 PkgWatt CorWatt GFXWatt
271 * 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 271 * 123456781234567812345678123456781234567812345678123456781234567812345678123456781234567812345678123456781234567812345678123456781234567812345678123456781234567812345678
272 */ 272 */
273 273
274void print_header(void) 274void print_header(void)
275{ 275{
276 if (show_pkg) 276 if (show_pkg)
277 outp += sprintf(outp, "Package "); 277 outp += sprintf(outp, " Package");
278 if (show_core) 278 if (show_core)
279 outp += sprintf(outp, " Core "); 279 outp += sprintf(outp, " Core");
280 if (show_cpu) 280 if (show_cpu)
281 outp += sprintf(outp, " CPU "); 281 outp += sprintf(outp, " CPU");
282 if (has_aperf) 282 if (has_aperf)
283 outp += sprintf(outp, "Avg_MHz "); 283 outp += sprintf(outp, " Avg_MHz");
284 if (do_nhm_cstates) 284 if (do_nhm_cstates)
285 outp += sprintf(outp, " %%Busy "); 285 outp += sprintf(outp, " %%Busy");
286 if (has_aperf) 286 if (has_aperf)
287 outp += sprintf(outp, "Bzy_MHz "); 287 outp += sprintf(outp, " Bzy_MHz");
288 outp += sprintf(outp, "TSC_MHz "); 288 outp += sprintf(outp, " TSC_MHz");
289 if (do_smi) 289 if (do_smi)
290 outp += sprintf(outp, " SMI "); 290 outp += sprintf(outp, " SMI");
291 if (extra_delta_offset32) 291 if (extra_delta_offset32)
292 outp += sprintf(outp, " count 0x%03X ", extra_delta_offset32); 292 outp += sprintf(outp, " count 0x%03X", extra_delta_offset32);
293 if (extra_delta_offset64) 293 if (extra_delta_offset64)
294 outp += sprintf(outp, " COUNT 0x%03X ", extra_delta_offset64); 294 outp += sprintf(outp, " COUNT 0x%03X", extra_delta_offset64);
295 if (extra_msr_offset32) 295 if (extra_msr_offset32)
296 outp += sprintf(outp, " MSR 0x%03X ", extra_msr_offset32); 296 outp += sprintf(outp, " MSR 0x%03X", extra_msr_offset32);
297 if (extra_msr_offset64) 297 if (extra_msr_offset64)
298 outp += sprintf(outp, " MSR 0x%03X ", extra_msr_offset64); 298 outp += sprintf(outp, " MSR 0x%03X", extra_msr_offset64);
299 if (do_nhm_cstates) 299 if (do_nhm_cstates)
300 outp += sprintf(outp, " CPU%%c1 "); 300 outp += sprintf(outp, " CPU%%c1");
301 if (do_nhm_cstates && !do_slm_cstates) 301 if (do_nhm_cstates && !do_slm_cstates)
302 outp += sprintf(outp, " CPU%%c3 "); 302 outp += sprintf(outp, " CPU%%c3");
303 if (do_nhm_cstates) 303 if (do_nhm_cstates)
304 outp += sprintf(outp, " CPU%%c6 "); 304 outp += sprintf(outp, " CPU%%c6");
305 if (do_snb_cstates) 305 if (do_snb_cstates)
306 outp += sprintf(outp, " CPU%%c7 "); 306 outp += sprintf(outp, " CPU%%c7");
307 307
308 if (do_dts) 308 if (do_dts)
309 outp += sprintf(outp, "CoreTmp "); 309 outp += sprintf(outp, " CoreTmp");
310 if (do_ptm) 310 if (do_ptm)
311 outp += sprintf(outp, " PkgTmp "); 311 outp += sprintf(outp, " PkgTmp");
312 312
313 if (do_snb_cstates) 313 if (do_snb_cstates)
314 outp += sprintf(outp, "Pkg%%pc2 "); 314 outp += sprintf(outp, " Pkg%%pc2");
315 if (do_nhm_cstates && !do_slm_cstates) 315 if (do_nhm_cstates && !do_slm_cstates)
316 outp += sprintf(outp, "Pkg%%pc3 "); 316 outp += sprintf(outp, " Pkg%%pc3");
317 if (do_nhm_cstates && !do_slm_cstates) 317 if (do_nhm_cstates && !do_slm_cstates)
318 outp += sprintf(outp, "Pkg%%pc6 "); 318 outp += sprintf(outp, " Pkg%%pc6");
319 if (do_snb_cstates) 319 if (do_snb_cstates)
320 outp += sprintf(outp, "Pkg%%pc7 "); 320 outp += sprintf(outp, " Pkg%%pc7");
321 if (do_c8_c9_c10) { 321 if (do_c8_c9_c10) {
322 outp += sprintf(outp, "Pkg%%pc8 "); 322 outp += sprintf(outp, " Pkg%%pc8");
323 outp += sprintf(outp, "Pkg%%pc9 "); 323 outp += sprintf(outp, " Pkg%%pc9");
324 outp += sprintf(outp, "Pk%%pc10 "); 324 outp += sprintf(outp, " Pk%%pc10");
325 } 325 }
326 326
327 if (do_rapl && !rapl_joules) { 327 if (do_rapl && !rapl_joules) {
328 if (do_rapl & RAPL_PKG) 328 if (do_rapl & RAPL_PKG)
329 outp += sprintf(outp, "PkgWatt "); 329 outp += sprintf(outp, " PkgWatt");
330 if (do_rapl & RAPL_CORES) 330 if (do_rapl & RAPL_CORES)
331 outp += sprintf(outp, "CorWatt "); 331 outp += sprintf(outp, " CorWatt");
332 if (do_rapl & RAPL_GFX) 332 if (do_rapl & RAPL_GFX)
333 outp += sprintf(outp, "GFXWatt "); 333 outp += sprintf(outp, " GFXWatt");
334 if (do_rapl & RAPL_DRAM) 334 if (do_rapl & RAPL_DRAM)
335 outp += sprintf(outp, "RAMWatt "); 335 outp += sprintf(outp, " RAMWatt");
336 if (do_rapl & RAPL_PKG_PERF_STATUS) 336 if (do_rapl & RAPL_PKG_PERF_STATUS)
337 outp += sprintf(outp, " PKG_%% "); 337 outp += sprintf(outp, " PKG_%%");
338 if (do_rapl & RAPL_DRAM_PERF_STATUS) 338 if (do_rapl & RAPL_DRAM_PERF_STATUS)
339 outp += sprintf(outp, " RAM_%% "); 339 outp += sprintf(outp, " RAM_%%");
340 } else { 340 } else {
341 if (do_rapl & RAPL_PKG) 341 if (do_rapl & RAPL_PKG)
342 outp += sprintf(outp, " Pkg_J "); 342 outp += sprintf(outp, " Pkg_J");
343 if (do_rapl & RAPL_CORES) 343 if (do_rapl & RAPL_CORES)
344 outp += sprintf(outp, " Cor_J "); 344 outp += sprintf(outp, " Cor_J");
345 if (do_rapl & RAPL_GFX) 345 if (do_rapl & RAPL_GFX)
346 outp += sprintf(outp, " GFX_J "); 346 outp += sprintf(outp, " GFX_J");
347 if (do_rapl & RAPL_DRAM) 347 if (do_rapl & RAPL_DRAM)
348 outp += sprintf(outp, " RAM_W "); 348 outp += sprintf(outp, " RAM_W");
349 if (do_rapl & RAPL_PKG_PERF_STATUS) 349 if (do_rapl & RAPL_PKG_PERF_STATUS)
350 outp += sprintf(outp, " PKG_%% "); 350 outp += sprintf(outp, " PKG_%%");
351 if (do_rapl & RAPL_DRAM_PERF_STATUS) 351 if (do_rapl & RAPL_DRAM_PERF_STATUS)
352 outp += sprintf(outp, " RAM_%% "); 352 outp += sprintf(outp, " RAM_%%");
353 outp += sprintf(outp, " time "); 353 outp += sprintf(outp, " time");
354 354
355 } 355 }
356 outp += sprintf(outp, "\n"); 356 outp += sprintf(outp, "\n");