aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2016-04-06 23:56:02 -0400
committerLen Brown <len.brown@intel.com>2016-12-01 01:33:15 -0500
commite975db5d528abf5c42adfc50a6b0384993b6280b (patch)
tree4911d3e377bbb4f5bf3a2dd32e217efbbdd5677e
parent43c4f67c966deb1478dc9acbf66ab547287d530f (diff)
tools/power turbostat: tidy up output on Joule counter overflow
The RAPL Joules counter is limited in capacity. Turbostat estimates how soon it can roll-over based on the max TDP of the processor -- which tells us the maximum increment rate. eg. RAPL: 2759 sec. Joule Counter Range, at 95 Watts So if a sample duration is longer than 2759 seconds on this system, '**' replace the decimal place in the display to indicate that the results may be suspect. But the display had an extra ' ' in this case, throwing off the columns. Also, the -J "Joules" option appended an extra "time" column to the display. While this may be useful, it printed the interval time, which may not be the accurate time per processor. Remove this column, which appeared only when using '-J', as we plan to add accurate per-cpu interval times in a future commit. Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--tools/power/x86/turbostat/turbostat.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 3e199b508a96..a302a333c084 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -423,8 +423,6 @@ void print_header(void)
423 outp += sprintf(outp, " PKG_%%"); 423 outp += sprintf(outp, " PKG_%%");
424 if (do_rapl & RAPL_DRAM_PERF_STATUS) 424 if (do_rapl & RAPL_DRAM_PERF_STATUS)
425 outp += sprintf(outp, " RAM_%%"); 425 outp += sprintf(outp, " RAM_%%");
426 outp += sprintf(outp, " time");
427
428 } 426 }
429 done: 427 done:
430 outp += sprintf(outp, "\n"); 428 outp += sprintf(outp, "\n");
@@ -665,7 +663,7 @@ int format_counters(struct thread_data *t, struct core_data *c,
665 if (interval_float < rapl_joule_counter_range) 663 if (interval_float < rapl_joule_counter_range)
666 fmt8 = "%8.2f"; 664 fmt8 = "%8.2f";
667 else 665 else
668 fmt8 = " %6.0f**"; 666 fmt8 = "%6.0f**";
669 667
670 if (do_rapl && !rapl_joules) { 668 if (do_rapl && !rapl_joules) {
671 if (do_rapl & RAPL_PKG) 669 if (do_rapl & RAPL_PKG)
@@ -697,8 +695,6 @@ int format_counters(struct thread_data *t, struct core_data *c,
697 outp += sprintf(outp, fmt8, 100.0 * p->rapl_pkg_perf_status * rapl_time_units / interval_float); 695 outp += sprintf(outp, fmt8, 100.0 * p->rapl_pkg_perf_status * rapl_time_units / interval_float);
698 if (do_rapl & RAPL_DRAM_PERF_STATUS) 696 if (do_rapl & RAPL_DRAM_PERF_STATUS)
699 outp += sprintf(outp, fmt8, 100.0 * p->rapl_dram_perf_status * rapl_time_units / interval_float); 697 outp += sprintf(outp, fmt8, 100.0 * p->rapl_dram_perf_status * rapl_time_units / interval_float);
700
701 outp += sprintf(outp, fmt8, interval_float);
702 } 698 }
703done: 699done:
704 outp += sprintf(outp, "\n"); 700 outp += sprintf(outp, "\n");