OSDN Git Service

When profiles are requested, also generate then for non-prebuild.
authorNicolas Geoffray <ngeoffray@google.com>
Fri, 10 Mar 2017 09:38:35 +0000 (09:38 +0000)
committerNicolas Geoffray <ngeoffray@google.com>
Fri, 10 Mar 2017 09:44:54 +0000 (09:44 +0000)
Test: test-art-host-run-test-debug-no-prebuild-optimizing-no-relocate-ntrace-cms-checkjni-picimage-npictest-ndebuggable-638-checker-inline-caches
Change-Id: Ib9243d453b723eda894f98a0fd25cea155251003

test/etc/run-test-jar

index de16256..e4e571c 100755 (executable)
@@ -522,6 +522,16 @@ mkdir_locations="${DEX_LOCATION}/dalvik-cache/$ISA"
 strip_cmdline="true"
 sync_cmdline="true"
 
+if [ "$PROFILE" = "y" ]; then
+  profman_cmdline="${ANDROID_ROOT}/bin/profman  \
+    --apk=$DEX_LOCATION/$TEST_NAME.jar \
+    --dex-location=$DEX_LOCATION/$TEST_NAME.jar \
+    --create-profile-from=$DEX_LOCATION/profile \
+    --reference-profile-file=$DEX_LOCATION/$TEST_NAME.prof"
+  COMPILE_FLAGS="${COMPILE_FLAGS} --profile-file=$DEX_LOCATION/$TEST_NAME.prof"
+  FLAGS="${FLAGS} -Xcompiler-option --profile-file=$DEX_LOCATION/$TEST_NAME.prof"
+fi
+
 
 if [ "$PREBUILD" = "y" ]; then
   mkdir_locations="${mkdir_locations} ${DEX_LOCATION}/oat/$ISA"
@@ -541,15 +551,6 @@ if [ "$PREBUILD" = "y" ]; then
     dex2oat_cmdline="${dex2oat_cmdline} --instruction-set-features=${INSTRUCTION_SET_FEATURES}"
   fi
 
-  if [ "$PROFILE" = "y" ]; then
-    profman_cmdline="${ANDROID_ROOT}/bin/profman  \
-      --apk=$DEX_LOCATION/$TEST_NAME.jar \
-      --dex-location=$DEX_LOCATION/$TEST_NAME.jar \
-      --create-profile-from=$DEX_LOCATION/profile \
-      --reference-profile-file=$TEST_NAME.prof"
-    dex2oat_cmdline="${dex2oat_cmdline} --profile-file=$TEST_NAME.prof"
-  fi
-
   # Add in a timeout. This is important for testing the compilation/verification time of
   # pathological cases.
   # Note: as we don't know how decent targets are (e.g., emulator), only do this on the host for