diff options
5 files changed, 6 insertions, 99 deletions
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android.json index 308e31e7e1..7fbe99225c 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android.json @@ -970,7 +970,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nfreq = sys.argv[2]\nidle_timer = \"10000\"\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'stop', 'thermald'])\n\nsubprocess.check_output([ADB, 'shell', 'echo \"performance\" > '\n '/sys/class/kgsl/kgsl-3d0/devfreq/governor'])\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/class/kgsl/kgsl-3d0/gpuclk' % freq])\n\ntime.sleep(1)\n\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/gpuclk']).strip()\nif actual_freq != freq:\n raise Exception('Frequency (actual, expected) (%s, %s)'\n % (actual_freq, freq))\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/class/kgsl/kgsl-3d0/idle_timer' % idle_timer])\n\nactual_timer = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/idle_timer']).strip()\nif actual_timer != idle_timer:\n raise Exception('idle_timer (actual, expected) (%s, %s)'\n % (actual_timer, idle_timer))\n\nfor s in ['force_bus_on', 'force_rail_on', 'force_clk_on']:\n subprocess.check_output([ADB, 'shell', 'echo \"1\" > '\n '/sys/class/kgsl/kgsl-3d0/%s' % s])\n actual_set = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/%s' % s]).strip()\n if actual_set != \"1\":\n raise Exception('%s (actual, expected) (%s, 1)'\n % (s, actual_set))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nfreq = sys.argv[2]\nidle_timer = \"10000\"\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'stop', 'thermald'])\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/class/kgsl/kgsl-3d0/gpuclk' % freq])\n\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/gpuclk']).strip()\nif actual_freq != freq:\n raise Exception('Frequency (actual, expected) (%s, %s)'\n % (actual_freq, freq))\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/class/kgsl/kgsl-3d0/idle_timer' % idle_timer])\n\nactual_timer = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/idle_timer']).strip()\nif actual_timer != idle_timer:\n raise Exception('idle_timer (actual, expected) (%s, %s)'\n % (actual_timer, idle_timer))\n\nfor s in ['force_bus_on', 'force_rail_on', 'force_clk_on']:\n subprocess.check_output([ADB, 'shell', 'echo \"1\" > '\n '/sys/class/kgsl/kgsl-3d0/%s' % s])\n actual_set = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/%s' % s]).strip()\n if actual_set != \"1\":\n raise Exception('%s (actual, expected) (%s, 1)'\n % (s, actual_set))\n", "/opt/infra-android/tools/adb", "600000000" ], @@ -1001,14 +1001,9 @@ "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'stop', 'thermald'])@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"performance\" > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/class/kgsl/kgsl-3d0/devfreq/governor'])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@", "@@@STEP_LOG_LINE@python.inline@ '/sys/class/kgsl/kgsl-3d0/gpuclk' % freq])@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@time.sleep(1)@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@actual_freq = subprocess.check_output([ADB, 'shell', 'cat '@@@", "@@@STEP_LOG_LINE@python.inline@ '/sys/class/kgsl/kgsl-3d0/gpuclk']).strip()@@@", "@@@STEP_LOG_LINE@python.inline@if actual_freq != freq:@@@", diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json index c58af203db..4fd500c396 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json @@ -864,75 +864,6 @@ }, { "cmd": [ - "python", - "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nfreq = sys.argv[2]\nidle_timer = \"10000\"\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'stop', 'thermald'])\n\nsubprocess.check_output([ADB, 'shell', 'echo \"performance\" > '\n '/sys/class/kgsl/kgsl-3d0/devfreq/governor'])\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/class/kgsl/kgsl-3d0/gpuclk' % freq])\n\ntime.sleep(1)\n\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/gpuclk']).strip()\nif actual_freq != freq:\n raise Exception('Frequency (actual, expected) (%s, %s)'\n % (actual_freq, freq))\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/class/kgsl/kgsl-3d0/idle_timer' % idle_timer])\n\nactual_timer = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/idle_timer']).strip()\nif actual_timer != idle_timer:\n raise Exception('idle_timer (actual, expected) (%s, %s)'\n % (actual_timer, idle_timer))\n\nfor s in ['force_bus_on', 'force_rail_on', 'force_clk_on']:\n subprocess.check_output([ADB, 'shell', 'echo \"1\" > '\n '/sys/class/kgsl/kgsl-3d0/%s' % s])\n actual_set = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/%s' % s]).strip()\n if actual_set != \"1\":\n raise Exception('%s (actual, expected) (%s, 1)'\n % (s, actual_set))\n", - "/usr/bin/adb.1.0.35", - "624000000" - ], - "env": { - "BUILDTYPE": "Debug", - "CHROME_HEADLESS": "1", - "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]", - "SKIA_OUT": "[START_DIR]/out" - }, - "infra_step": true, - "name": "Lock GPU to 624000000 (and other perf tweaks)", - "timeout": 30, - "~followup_annotations": [ - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@import os@@@", - "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", - "@@@STEP_LOG_LINE@python.inline@import sys@@@", - "@@@STEP_LOG_LINE@python.inline@import time@@@", - "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", - "@@@STEP_LOG_LINE@python.inline@freq = sys.argv[2]@@@", - "@@@STEP_LOG_LINE@python.inline@idle_timer = \"10000\"@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", - "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", - "@@@STEP_LOG_LINE@python.inline@print log@@@", - "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'stop', 'thermald'])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"performance\" > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/class/kgsl/kgsl-3d0/devfreq/governor'])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/class/kgsl/kgsl-3d0/gpuclk' % freq])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@time.sleep(1)@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@actual_freq = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/class/kgsl/kgsl-3d0/gpuclk']).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_freq != freq:@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('Frequency (actual, expected) (%s, %s)'@@@", - "@@@STEP_LOG_LINE@python.inline@ % (actual_freq, freq))@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/class/kgsl/kgsl-3d0/idle_timer' % idle_timer])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@actual_timer = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/class/kgsl/kgsl-3d0/idle_timer']).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@if actual_timer != idle_timer:@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('idle_timer (actual, expected) (%s, %s)'@@@", - "@@@STEP_LOG_LINE@python.inline@ % (actual_timer, idle_timer))@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@for s in ['force_bus_on', 'force_rail_on', 'force_clk_on']:@@@", - "@@@STEP_LOG_LINE@python.inline@ subprocess.check_output([ADB, 'shell', 'echo \"1\" > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/class/kgsl/kgsl-3d0/%s' % s])@@@", - "@@@STEP_LOG_LINE@python.inline@ actual_set = subprocess.check_output([ADB, 'shell', 'cat '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/class/kgsl/kgsl-3d0/%s' % s]).strip()@@@", - "@@@STEP_LOG_LINE@python.inline@ if actual_set != \"1\":@@@", - "@@@STEP_LOG_LINE@python.inline@ raise Exception('%s (actual, expected) (%s, 1)'@@@", - "@@@STEP_LOG_LINE@python.inline@ % (s, actual_set))@@@", - "@@@STEP_LOG_END@python.inline@@@" - ] - }, - { - "cmd": [ "/usr/bin/adb.1.0.35", "push", "[START_DIR]/out/Debug/nanobench", diff --git a/infra/bots/recipe_modules/flavor/gn_android_flavor.py b/infra/bots/recipe_modules/flavor/gn_android_flavor.py index 2809bf3478..ea864ff55f 100644 --- a/infra/bots/recipe_modules/flavor/gn_android_flavor.py +++ b/infra/bots/recipe_modules/flavor/gn_android_flavor.py @@ -63,10 +63,8 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils): } self.gpu_scaling = { - "Nexus5": 450000000, - "Nexus5x": 600000000, - "Pixel": 624000000, - "Pixel2XL": 710000000, + "Nexus5": 450000000, + "Nexus5x": 600000000, } def _run(self, title, *cmd, **kwargs): @@ -149,10 +147,8 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils): if device in self.gpu_scaling: #https://developer.qualcomm.com/qfile/28823/lm80-p0436-11_adb_commands.pdf # Section 3.2.1 Commands to put the GPU in performance mode - # Nexus 5 is 320000000 by default + # Nexus 5 is 320000000 by default # Nexus 5x is 180000000 by default - # Pixel is 214000000 by default - # Pixel2XL is 257000000 by default gpu_freq = self.gpu_scaling[device] self.m.run.with_retry(self.m.python.inline, "Lock GPU to %d (and other perf tweaks)" % gpu_freq, @@ -174,14 +170,9 @@ if 'cannot' in log: subprocess.check_output([ADB, 'shell', 'stop', 'thermald']) -subprocess.check_output([ADB, 'shell', 'echo "performance" > ' - '/sys/class/kgsl/kgsl-3d0/devfreq/governor']) - subprocess.check_output([ADB, 'shell', 'echo "%s" > ' '/sys/class/kgsl/kgsl-3d0/gpuclk' % freq]) -time.sleep(1) - actual_freq = subprocess.check_output([ADB, 'shell', 'cat ' '/sys/class/kgsl/kgsl-3d0/gpuclk']).strip() if actual_freq != freq: diff --git a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-All-Android.json b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-All-Android.json index e6d75107e0..61cae08e4d 100644 --- a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-All-Android.json +++ b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-All-Android.json @@ -660,7 +660,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nfreq = sys.argv[2]\nidle_timer = \"10000\"\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'stop', 'thermald'])\n\nsubprocess.check_output([ADB, 'shell', 'echo \"performance\" > '\n '/sys/class/kgsl/kgsl-3d0/devfreq/governor'])\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/class/kgsl/kgsl-3d0/gpuclk' % freq])\n\ntime.sleep(1)\n\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/gpuclk']).strip()\nif actual_freq != freq:\n raise Exception('Frequency (actual, expected) (%s, %s)'\n % (actual_freq, freq))\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/class/kgsl/kgsl-3d0/idle_timer' % idle_timer])\n\nactual_timer = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/idle_timer']).strip()\nif actual_timer != idle_timer:\n raise Exception('idle_timer (actual, expected) (%s, %s)'\n % (actual_timer, idle_timer))\n\nfor s in ['force_bus_on', 'force_rail_on', 'force_clk_on']:\n subprocess.check_output([ADB, 'shell', 'echo \"1\" > '\n '/sys/class/kgsl/kgsl-3d0/%s' % s])\n actual_set = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/%s' % s]).strip()\n if actual_set != \"1\":\n raise Exception('%s (actual, expected) (%s, 1)'\n % (s, actual_set))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nfreq = sys.argv[2]\nidle_timer = \"10000\"\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'stop', 'thermald'])\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/class/kgsl/kgsl-3d0/gpuclk' % freq])\n\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/gpuclk']).strip()\nif actual_freq != freq:\n raise Exception('Frequency (actual, expected) (%s, %s)'\n % (actual_freq, freq))\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/class/kgsl/kgsl-3d0/idle_timer' % idle_timer])\n\nactual_timer = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/idle_timer']).strip()\nif actual_timer != idle_timer:\n raise Exception('idle_timer (actual, expected) (%s, %s)'\n % (actual_timer, idle_timer))\n\nfor s in ['force_bus_on', 'force_rail_on', 'force_clk_on']:\n subprocess.check_output([ADB, 'shell', 'echo \"1\" > '\n '/sys/class/kgsl/kgsl-3d0/%s' % s])\n actual_set = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/%s' % s]).strip()\n if actual_set != \"1\":\n raise Exception('%s (actual, expected) (%s, 1)'\n % (s, actual_set))\n", "/usr/bin/adb.1.0.35", "450000000" ], @@ -691,14 +691,9 @@ "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'stop', 'thermald'])@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"performance\" > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/class/kgsl/kgsl-3d0/devfreq/governor'])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@", "@@@STEP_LOG_LINE@python.inline@ '/sys/class/kgsl/kgsl-3d0/gpuclk' % freq])@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@time.sleep(1)@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@actual_freq = subprocess.check_output([ADB, 'shell', 'cat '@@@", "@@@STEP_LOG_LINE@python.inline@ '/sys/class/kgsl/kgsl-3d0/gpuclk']).strip()@@@", "@@@STEP_LOG_LINE@python.inline@if actual_freq != freq:@@@", diff --git a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Release-All-Android.json b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Release-All-Android.json index 852471df80..20ec4a0a53 100644 --- a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Release-All-Android.json +++ b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Release-All-Android.json @@ -904,7 +904,7 @@ "cmd": [ "python", "-u", - "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nfreq = sys.argv[2]\nidle_timer = \"10000\"\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'stop', 'thermald'])\n\nsubprocess.check_output([ADB, 'shell', 'echo \"performance\" > '\n '/sys/class/kgsl/kgsl-3d0/devfreq/governor'])\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/class/kgsl/kgsl-3d0/gpuclk' % freq])\n\ntime.sleep(1)\n\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/gpuclk']).strip()\nif actual_freq != freq:\n raise Exception('Frequency (actual, expected) (%s, %s)'\n % (actual_freq, freq))\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/class/kgsl/kgsl-3d0/idle_timer' % idle_timer])\n\nactual_timer = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/idle_timer']).strip()\nif actual_timer != idle_timer:\n raise Exception('idle_timer (actual, expected) (%s, %s)'\n % (actual_timer, idle_timer))\n\nfor s in ['force_bus_on', 'force_rail_on', 'force_clk_on']:\n subprocess.check_output([ADB, 'shell', 'echo \"1\" > '\n '/sys/class/kgsl/kgsl-3d0/%s' % s])\n actual_set = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/%s' % s]).strip()\n if actual_set != \"1\":\n raise Exception('%s (actual, expected) (%s, 1)'\n % (s, actual_set))\n", + "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nfreq = sys.argv[2]\nidle_timer = \"10000\"\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'stop', 'thermald'])\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/class/kgsl/kgsl-3d0/gpuclk' % freq])\n\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/gpuclk']).strip()\nif actual_freq != freq:\n raise Exception('Frequency (actual, expected) (%s, %s)'\n % (actual_freq, freq))\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/class/kgsl/kgsl-3d0/idle_timer' % idle_timer])\n\nactual_timer = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/idle_timer']).strip()\nif actual_timer != idle_timer:\n raise Exception('idle_timer (actual, expected) (%s, %s)'\n % (actual_timer, idle_timer))\n\nfor s in ['force_bus_on', 'force_rail_on', 'force_clk_on']:\n subprocess.check_output([ADB, 'shell', 'echo \"1\" > '\n '/sys/class/kgsl/kgsl-3d0/%s' % s])\n actual_set = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/class/kgsl/kgsl-3d0/%s' % s]).strip()\n if actual_set != \"1\":\n raise Exception('%s (actual, expected) (%s, 1)'\n % (s, actual_set))\n", "/opt/infra-android/tools/adb", "600000000" ], @@ -935,14 +935,9 @@ "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'stop', 'thermald'])@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"performance\" > '@@@", - "@@@STEP_LOG_LINE@python.inline@ '/sys/class/kgsl/kgsl-3d0/devfreq/governor'])@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@", "@@@STEP_LOG_LINE@python.inline@ '/sys/class/kgsl/kgsl-3d0/gpuclk' % freq])@@@", "@@@STEP_LOG_LINE@python.inline@@@@", - "@@@STEP_LOG_LINE@python.inline@time.sleep(1)@@@", - "@@@STEP_LOG_LINE@python.inline@@@@", "@@@STEP_LOG_LINE@python.inline@actual_freq = subprocess.check_output([ADB, 'shell', 'cat '@@@", "@@@STEP_LOG_LINE@python.inline@ '/sys/class/kgsl/kgsl-3d0/gpuclk']).strip()@@@", "@@@STEP_LOG_LINE@python.inline@if actual_freq != freq:@@@", |