diff options
author | Artem Serov <artem.serov@linaro.org> | 2022-02-02 16:09:47 +0000 |
---|---|---|
committer | Linaro Android Code Review <android-review@review.linaro.org> | 2022-02-02 16:09:47 +0000 |
commit | e3411f11d0387a38fd40a31bd00b67dee8a1a4ce (patch) | |
tree | 88b39382b14b70c2b04ac90d3f2ac320d6fc5026 | |
parent | a0d57d8a810aedf1a7ba64f4832d6056a1e490a1 (diff) | |
parent | 1594f04747bb81f5425530b0eb0ba4363bcc5fbc (diff) | |
download | art-build-scripts-e3411f11d0387a38fd40a31bd00b67dee8a1a4ce.tar.gz |
Merge "Adjust the ART bootclasspath handling."
-rwxr-xr-x | benchmarks/benchmarks_run_target.sh | 2 | ||||
-rw-r--r-- | utils/utils_benchmarks.sh | 54 |
2 files changed, 30 insertions, 26 deletions
diff --git a/benchmarks/benchmarks_run_target.sh b/benchmarks/benchmarks_run_target.sh index b5eb24d3..bc3a621a 100755 --- a/benchmarks/benchmarks_run_target.sh +++ b/benchmarks/benchmarks_run_target.sh @@ -320,6 +320,8 @@ main() { continue fi + export_javac_bootclasspath + buildbot_device_prepare "${bits}" run_all_benchmarks "${bits}" if ${options["dump-cfg"]}; then diff --git a/utils/utils_benchmarks.sh b/utils/utils_benchmarks.sh index bd76032c..89592400 100644 --- a/utils/utils_benchmarks.sh +++ b/utils/utils_benchmarks.sh @@ -15,6 +15,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +# This assumes that source utils.sh has been called by the parent script. +source "$(get_art_dir)/test/etc/apex-bootclasspath-utils.sh" + if [[ ! -v JCPU_COUNT ]]; then log E "utils_android.sh must be sourced before utils_benchmarks.sh" abort @@ -47,35 +50,34 @@ build_benchmarks() { # Get the core bootclasspath which can be used to build and to run Java apps on a target. get_target_core_bootclasspath() { - # Get a list of bootjars names. They are space separated. - local -r core_bootjars_names=$("$(get_art_tools_dir)"/bootjars.sh --core --target) - - # Get a space separated list of all bootjars names with names of apex modules they belong to. - # They have the format: <apex module name>:<bootjar name> - local boot_jars_names_with_apex_module=$("$(get_art_tools_dir)"/bootjars.sh --target) - - # Add '.jar' to core bootjars. - # 'boot_jars_names_with_apex_module' will become like - # 'com.android.art:apache-xml.jar platform:framework-minus-apex'. - local name - for name in ${core_bootjars_names}; do - boot_jars_names_with_apex_module="${boot_jars_names_with_apex_module//${name}/${name}.jar}" - done + # Using ART util; HOST="n". + get_apex_bootclasspath "n" +} - local bootclasspath="" - for name in ${boot_jars_names_with_apex_module}; do - if [[ "${name}" == *jar ]]; then - # Convert the name into a file path: /apex/<module>/javalib/<jar>. - name="/apex/${name//://javalib/}" - bootclasspath="${bootclasspath}${name}:" - fi +# Constructs and exports a -bootclasspath argument line for javac invocation; is used +# for building benchmarks in art-testing. +export_javac_bootclasspath() { + # Note: the list of module jar files should be kept up-to-date with ./art setup. + local -r jar_list="core-oj.com.android.art.testing \ + core-libart.com.android.art.testing \ + okhttp.com.android.art.testing \ + bouncycastle.com.android.art.testing \ + apache-xml.com.android.art.testing \ + core-icu4j \ + conscrypt" + local -r jar_prefix="${ANDROID_BUILD_TOP}/out/target/common/obj/JAVA_LIBRARIES/" + local -r jar_suffix="_intermediates/classes.jar" + local bpath="" + local bpath_separator="" + + # Fully qualify module names from jar_list and add separators between them. + for jar_name in ${jar_list}; do + bpath+="${bpath_separator}${jar_prefix}${jar_name}${jar_suffix}" + bpath_separator=":" done - # SPECjvm2008 crypto workloads depend on conscrypt.jar. - # 'conscrypt.jar' is separated from the core boot jars into a separate module. - local -r conscrypt_jar="/apex/com.android.conscrypt/javalib/conscrypt.jar" - - echo "${bootclasspath}${conscrypt_jar}" + log I "Bootclasspath for compiling benchmarks: ${bpath}" + export JAVAC_BOOTCLASSPATH="${bpath}" } # Get target bootclasspath options for dex2oat which are used in ART testing. |