Add convenience targets for switching between full, smart, interpret-only
Change-Id: Ic0e016404d79fd0e40519f33210b332414adc8bf
diff --git a/Android.mk b/Android.mk
index 92f5c70..a179a97 100644
--- a/Android.mk
+++ b/Android.mk
@@ -368,20 +368,59 @@
.PHONY: use-art
use-art:
adb root && sleep 3
+ adb shell stop
adb shell setprop persist.sys.dalvik.vm.lib.1 libart.so
- adb reboot
+ adb shell start
.PHONY: use-artd
use-artd:
adb root && sleep 3
+ adb shell stop
adb shell setprop persist.sys.dalvik.vm.lib.1 libartd.so
- adb reboot
+ adb shell start
.PHONY: use-dalvik
use-dalvik:
adb root && sleep 3
+ adb shell stop
adb shell setprop persist.sys.dalvik.vm.lib.1 libdvm.so
- adb reboot
+ adb shell start
+
+.PHONY: use-art-full
+use-art-full:
+ adb root && sleep 3
+ adb shell stop
+ adb shell rm $(ART_DALVIK_CACHE_DIR)/*.dex
+ adb shell rm $(ART_DALVIK_CACHE_DIR)/*.oat
+ adb shell rm $(ART_DALVIK_CACHE_DIR)/*.art
+ adb shell setprop dalvik.vm.dex2oat-flags ""
+ adb shell setprop dalvik.vm.image-dex2oat-flags ""
+ adb shell setprop persist.sys.dalvik.vm.lib.1 libart.so
+ adb shell start
+
+.PHONY: use-art-smart
+use-art-smart:
+ adb root && sleep 3
+ adb shell stop
+ adb shell rm $(ART_DALVIK_CACHE_DIR)/*.dex
+ adb shell rm $(ART_DALVIK_CACHE_DIR)/*.oat
+ adb shell rm $(ART_DALVIK_CACHE_DIR)/*.art
+ adb shell setprop dalvik.vm.dex2oat-flags "--compiler-filter=interpret-only"
+ adb shell setprop dalvik.vm.image-dex2oat-flags ""
+ adb shell setprop persist.sys.dalvik.vm.lib.1 libart.so
+ adb shell start
+
+.PHONY: use-art-interpret-only
+use-art-interpret-only:
+ adb root && sleep 3
+ adb shell stop
+ adb shell rm $(ART_DALVIK_CACHE_DIR)/*.dex
+ adb shell rm $(ART_DALVIK_CACHE_DIR)/*.oat
+ adb shell rm $(ART_DALVIK_CACHE_DIR)/*.art
+ adb shell setprop dalvik.vm.dex2oat-flags "--compiler-filter=interpret-only"
+ adb shell setprop dalvik.vm.image-dex2oat-flags "--compiler-filter=interpret-only"
+ adb shell setprop persist.sys.dalvik.vm.lib.1 libart.so
+ adb shell start
########################################################################