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

Unified Diff: tools/skpbench/_hardware_pixel_c.py

Issue 2491633002: skpbench: use 3 cores instead of 4 on Pixel C (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skpbench/_hardware_pixel_c.py
diff --git a/tools/skpbench/_hardware_pixel_c.py b/tools/skpbench/_hardware_pixel_c.py
index 842ee0c50235b1fbef109448d048cfbb80f51d3d..47f3ec4b0b355078727a9d7f6771a9e0124a1f55 100644
--- a/tools/skpbench/_hardware_pixel_c.py
+++ b/tools/skpbench/_hardware_pixel_c.py
@@ -28,12 +28,19 @@ class HardwarePixelC(HardwareAndroid):
return
self._adb.shell('\n'.join([
- # lock cpu clocks.
+ # turn on and lock the first 3 cores.
'''
- for N in $(seq 0 3); do
+ for N in 0 1 2; do
+ echo 1 > /sys/devices/system/cpu/cpu$N/online
echo userspace > /sys/devices/system/cpu/cpu$N/cpufreq/scaling_governor
+ echo %i > /sys/devices/system/cpu/cpu$N/cpufreq/scaling_max_freq
+ echo %i > /sys/devices/system/cpu/cpu$N/cpufreq/scaling_min_freq
echo %i > /sys/devices/system/cpu/cpu$N/cpufreq/scaling_setspeed
- done''' % CPU_CLOCK_RATE,
+ done''' % tuple(CPU_CLOCK_RATE for _ in range(3)),
+
+ # turn off the fourth core.
+ '''
+ echo 0 > /sys/devices/system/cpu/cpu3/online''',
# lock gpu/emc clocks.
'''
@@ -50,9 +57,15 @@ class HardwarePixelC(HardwareAndroid):
echo auto > /sys/devices/57000000.gpu/pstate
chown system:system /sys/devices/57000000.gpu/pstate''',
- # unlock cpu clocks.
+ # turn the fourth core back on.
+ '''
+ echo 1 > /sys/devices/system/cpu/cpu3/online''',
+
+ # unlock the first 3 cores.
'''
- for N in $(seq 0 3); do
+ for N in 2 1 0; do
+ echo 1912500 > /sys/devices/system/cpu/cpu$N/cpufreq/scaling_max_freq
+ echo 51000 > /sys/devices/system/cpu/cpu$N/cpufreq/scaling_min_freq
echo 0 > /sys/devices/system/cpu/cpu$N/cpufreq/scaling_setspeed
echo interactive >/sys/devices/system/cpu/cpu$N/cpufreq/scaling_governor
done''']))
@@ -66,18 +79,20 @@ class HardwarePixelC(HardwareAndroid):
# only issue one shell command in an attempt to minimize interference.
result = self._adb.check('''\
cat /sys/class/power_supply/bq27742-0/capacity \
+ /sys/devices/system/cpu/online \
/sys/class/thermal/thermal_zone7/temp \
/sys/class/thermal/thermal_zone0/temp \
/sys/class/thermal/thermal_zone1/temp \
/sys/class/thermal/thermal_zone7/cdev1/cur_state \
/sys/class/thermal/thermal_zone7/cdev0/cur_state
- for N in $(seq 0 3); do
+ for N in 0 1 2; do
cat /sys/devices/system/cpu/cpu$N/cpufreq/scaling_cur_freq
done
cat /sys/devices/57000000.gpu/pstate | grep \*$''')
expectations = \
[Expectation(int, min_value=30, name='battery', sleeptime=30*60),
+ Expectation(str, exact_value='0-2', name='online cpus'),
Expectation(int, max_value=40000, name='skin temperature'),
Expectation(int, max_value=86000, name='cpu temperature'),
Expectation(int, max_value=87000, name='gpu temperature'),
@@ -85,7 +100,7 @@ class HardwarePixelC(HardwareAndroid):
Expectation(int, exact_value=0, name='gpu throttle')] + \
[Expectation(int, exact_value=CPU_CLOCK_RATE,
name='cpu_%i clock rate' % i, sleeptime=30)
- for i in range(4)] + \
+ for i in (0, 1, 2)] + \
[Expectation(str, exact_value=GPU_EMC_PROFILE, name='gpu/emc profile')]
Expectation.check_all(expectations, result.splitlines())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698