aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Zhbanov <i.zhbanov@samsung.com>2012-07-11 12:40:00 +0400
committerChris E Ferron <chris.e.ferron@linux.intel.com>2012-07-17 14:27:06 -0700
commit3d6764e47916953b62c02a312f79355e3ae66a8d (patch)
treef80eeceb4ad4ada7778b346553be36b959947bd6
parent19c88c268ef5f6cebaeb0696814bae012286bbae (diff)
Display all P-states in HTML-report
This is the formatted version of the patch: From 66d0f194250d94afcf83eb7712af6f50c6ad8ec4 Mon Sep 17 00:00:00 2001 From: Igor Zhbanov<i.zhbanov@samsung.com> Date: Wed, 11 Jul 2012 12:35:31 +0400 Subject: [PATCH] Display all P-states in HTML-report On Arm processors there are more than 10 P-states. On my device there are 12 p-states with different frequency. But PowerTOP displays only 10. And it doesn't display states (11 and 12) where the phone spends most of the time. I suppose that was because of console mode of PowerTOP, when there are limited number of lines on the console. But in the case of HTML-report this should not be a problem. This patch that counts the number of found P-states and displays all of them. The same issue may affect the function report_display_cpu_cstates() but I'm not sure that CPUs with more than 10 C-states exists. The same code is in the function impl_w_display_cpu_states(), but that function is used in console mode only where lines limit is reasonable.
-rw-r--r--src/cpu/cpu.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cpu/cpu.cpp b/src/cpu/cpu.cpp
index 4096835..92512a6 100644
--- a/src/cpu/cpu.cpp
+++ b/src/cpu/cpu.cpp
@@ -588,7 +588,11 @@ void report_display_cpu_pstates(void)
unsigned int package, core, cpu;
int line;
class abstract_cpu *_package, * _core, * _cpu;
-
+ unsigned int i, pstates_num;
+
+ for (i = 0, pstates_num = 0; i< all_cpus.size(); i++)
+ if (all_cpus[i]&& all_cpus[i]->pstates.size()> pstates_num)
+ pstates_num = all_cpus[i]->pstates.size();
if ((!reportout.csv_report)&&(!reportout.http_report))
return;
@@ -614,7 +618,7 @@ void report_display_cpu_pstates(void)
if (!_core)
continue;
- for (line = LEVEL_HEADER; line < 10; line++) {
+ for (line = LEVEL_HEADER; line < (int)pstates_num; line++) {
int first = 1;
if (!_package->has_pstate_level(line))