aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Kotsiuba <artem.kotsiuba@linaro.org>2021-08-17 10:54:44 +0100
committerArtem Kotsiuba <artem.kotsiuba@linaro.org>2021-09-30 11:50:45 +0100
commit6c10ff22fc1a2461a5c8554780a64d108defa455 (patch)
treeea6ec1ea9aab6730196da892c68437d09896f40e
parent6c186d961882448fe0cda42476e4619323b88274 (diff)
downloadart-testing-6c10ff22fc1a2461a5c8554780a64d108defa455.tar.gz
ART: Modify build.sh in order to make it compatible with DaCapo benchmarks
This change makes it possible to run DaCapo benchmarks as part of our benchmarking framework. It consists of three parts: 1. Making it possible to allocate more memory for dx tool by with _JAVA_OPTIONS environment variable. 2. Using --min-sdk-version=26 to fix compilation errors of DaCapo benchmarks. 3. Using --multi-dex to avoid 64K limit on number of method references Test: ./scripts/benchmarks/benchmarks_run_target.sh AvroraBench --iterations 2 --mode 64 --skip-build ./benchmarks/test/test.py Change-Id: Id4ed090fe59016430a159babe2f0c3a469562c7b
-rwxr-xr-xbuild.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index 3037a09..95bc6f9 100755
--- a/build.sh
+++ b/build.sh
@@ -229,7 +229,11 @@ if [ $TARGET_BUILD = "true" ] || [ -n "$DX" ]; then
$CROSS_COMPILE_FLAGS \
"${javac_cmd_options[@]}"
if hash dx 2> /dev/null; then
- verbose_safe dx --dex --output $DIR_BUILD/bench.apk $DIR_BUILD/classes/
+ # Use custom Java options to compile benchmarks that require more memory.
+ export _JAVA_OPTIONS="-Xms512m -Xmx2048m -XX:MaxPermSize=512m"
+ # Use --multi-dex option to avoid hitting 64k limit on number of method references.
+ # Use --min-sdk-version=26 to compile all supported benchmarks.
+ verbose_safe dx --multi-dex --min-sdk-version=26 --dex --output $DIR_BUILD/bench.apk $DIR_BUILD/classes/
else
warning "\`dx\` command not found. bench.apk won't be generated." \
"Are you running from an Android environment?"