diff options
author | Brian Carlstrom <bdc@google.com> | 2011-09-19 20:20:38 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2011-09-21 10:36:24 -0700 |
commit | 27ec961a1da540ba7f16c07a682585ab167317ad (patch) | |
tree | 0aa6cb8345e394fe0ebe608bc26aa2acbdac1393 /build | |
parent | 03fa263ba90e9f6b11231576c6b9cc434e67141d (diff) | |
download | art-27ec961a1da540ba7f16c07a682585ab167317ad.zip art-27ec961a1da540ba7f16c07a682585ab167317ad.tar.gz art-27ec961a1da540ba7f16c07a682585ab167317ad.tar.bz2 |
Adding oat_process
- Added oat_process, a version of app_process use to launch frameworks apps
- Added liboat_runtime, a version of libandroid_runtime that uses art instead of dvm
This is just a special makefile, frameworks/base/core/jni code is used for source
- Added support for build a boot.oat with the full BOOTCLASSPATH
The older smaller boat.oat is now core.oat
- Added mem_map code for making sure a requested memory region is available
Moved mem_map code to cc file to make easier to debug with smaller rebuild
- Moved oat base address to 0x6000000 as a work around to host addres conflict
- Added -Xms and -Xmx options to dex2oat to allow build specific memory options
- Fixed miranda method initialization problem found compiling full bootclasspath
- Made compiler.cc tolerant of verification errors found compiling full bootclasspath
- Bumped arena block alloc warning to avoid noise when compiling full bootclasspath
- Marked implicit GC unimplemented to fail fast
- Added --output argument to oatdump
- Made many object asserts tolerate access in IsErroneous state
now that verifier is failing validation of some classes during compilation
- Made runtime tolerate unknown access as short term solution for oat_process
- Workaround SSA issue to restore full bootclasspath compilation
- Added test-art-target-processs to excercise oat_process with "am"
"am" found bug where class_linker was using Method::GetClass and not ::GetDeclaringClass
Change-Id: I1a645a142b163e06bab9e72eb094ae1f1dbfbd97
Diffstat (limited to 'build')
-rw-r--r-- | build/Android.common.mk | 1 | ||||
-rw-r--r-- | build/Android.oat.mk | 37 | ||||
-rw-r--r-- | build/Android.oattest.mk | 21 |
3 files changed, 39 insertions, 20 deletions
diff --git a/build/Android.common.mk b/build/Android.common.mk index 6cdd203..a77d5a8 100644 --- a/build/Android.common.mk +++ b/build/Android.common.mk @@ -122,6 +122,7 @@ LIBART_COMMON_SRC_FILES := \ src/mark_sweep.cc \ src/managed_register_arm.cc \ src/managed_register_x86.cc \ + src/mem_map.cc \ src/memory_region.cc \ src/monitor.cc \ src/mspace.c \ diff --git a/build/Android.oat.mk b/build/Android.oat.mk index e027911..2ea132d 100644 --- a/build/Android.oat.mk +++ b/build/Android.oat.mk @@ -25,26 +25,37 @@ OATDUMPD := $(HOST_OUT_EXECUTABLES)/oatdumpd$(HOST_EXECUTABLE_SUFFIX) OATDUMP := $(OATDUMPD) # start of oat reserved address space -OAT_HOST_BASE_ADDRESS := 0x50000000 -OAT_TARGET_BASE_ADDRESS := 0x50000000 +OAT_HOST_BASE_ADDRESS := 0x60000000 +OAT_TARGET_BASE_ADDRESS := 0x60000000 -HOST_BOOT_OAT := $(HOST_OUT_JAVA_LIBRARIES)/boot.oat -TARGET_BOOT_OAT := $(TARGET_OUT_JAVA_LIBRARIES)/boot.oat +######################################################################## +# A smaller libcore only oat file +HOST_CORE_JARS := core-hostdex +TARGET_CORE_JARS := core -# TODO: just use libcore for now, not full bootclasspath. -# eventually need to replace with full list based on DEXPREOPT_BOOT_JARS. -HOST_BOOT_JARS := core-hostdex -TARGET_BOOT_JARS := core +HOST_CORE_DEX := $(foreach jar,$(HOST_CORE_JARS), $(HOST_OUT_JAVA_LIBRARIES)/$(jar).jar) +TARGET_CORE_DEX := $(foreach jar,$(TARGET_CORE_JARS),$(TARGET_OUT_JAVA_LIBRARIES)/$(jar).jar) -HOST_BOOT_DEX := $(foreach jar,$(HOST_BOOT_JARS), $(HOST_OUT_JAVA_LIBRARIES)/$(jar).jar) -TARGET_BOOT_DEX := $(foreach jar,$(TARGET_BOOT_JARS),$(TARGET_OUT_JAVA_LIBRARIES)/$(jar).jar) +HOST_CORE_OAT := $(HOST_OUT_JAVA_LIBRARIES)/core.oat +TARGET_CORE_OAT := $(TARGET_OUT_JAVA_LIBRARIES)/core.oat # TODO: change DEX2OATD to order-only prerequisite when output is stable -$(HOST_BOOT_OAT): $(HOST_BOOT_DEX) $(DEX2OAT) +$(HOST_CORE_OAT): $(HOST_CORE_DEX) $(DEX2OAT) @echo "host dex2oat: $@ ($<)" - $(hide) $(DEX2OAT) $(addprefix --dex-file=,$(filter-out $(DEX2OAT),$^)) --image=$@ --base=$(OAT_HOST_BASE_ADDRESS) + $(hide) $(DEX2OAT) -Xms16m -Xmx16m $(addprefix --dex-file=,$(filter-out $(DEX2OAT),$^)) --image=$@ --base=$(OAT_HOST_BASE_ADDRESS) + +# TODO: change DEX2OATD to order-only prerequisite when output is stable +$(TARGET_CORE_OAT): $(TARGET_CORE_DEX) $(DEX2OAT) + @echo "target dex2oat: $@ ($<)" + $(hide) $(DEX2OAT) -Xms32m -Xmx32m $(addprefix --dex-file=,$(filter-out $(DEX2OAT),$^)) --image=$@ --base=$(OAT_TARGET_BASE_ADDRESS) --strip-prefix=$(PRODUCT_OUT) + +######################################################################## +# The full system boot classpath +TARGET_BOOT_JARS := $(subst :, ,$(DEXPREOPT_BOOT_JARS)) +TARGET_BOOT_DEX := $(foreach jar,$(TARGET_BOOT_JARS),$(TARGET_OUT_JAVA_LIBRARIES)/$(jar).jar) +TARGET_BOOT_OAT := $(TARGET_OUT_JAVA_LIBRARIES)/boot.oat # TODO: change DEX2OATD to order-only prerequisite when output is stable $(TARGET_BOOT_OAT): $(TARGET_BOOT_DEX) $(DEX2OAT) @echo "target dex2oat: $@ ($<)" - $(hide) $(DEX2OAT) $(addprefix --dex-file=,$(filter-out $(DEX2OAT),$^)) --image=$@ --base=$(OAT_TARGET_BASE_ADDRESS) --strip-prefix=$(PRODUCT_OUT) + $(hide) $(DEX2OAT) -Xms256m -Xmx256m $(addprefix --dex-file=,$(filter-out $(DEX2OAT),$^)) --image=$@ --base=$(OAT_TARGET_BASE_ADDRESS) --strip-prefix=$(PRODUCT_OUT) diff --git a/build/Android.oattest.mk b/build/Android.oattest.mk index 0b8cfa9..4605583 100644 --- a/build/Android.oattest.mk +++ b/build/Android.oattest.mk @@ -33,16 +33,23 @@ $(foreach dir,$(TEST_DEX_DIRECTORIES), $(eval $(call build-art-test-dex,$(dir))) ######################################################################## +# $(1): module +# $(2): boot oat +# $(3): boot dex files +define build-art-oat +# TODO: change DEX2OATD to order-only prerequisite when output is stable +$(TARGET_OUT_JAVA_LIBRARIES)/$(1).oat: $(TARGET_OUT_JAVA_LIBRARIES)/$(1).jar $(2) $(DEX2OAT) + @echo "target dex2oat: $$@ ($$<)" + $(hide) $(DEX2OAT) -Xms16m -Xmx16m $(addprefix --boot-dex-file=,$(3)) --boot=$(2) $(addprefix --dex-file=,$$<) --image=$$@ --strip-prefix=$(PRODUCT_OUT) +endef + +######################################################################## ART_TEST_OAT_FILES := # $(1): directory define build-art-test-oat -# TODO: change DEX2OATD to order-only prerequisite when output is stable -$(TARGET_OUT_JAVA_LIBRARIES)/art-test-dex-$(1).oat: $(TARGET_OUT_JAVA_LIBRARIES)/art-test-dex-$(1).jar $(TARGET_BOOT_OAT) $(DEX2OAT) - @echo "target dex2oat: $$@ ($$<)" - $(hide) $(DEX2OAT) $(addprefix --boot-dex-file=,$(TARGET_BOOT_DEX)) --boot=$(TARGET_BOOT_OAT) $(addprefix --dex-file=,$$<) --image=$$@ --strip-prefix=$(PRODUCT_OUT) - -ART_TEST_OAT_FILES += $(TARGET_OUT_JAVA_LIBRARIES)/art-test-dex-$(1).oat + $(call build-art-oat,art-test-dex-$(1),$(TARGET_CORE_OAT),$(TARGET_CORE_DEX)) + ART_TEST_OAT_FILES += $(TARGET_OUT_JAVA_LIBRARIES)/art-test-dex-$(1).oat endef $(foreach dir,$(TEST_DEX_DIRECTORIES), $(eval $(call build-art-test-oat,$(dir)))) @@ -57,7 +64,7 @@ define declare-test-test-target test-art-target-oat-$(1): test-art-target-sync adb shell touch /sdcard/test-art-target-oat-$(1) adb shell rm /sdcard/test-art-target-oat-$(1) - adb shell sh -c "oatexecd -Xbootclasspath:/system/framework/core.jar -Xbootimage:/system/framework/boot.oat -classpath /system/framework/art-test-dex-$(1).jar -Ximage:/system/framework/art-test-dex-$(1).oat $(1) $(2) && touch /sdcard/test-art-target-oat-$(1)" + adb shell sh -c "oatexecd -Xbootclasspath:/system/framework/core.jar -Xbootimage:/system/framework/core.oat -classpath /system/framework/art-test-dex-$(1).jar -Ximage:/system/framework/art-test-dex-$(1).oat $(1) $(2) && touch /sdcard/test-art-target-oat-$(1)" $(hide) (adb pull /sdcard/test-art-target-oat-$(1) /tmp/ && echo test-art-target-oat-$(1) PASSED) || (echo test-art-target-oat-$(1) FAILED && exit 1) $(hide) rm /tmp/test-art-target-oat-$(1) |