summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jiakai Zhang <jiakaiz@google.com> 2025-03-24 14:03:09 +0000
committer Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2025-03-24 09:09:35 -0700
commitf675a98ccbc261c73ab9f12044541aca617f3b57 (patch)
treee7a745055fb0f4427b63f0c2845dc27533cc5c96
parentabf032d28d6ee925386379369403b364fbcb0d34 (diff)
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
-rwxr-xr-xtools/art9
1 files 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