EAS Profiling Environment On Hikey960


This page is used to sharing some experience for EAS profiling environment on Hikey960. So far the profiling environment is only on AOSP Android, later need extend for supporting mainline kernel.

As the start, this page firstly is to demonstrate the workload-automation enabling on Hikey960; there have several reasons we need create a reliable profiling/testing environment:

  • The EAS testing is very time-consumed task, usually we need run multiple testing cases for different scenarios, like power saving scenarios, performance scenarios, and interactive scenarios; and it needs to run several iterations (e.g. 5 times) to check if the result has big jumping or not; so we need use automatic testing suits to help finish this;
  • The EAS testing has many comparison between different kernel images or different configurations (e.g. schedTune related setting); so that means the testing cases need run with different kernel images and get comparison result with them.
  • The power testing data is heavily impacted by thermal, so it's important to have a consistent starting point when launch the test with the same SoC temperature;
  • The results have metrics for power data, performance data, so it's hard to digest the result; so it's good to use diagram to demonstrate difference for results.

Prepare hardware

hikey960_hw.jpg: Summary for prerequisites:




External Links



Use relay to power on/off board and fan; we can use "adb reboot" or "fastboot reboot" to reboot the board, but it's not reliable as using relay

Please refer Daniel Thompson's usb relay project to control relays from STM32-based micro controller, we can send command from ttyACM device node: https://github.com/daniel-thompson/usb-relay



Use fan to cool down the board to 40'C before every time the test case start to run

https://www.amazon.com/dp/B0119H3TRS?psc=1: I used one is similar with this but not same one


ARM energy probe

Use ARM energy probe to measure power data

https://git.linaro.org/tools/arm-probe.git: integrate arm-energy-probe command line for power data capturing

Workload-automation enhancement on Hikey960

The workload-automation: https://github.com/Leo-Yan/workload-automation/tree/hikey960_v1, there still has offline patches applied on the repo, the mainly changes are related with Hikey960 specific Android device manipulations, ARM energy probe, the result comparison processor.





Burn kernel images

Build specified booting images before testing


Cool down device

Read thermal sensor from kernel, cool down SoC temperature under specific value, e.g. 40'C


Set specific configurations

Set specific configurations for CPUFreq/GPU Devfreq/DDR Devfreq


Run workloads

Workloads: power optimization: idle state, audio, video, camera; sustainable performance optimization: hackbench; ui benchmark: todo;


Generate result

Every test case has separate result in the sub folders and we can gather the temperature data for the whole running for one case, so far has no analysis to connect the temperature data with power data; after all test cases have finished, it outputs summary results into results.csv file


Result Comparison

Use the first one kernel image's result as baseline result, and use other kernel images result to compare with it; so finally we can get to know the sequential kernel images difference with baseline kernel result; use this way we can easily to get to know the optimization difference with original kernel

Workload agenda

   1 config:
   2   instrumentation: [energy_probe_ext, delay, file_poller, ~fps, ~trace-cmd]
   3   energy_probe_ext:
   4     config: '/home/leoy/Work/tools/wa_hikey960/hikey960_aep_config'
   5   delay:
   6     temperature_between_iterations: 40000
   7     active_cooling: True
   8   file_poller:
   9     files: ['/sys/class/thermal/thermal_zone0/temp']
  10     as_root: True
  11   result_processors:
  12     - json
  13     - summary_csv
  14     - comparison
  16 global:
  17   iterations: 5
  18   runtime_params:
  19     sysfile_values:
  20       /sys/class/devfreq/e82c0000.mali/governor: userspace
  21       /sys/class/devfreq/e82c0000.mali/userspace/set_freq: 533000000
  22       /sys/class/thermal/thermal_zone0/sustainable_power: 99999999
  23       /proc/sys/kernel/sched_use_walt_cpu_util: 0
  24       /proc/sys/kernel/sched_use_walt_task_util: 0
  26 sections:
  27   - id: my_kernel_version_1
  28     flash:
  29       images:
  30         boot: /tmp/boot1.img
  32   - id: my_kernel_version_2
  33     flash:
  34       images:
  35         boot: /tmp/boot2.img
  37 workloads:
  38   - name: idle
  39     params:
  40       duration: 5
  41   - name: audio
  42     params:
  43       duration: 10
  44   - name: video
  45     params:
  46       play_duration: 10
  47       resolution: 1080p
  48   - name: hackbench
  49   - name: galleryfling
  50   - name: browserfling
  51   - name: recentfling
  52   - name: emailfling

Comparison result

The enclosed pictures are the examples for comparison result:





WorkingGroups/PowerManagement/Resources/EAS-Profiling-Enviornment-On-Hikey960 (last modified 2017-07-05 08:25:38)