Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
tools.skpbench._hardware_nexus_6p.HardwareNexus6P Class Reference
Inheritance diagram for tools.skpbench._hardware_nexus_6p.HardwareNexus6P:
tools.skpbench._hardware_android.HardwareAndroid tools.skpbench._hardware.Hardware

Public Member Functions

def __init__ (self, adb)
 
def __enter__ (self)
 
def sanity_check (self)
 
- Public Member Functions inherited from tools.skpbench._hardware_android.HardwareAndroid
def __init__ (self, adb)
 
def __enter__ (self)
 
def __exit__ (self, exception_type, exception_value, traceback)
 
def sanity_check (self)
 
def print_debug_diagnostics (self)
 
def setDesiredClock (self, c)
 
def lock_top_three_cores (self)
 
def lock_adreno_gpu (self)
 
- Public Member Functions inherited from tools.skpbench._hardware.Hardware
def __init__ (self)
 
def __enter__ (self)
 
def __exit__ (self, exception_type, exception_value, traceback)
 
def filter_line (self, line)
 
def sanity_check (self)
 
def print_debug_diagnostics (self)
 

Additional Inherited Members

- Public Attributes inherited from tools.skpbench._hardware_android.HardwareAndroid
 warmup_time
 
 desiredClock
 
- Public Attributes inherited from tools.skpbench._hardware.Hardware
 warmup_time
 

Detailed Description

Definition at line 12 of file _hardware_nexus_6p.py.

Constructor & Destructor Documentation

◆ __init__()

def tools.skpbench._hardware_nexus_6p.HardwareNexus6P.__init__ (   self,
  adb 
)

Reimplemented from tools.skpbench._hardware_android.HardwareAndroid.

Definition at line 13 of file _hardware_nexus_6p.py.

13 def __init__(self, adb):
14 HardwareAndroid.__init__(self, adb)
15

Member Function Documentation

◆ __enter__()

def tools.skpbench._hardware_nexus_6p.HardwareNexus6P.__enter__ (   self)

Reimplemented from tools.skpbench._hardware_android.HardwareAndroid.

Definition at line 16 of file _hardware_nexus_6p.py.

16 def __enter__(self):
17 HardwareAndroid.__enter__(self)
18 if not self._adb.is_root():
19 return self
20
21 # enable and lock 3 of 4 big cores.
22 self._adb.shell('''\
23 for N in 4 5 6; do
24 echo 1 > /sys/devices/system/cpu/cpu$N/online
25 echo userspace > /sys/devices/system/cpu/cpu$N/cpufreq/scaling_governor
26 echo %i > /sys/devices/system/cpu/cpu$N/cpufreq/scaling_max_freq
27 echo %i > /sys/devices/system/cpu/cpu$N/cpufreq/scaling_min_freq
28 echo %i > /sys/devices/system/cpu/cpu$N/cpufreq/scaling_setspeed
29 done''' % tuple(CPU_CLOCK_RATE for _ in range(3)))
30
31 # turn off all other cores
32 self._adb.shell('''\
33 for N in 0 1 2 3 7; do
34 echo 0 > /sys/devices/system/cpu/cpu$N/online
35 done''')
36
37 # gpu/ddr perf commands from
38 # https://developer.qualcomm.com/qfile/28823/lm80-p0436-11_adb_commands.pdf
39 self._adb.shell('''\
40 echo 0 > /sys/class/kgsl/kgsl-3d0/bus_split
41 echo 1 > /sys/class/kgsl/kgsl-3d0/force_bus_on
42 echo 1 > /sys/class/kgsl/kgsl-3d0/force_rail_on
43 echo 1 > /sys/class/kgsl/kgsl-3d0/force_clk_on
44 echo 1000000 > /sys/class/kgsl/kgsl-3d0/idle_timer
45 echo performance > /sys/class/kgsl/kgsl-3d0/devfreq/governor
46 echo %i > /sys/class/kgsl/kgsl-3d0/devfreq/max_freq
47 echo %i > /sys/class/kgsl/kgsl-3d0/devfreq/min_freq
48 echo %i > /sys/class/kgsl/kgsl-3d0/gpuclk''' %
49 tuple(GPU_CLOCK_RATE for _ in range(3)))
50
51 # ddr perf commands from
52 # https://developer.qualcomm.com/qfile/28823/lm80-p0436-11_adb_commands.pdf
53 self._adb.shell('''\
54 echo performance > /sys/class/devfreq/qcom,cpubw.32/governor
55 echo 9887 > /sys/class/devfreq/qcom,cpubw.32/max_freq
56 echo 9887 > /sys/class/devfreq/qcom,cpubw.32/min_freq
57 echo performance > /sys/class/devfreq/qcom,gpubw.70/governor
58 echo 9887 > /sys/class/devfreq/qcom,gpubw.70/max_freq
59 echo 9887 > /sys/class/devfreq/qcom,gpubw.70/min_freq''')
60
61 return self
62

◆ sanity_check()

def tools.skpbench._hardware_nexus_6p.HardwareNexus6P.sanity_check (   self)
Raises a HardwareException if any hardware state is not as expected.

Reimplemented from tools.skpbench._hardware_android.HardwareAndroid.

Definition at line 63 of file _hardware_nexus_6p.py.

63 def sanity_check(self):
64 HardwareAndroid.sanity_check(self)
65
66 if not self._adb.is_root():
67 return
68
69 result = self._adb.check('''\
70 cat /sys/class/power_supply/battery/capacity \
71 /sys/devices/system/cpu/online \
72 /sys/class/thermal/thermal_zone14/temp \
73 /sys/class/thermal/thermal_zone15/temp \
74 /sys/kernel/debug/clk/oxili_gfx3d_clk/measure \
75 /sys/kernel/debug/clk/bimc_clk/measure
76 for N in 4 5 6; do
77 cat /sys/devices/system/cpu/cpu$N/cpufreq/scaling_cur_freq
78 done''')
79
80 expectations = \
81 [Expectation(int, min_value=30, name='battery', sleeptime=30*60),
82 Expectation(str, exact_value='4-6', name='online cpus'),
83 Expectation(int, max_value=88, name='tsens_tz_sensor13'),
84 Expectation(int, max_value=88, name='tsens_tz_sensor14'),
85 Expectation(long, min_value=(GPU_CLOCK_RATE - 5000),
86 max_value=(GPU_CLOCK_RATE + 5000), name='gpu clock rate'),
87 Expectation(long, min_value=647995000, max_value=648007500,
88 name='ddr clock rate', sleeptime=10)] + \
89 [Expectation(int, exact_value=CPU_CLOCK_RATE, name='cpu_%i clock rate' %i)
90 for i in range(4, 7)]
91
92 Expectation.check_all(expectations, result.splitlines())
#define check(reporter, ref, unref, make, kill)
Definition: RefCntTest.cpp:85

The documentation for this class was generated from the following file: