diff options
author | Naresh Kamboju <naresh.kamboju@linaro.org> | 2016-03-18 07:31:25 +0000 |
---|---|---|
committer | Linaro Code Review <review@review.linaro.org> | 2016-03-18 07:31:25 +0000 |
commit | b4b1bd56c13b04048344659e437b311001b5efbc (patch) | |
tree | 63e5cdebfa2d47be97844fdf9785723ee4d8f7b9 /android | |
parent | 620e802c748de13cec3e5352b38bb3116f92879d (diff) | |
parent | 457378c37fef6fe33d4a4f8ddb8239bf5ce2c0be (diff) |
Merge "microbenchmarks add mode support for nexus5x"
Diffstat (limited to 'android')
-rw-r--r-- | android/art-microbenchmarks.yaml | 3 | ||||
-rwxr-xr-x | android/scripts/configure-nexus5x-for-benchmarks.sh | 54 |
2 files changed, 56 insertions, 1 deletions
diff --git a/android/art-microbenchmarks.yaml b/android/art-microbenchmarks.yaml index 8cca595..78418de 100644 --- a/android/art-microbenchmarks.yaml +++ b/android/art-microbenchmarks.yaml @@ -25,6 +25,7 @@ params: TARGET_DEVICE: "nexus9" ITERATIONS: 10 MODE: 64 + CORE: "default" run: steps: @@ -34,7 +35,7 @@ run: - then - if [ -f ./android/scripts/configure-$TARGET_DEVICE-for-benchmarks.sh ] - then - - . ./android/scripts/configure-$TARGET_DEVICE-for-benchmarks.sh || true + - . ./android/scripts/configure-$TARGET_DEVICE-for-benchmarks.sh $CORE || true - fi - ./art-testing/run.py -t $IPADDR --iterations $ITERATIONS --mode $MODE --output-pkl $PWD/art-microbenchmarks.pkl --output-json $PWD/art-microbenchmarks.json | tee logs.txt - . ./android/scripts/parse-ubenchmarks-results.sh logs.txt diff --git a/android/scripts/configure-nexus5x-for-benchmarks.sh b/android/scripts/configure-nexus5x-for-benchmarks.sh index 2a86bda..d0cae4b 100755 --- a/android/scripts/configure-nexus5x-for-benchmarks.sh +++ b/android/scripts/configure-nexus5x-for-benchmarks.sh @@ -1,5 +1,59 @@ #!/bin/bash +CPU_PATH="/sys/devices/system/cpu/cpu" + +set_online() { + local dirpath=$CPU_PATH$1/online + adb -s $IPADDR shell "echo 1 > $dirpath" +} + +set_offline() { + local dirpath=$CPU_PATH$1/online + adb -s $IPADDR shell "echo 0 > $dirpath" +} + + +all_small() { + set_online 0; set_online 1; set_online 2; set_online 3; + set_offline 4; set_offline 5; +} + +all_big() { + set_online 4; set_online 5; + set_offline 0; set_offline 1; set_offline 2; set_offline 3; +} + +all_online() { + set_online 0; set_online 1; set_online 2; + set_online 3; set_online 4; set_online 5; +} + +show_cpu() { + adb -s $IPADDR shell "cat /sys/devices/system/cpu/cpu*/online" +} + + +parse() { + case $1 in + small) + all_small + ;; + big) + all_big + ;; + default) + ;; + esac +} + set -x echo "configuring Nexus5X on: $IPADDR" adb -s $IPADDR wait-for-device +adb -s $IPADDR root +adb -s $IPADDR wait-for-device adb -s $IPADDR shell stop +for n in {0..5}; do + adb -s $IPADDR shell "echo userspace > /sys/devices/system/cpu/cpu$n/cpufreq/scaling_governor" + adb -s $IPADDR shell "echo 1000000 > /sys/devices/system/cpu/cpu$n/cpufreq/scaling_min_freq" + adb -s $IPADDR shell "echo 1000000 > /sys/devices/system/cpu/cpu$n/cpufreq/scaling_max_freq" +done +parse "$@" |