From f675a98ccbc261c73ab9f12044541aca617f3b57 Mon Sep 17 00:00:00 2001 From: Jiakai Zhang Date: Mon, 24 Mar 2025 14:03:09 +0000 Subject: Fix `art` script for Golem. https://r.android.com/3473928 (originally https://r.android.com/2643659) changed `art` script to generate oat files in `dalvik-cache`. On Golem, the dex file paths are relative, so the script couldn't compute the right `dalvik-cache` path for them. This CL fixes this issue. Also, this CL deletes obsolete calls to a function that no longer exists. Bug: 400394885 Test: Golem Change-Id: I1137d2692c4f28134bb85536b6a7861e8ef0467d --- tools/art | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tools/art b/tools/art index a4ae3d57e5..f25ac49492 100755 --- a/tools/art +++ b/tools/art @@ -170,7 +170,8 @@ function run_dex2oat() { done # Create oat file directory. verbose_run mkdir -p $(dirname "$dex_file")/oat/$ISA - local oat_file="${dex_file:1}" + local oat_file="$(realpath $dex_file)" + local oat_file="${oat_file:1}" local oat_file="${oat_file//\//@}" if [[ $dex_file != *.dex ]]; then local oat_file=$ANDROID_DATA/dalvik-cache/$ISA/${oat_file}@classes.dex @@ -628,9 +629,6 @@ if [ "$JIT_PROFILE" = "yes" ]; then &> "$ANDROID_DATA/profile_gen.log" EXIT_STATUS=$? - # Remove generated oat files. - cleanup_oat_directory_for_classpath "$@" - if [ $EXIT_STATUS != 0 ]; then echo "Profile run failed: " >&2 cat "$ANDROID_DATA/profile_gen.log" >&2 @@ -673,9 +671,6 @@ if [ "$PERF" != "" ]; then echo "Perf data saved in: $ANDROID_DATA/perf.data. Generated oat files not removed." fi else - # Perf needs the odex files we generate for proper symbolization, so only remove them - # when not running with perf. - cleanup_oat_directory_for_classpath "$@" # Perf output is placed under $ANDROID_DATA so not cleaned when perf options used. clean_android_data fi -- cgit v1.2.3-59-g8ed1b