aboutsummaryrefslogtreecommitdiff
path: root/idlestat.h
diff options
context:
space:
mode:
authorZoran Markovic <zoran.markovic@linaro.org>2014-01-28 12:38:21 -0800
committerZoran Markovic <zoran.markovic@linaro.org>2014-02-20 11:08:13 -0800
commiteb78305213e8017482acb9f6f5325b9e1151d75b (patch)
tree8eb9931c9c65b9b741d507ea2e6033d775d3109c /idlestat.h
parent4508cc8c2d38ec4064bcdc4469ea1e02bd56bba3 (diff)
Build tree of per-CPU structs to track P-state transitions
The tree is built by parsing the cpufreq sysfs entries for each CPU.
Diffstat (limited to 'idlestat.h')
-rw-r--r--idlestat.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/idlestat.h b/idlestat.h
index 2c03bfd..4b0df01 100644
--- a/idlestat.h
+++ b/idlestat.h
@@ -25,6 +25,7 @@
#define BUFSIZE 256
#define NAMELEN 16
#define MAXCSTATE 8
+#define MAXPSTATE 8
#define MAX(A, B) (A > B ? A : B)
#define MIN(A, B) (A < B ? A : B)
#define AVG(A, B, I) ((A) + ((B - A) / (I)))
@@ -72,8 +73,27 @@ struct cpuidle_cstates {
struct wakeup_irq *wakeirq;
};
+struct cpufreq_pstate {
+ int id;
+ unsigned int freq;
+ int count;
+ double min_time;
+ double max_time;
+ double avg_time;
+ double duration;
+};
+
+struct cpufreq_pstates {
+ struct cpufreq_pstate *pstate;
+ int current;
+ double time_enter;
+ double time_exit;
+ int max;
+};
+
struct cpuidle_datas {
struct cpuidle_cstates *cstates;
+ struct cpufreq_pstates *pstates;
int nrcpus;
};