Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Unified Diff: tools/skpbench/_hardware_android.py

Issue 2408893002: skpbench: add debug prints for thermal trip points (Closed)
Patch Set: skpbench: add warmup run Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/skpbench/_hardware.py ('k') | tools/skpbench/skpbench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « tools/skpbench/_hardware.py ('k') | tools/skpbench/skpbench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698