summaryrefslogtreecommitdiffstats
path: root/core/java/android/os
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2015-09-05 18:05:40 -0700
committerAdam Lesinski <adamlesinski@google.com>2015-09-09 17:07:54 -0700
commit6832f39416cbe2cc9655af4eabefe39c5d272254 (patch)
tree7b6a2c99c7938a4d79ffcea8387ddc69365265a7 /core/java/android/os
parent24a6be463e5628416ad234a3e2e33f1f4cc5b287 (diff)
downloadframeworks_base-6832f39416cbe2cc9655af4eabefe39c5d272254.zip
frameworks_base-6832f39416cbe2cc9655af4eabefe39c5d272254.tar.gz
frameworks_base-6832f39416cbe2cc9655af4eabefe39c5d272254.tar.bz2
BatteryStats: Better big-little CPU accounting
Generalize cpu clusters so we can measure frequency and power usage across heterogeneous cpu clusters. This also brings back reading of cpu-times for power calculation. Bug:22773176 Change-Id: I9c794ae9756c782c0e971c7f5fcebbe70374b269
Diffstat (limited to 'core/java/android/os')
-rw-r--r--core/java/android/os/BatteryStats.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java
index bad94fc..8e86a53 100644
--- a/core/java/android/os/BatteryStats.java
+++ b/core/java/android/os/BatteryStats.java
@@ -463,13 +463,15 @@ public abstract class BatteryStats implements Parcelable {
public abstract long getCpuPowerMaUs(int which);
/**
- * Returns the approximate cpu time (in milliseconds) spent at a certain CPU speed.
+ * Returns the approximate cpu time (in milliseconds) spent at a certain CPU speed for a
+ * given CPU cluster.
+ * @param cluster the index of the CPU cluster.
* @param step the index of the CPU speed. This is not the actual speed of the CPU.
* @param which one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT.
- * @see BatteryStats#getCpuSpeedSteps()
+ * @see PowerProfile.getNumCpuClusters()
+ * @see PowerProfile.getNumSpeedStepsInCpuCluster(int)
*/
- @Deprecated
- public abstract long getTimeAtCpuSpeed(int step, int which);
+ public abstract long getTimeAtCpuSpeed(int cluster, int step, int which);
public static abstract class Sensor {
/*
@@ -2276,9 +2278,6 @@ public abstract class BatteryStats implements Parcelable {
public abstract Map<String, ? extends Timer> getKernelWakelockStats();
- /** Returns the number of different speeds that the CPU can run at */
- public abstract int getCpuSpeedSteps();
-
public abstract void writeToParcelWithoutUids(Parcel out, int flags);
private final static void formatTimeRaw(StringBuilder out, long seconds) {