Index: tools/skpbench/_hardware_android.py |
diff --git a/tools/skpbench/_hardware_android.py b/tools/skpbench/_hardware_android.py |
index a752ff5d93421822e8b5b121f17fc295add52b6d..abeab71d76887e53663517bfdaa1669830cf6836 100644 |
--- a/tools/skpbench/_hardware_android.py |
+++ b/tools/skpbench/_hardware_android.py |
@@ -11,7 +11,7 @@ import time |
class HardwareAndroid(Hardware): |
def __init__(self, adb): |
Hardware.__init__(self) |
- self.kick_in_time = 5 |
+ self.warmup_time = 5 |
self._adb = adb |
self._is_root = self._adb.attempt_root() |
if self._is_root: |
@@ -89,5 +89,30 @@ class HardwareAndroid(Hardware): |
def sanity_check(self): |
Hardware.sanity_check(self) |
+ def print_debug_diagnostics(self): |
+ # search for and print thermal trip points that may have been exceeded. |
+ self._adb.shell('''\ |
+ THERMALDIR=/sys/class/thermal |
+ if [ -e $THERMALDIR ]; then |
+ for ZONE in $(cd $THERMALDIR; echo thermal_zone*); do |
+ cd $THERMALDIR/$ZONE |
+ if [ -e mode ] && grep -Fxq enabled mode; then |
+ TEMP=$(cat temp) |
+ TRIPPOINT= |
+ let i=0 |
+ while [ -e trip_point_${i}_temp ] && |
+ [ $TEMP -gt $(cat trip_point_${i}_temp) ]; do |
+ TRIPPOINT=trip_point_${i}_temp |
+ let i=i+1 |
+ done |
+ if [ $TRIPPOINT ]; then |
+ echo "$ZONE ($(cat type)): temp=$TEMP > $TRIPPOINT=$(cat $TRIPPOINT)" |
+ fi |
+ fi |
+ done |
+ fi''') |
+ |
+ Hardware.print_debug_diagnostics(self) |
+ |
def sleep(self, sleeptime): |
Hardware.sleep(self, sleeptime) |