aboutsummaryrefslogtreecommitdiff
path: root/devices/config/bullhead.sh
diff options
context:
space:
mode:
authorChris Jones <christopher.jones@linaro.org>2022-02-10 15:13:01 +0000
committerChris Jones <christopher.jones@linaro.org>2022-03-24 19:27:37 +0000
commitcba52c6e6b01b912cc20c3efc474798aec823296 (patch)
tree18e46c70f8c66547890b8f5f957663c44d514c2d /devices/config/bullhead.sh
parenta642ec1b360497acb591cb1416fb164d9bba2138 (diff)
downloadart-build-scripts-cba52c6e6b01b912cc20c3efc474798aec823296.tar.gz
Support new CPU structure format for benchmarks
Change benchmark device config files to use a new generalised CPU structure. The new structure uses a "2d" associative array to define the CPU ID's, grouped into separate clusters, and associates them with a frequency. To support these changes to config files, changes have also been made to the benchmarking, and supporting utility scripts. This includes allowing a cluster name to be given as an argument to each script to replace the old "--cpu <big/little>" and "--<big/little>" options. The new cluster name is checked against the device config at run time. Test: ./scripts/benchmarks/benchmarks_run_target.sh --cpu little \ --iterations 2 benchmarks/algorithm/DeltaBlue Test: ./scripts/benchmarks/perf_profile_benchmarks_target.sh \ --cpu big benchmarks/algorithm/DeltaBlue Test: ./scripts/benchmarks/compilation_stats_target.sh --cpu middle \ ./external-benchmarks/apks/DuckDuckGo/duckduckgo-5.97.0-play-release.apk \ boot.oat --iterations 2 Change-Id: Id8456f03bed7b35ea8fabfff96add78184ce74cf
Diffstat (limited to 'devices/config/bullhead.sh')
-rw-r--r--devices/config/bullhead.sh35
1 files changed, 23 insertions, 12 deletions
diff --git a/devices/config/bullhead.sh b/devices/config/bullhead.sh
index 6bbccd1e..899d00a0 100644
--- a/devices/config/bullhead.sh
+++ b/devices/config/bullhead.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# shellcheck disable=SC2034
#
-# Copyright (c) 2016-2017, Linaro Ltd.
+# Copyright (c) 2016-2022, Linaro Ltd.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,14 +18,25 @@
# Helper script used for setting the Nexus 5X frequency.
-DEVICE_NAME="Nexus 5X"
-
-NUMBER_OF_CPUS=6
-DEVICE_IS_BIG_LITTLE=true
-LITTLE_CPUS=(0 1 2 3)
-BIG_CPUS=(4 5)
-CPUS=(0 1 2 3 4 5)
-TARGET_FREQ=1248000
-LITTLE_CPUS_NAME=a53
-BIG_CPUS_NAME=a57
-DEFAULT_GOVERNOR=interactive
+readonly DEVICE_NAME="Nexus 5X"
+
+readonly NUMBER_OF_CPUS=6
+
+# Define CPU names.
+readonly BIG_CPUS_NAME="a57"
+readonly LITTLE_CPUS_NAME="a53"
+
+# Define CPU frequencies.
+readonly CPUS_FREQ=1248000
+
+# Define CPU ID's and embed the name and frequency.
+readonly BIG_CPUS=(${BIG_CPUS_NAME} ${CPUS_FREQ} 4 5)
+readonly LITTLE_CPUS=(${LITTLE_CPUS_NAME} ${CPUS_FREQ} 0 1 2 3)
+
+# Bash does not support 2d arrays so instead store the name of the array and
+# later dereference by using "!" e.g: "arr=(${!CPUS[big]})".
+declare -A -g CPUS
+CPUS[big]="BIG_CPUS[@]"
+CPUS[little]="LITTLE_CPUS[@]"
+
+readonly DEFAULT_GOVERNOR=interactive