aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/skpbench
diff options
context:
space:
mode:
authorGravatar Kevin Lubick <kjlubick@google.com>2018-03-14 11:01:03 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-19 14:22:55 +0000
commita3ecaf5fcfe9ce05fdc82bac4fcdecd045c9c265 (patch)
tree01fe249da9fe528542bf860b5186e42c1b774b9e /tools/skpbench
parente3d3f65396cd7427fd988727e27403fbe4313ef0 (diff)
[skpbench] Use android's perf settings for Pixel C
These are a bit more conservative, but will hopefully come with improved stability like https://skia-review.googlesource.com/c/skia/+/111740 did. If this works, we can push the envelope by using the slightly more aggressive settings found at https://android.googlesource.com/platform/platform_testing/+/master/scripts/perf-setup/dragon-setup.sh Bug: skia:7238 Change-Id: Ia0e24c7fc9bcc2fd44dcd0a57dde481ad8c55f7d Reviewed-on: https://skia-review.googlesource.com/114283 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
Diffstat (limited to 'tools/skpbench')
-rw-r--r--tools/skpbench/_hardware_pixel_c.py30
1 files changed, 18 insertions, 12 deletions
diff --git a/tools/skpbench/_hardware_pixel_c.py b/tools/skpbench/_hardware_pixel_c.py
index 037ae215c2..5d0b9f1ec4 100644
--- a/tools/skpbench/_hardware_pixel_c.py
+++ b/tools/skpbench/_hardware_pixel_c.py
@@ -6,9 +6,11 @@
from _hardware import HardwareException, Expectation
from _hardware_android import HardwareAndroid
-CPU_CLOCK_RATE = 1836000
-GPU_EMC_PROFILE = '0c: core 921 MHz emc 1600 MHz a A d D *'
-GPU_EMC_PROFILE_ID = '0c'
+CPU_CLOCK_RATE = 1326000
+# If you run adb cat /sys/devices/57000000.gpu/pstate it shows all
+# possible configurations, with a * next to the current one.
+GPU_EMC_PROFILE = '04: core 307 MHz emc 1065 MHz a A d D *'
+GPU_EMC_PROFILE_ID = '04'
class HardwarePixelC(HardwareAndroid):
def __init__(self, adb):
@@ -20,17 +22,21 @@ class HardwarePixelC(HardwareAndroid):
return self
self._adb.shell('\n'.join([
- # turn on and lock the first 3 cores.
+ # pylint: disable=line-too-long
+ # Based on https://android.googlesource.com/platform/frameworks/base/+/master/libs/hwui/tests/scripts/prep_ryu.sh
+ # All CPUs have the same scaling settings, so we only need to set it once
'''
- 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''' % tuple(CPU_CLOCK_RATE for _ in range(3)),
+ stop thermal-engine
+ stop perfd
- # turn off the fourth core.
+ echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo %i > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ echo %i > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo %i > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
+ ''' % tuple(CPU_CLOCK_RATE for _ in range(3)),
+ # turn off the fourth core. This will hopefully produce less heat, allowing
+ # for more consistent results. 3 cores should be enough to run Ganesh,
+ # the graphics driver, and the OS.
'''
echo 0 > /sys/devices/system/cpu/cpu3/online''',