diff options
author | Mathieu Chartier <mathieuc@google.com> | 2015-04-22 13:56:20 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2015-06-02 09:21:27 -0700 |
commit | 3d21bdf8894e780d349c481e5c9e29fe1556051c (patch) | |
tree | 61a5231f36c0dabd73457fec81df103462a05aff /runtime/asm_support.h | |
parent | 71f0a8a123fa27bdc857a98afebbaf0ed09dac15 (diff) | |
download | android_art-3d21bdf8894e780d349c481e5c9e29fe1556051c.tar.gz android_art-3d21bdf8894e780d349c481e5c9e29fe1556051c.tar.bz2 android_art-3d21bdf8894e780d349c481e5c9e29fe1556051c.zip |
Move mirror::ArtMethod to native
Optimizing + quick tests are passing, devices boot.
TODO: Test and fix bugs in mips64.
Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS.
Some of the savings are from removal of virtual methods and direct
methods object arrays.
Bug: 19264997
(cherry picked from commit e401d146407d61eeb99f8d6176b2ac13c4df1e33)
Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d
Fix some ArtMethod related bugs
Added root visiting for runtime methods, not currently required
since the GcRoots in these methods are null.
Added missing GetInterfaceMethodIfProxy in GetMethodLine, fixes
--trace run-tests 005, 044.
Fixed optimizing compiler bug where we used a normal stack location
instead of double on ARM64, this fixes the debuggable tests.
TODO: Fix JDWP tests.
Bug: 19264997
Change-Id: I7c55f69c61d1b45351fd0dc7185ffe5efad82bd3
ART: Fix casts for 64-bit pointers on 32-bit compiler.
Bug: 19264997
Change-Id: Ief45cdd4bae5a43fc8bfdfa7cf744e2c57529457
Fix JDWP tests after ArtMethod change
Fixes Throwable::GetStackDepth for exception event detection after
internal stack trace representation change.
Adds missing ArtMethod::GetInterfaceMethodIfProxy call in case of
proxy method.
Bug: 19264997
Change-Id: I363e293796848c3ec491c963813f62d868da44d2
Fix accidental IMT and root marking regression
Was always using the conflict trampoline. Also included fix for
regression in GC time caused by extra roots. Most of the regression
was IMT.
Fixed bug in DumpGcPerformanceInfo where we would get SIGABRT due to
detached thread.
EvaluateAndApplyChanges:
From ~2500 -> ~1980
GC time: 8.2s -> 7.2s due to 1s less of MarkConcurrentRoots
Bug: 19264997
Change-Id: I4333e80a8268c2ed1284f87f25b9f113d4f2c7e0
Fix bogus image test assert
Previously we were comparing the size of the non moving space to
size of the image file.
Now we properly compare the size of the image space against the size
of the image file.
Bug: 19264997
Change-Id: I7359f1f73ae3df60c5147245935a24431c04808a
[MIPS64] Fix art_quick_invoke_stub argument offsets.
ArtMethod reference's size got bigger, so we need to move other args
and leave enough space for ArtMethod* and 'this' pointer.
This fixes mips64 boot.
Bug: 19264997
Change-Id: I47198d5f39a4caab30b3b77479d5eedaad5006ab
Diffstat (limited to 'runtime/asm_support.h')
-rw-r--r-- | runtime/asm_support.h | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/runtime/asm_support.h b/runtime/asm_support.h index 3e677a4dbe..d7efe1c21e 100644 --- a/runtime/asm_support.h +++ b/runtime/asm_support.h @@ -18,8 +18,8 @@ #define ART_RUNTIME_ASM_SUPPORT_H_ #if defined(__cplusplus) +#include "art_method.h" #include "lock_word.h" -#include "mirror/art_method.h" #include "mirror/class.h" #include "mirror/string.h" #include "runtime.h" @@ -69,12 +69,12 @@ ADD_TEST_EQ(static_cast<size_t>(RUNTIME_SAVE_ALL_CALLEE_SAVE_FRAME_OFFSET), art::Runtime::GetCalleeSaveMethodOffset(art::Runtime::kSaveAll)) // Offset of field Runtime::callee_save_methods_[kRefsOnly] -#define RUNTIME_REFS_ONLY_CALLEE_SAVE_FRAME_OFFSET COMPRESSED_REFERENCE_SIZE +#define RUNTIME_REFS_ONLY_CALLEE_SAVE_FRAME_OFFSET 8 ADD_TEST_EQ(static_cast<size_t>(RUNTIME_REFS_ONLY_CALLEE_SAVE_FRAME_OFFSET), art::Runtime::GetCalleeSaveMethodOffset(art::Runtime::kRefsOnly)) // Offset of field Runtime::callee_save_methods_[kRefsAndArgs] -#define RUNTIME_REFS_AND_ARGS_CALLEE_SAVE_FRAME_OFFSET (2 * COMPRESSED_REFERENCE_SIZE) +#define RUNTIME_REFS_AND_ARGS_CALLEE_SAVE_FRAME_OFFSET (2 * 8) ADD_TEST_EQ(static_cast<size_t>(RUNTIME_REFS_AND_ARGS_CALLEE_SAVE_FRAME_OFFSET), art::Runtime::GetCalleeSaveMethodOffset(art::Runtime::kRefsAndArgs)) @@ -135,13 +135,13 @@ ADD_TEST_EQ(size_t(MIRROR_OBJECT_HEADER_SIZE), sizeof(art::mirror::Object)) #define MIRROR_CLASS_COMPONENT_TYPE_OFFSET (4 + MIRROR_OBJECT_HEADER_SIZE) ADD_TEST_EQ(MIRROR_CLASS_COMPONENT_TYPE_OFFSET, art::mirror::Class::ComponentTypeOffset().Int32Value()) -#define MIRROR_CLASS_ACCESS_FLAGS_OFFSET (44 + MIRROR_OBJECT_HEADER_SIZE) +#define MIRROR_CLASS_ACCESS_FLAGS_OFFSET (36 + MIRROR_OBJECT_HEADER_SIZE) ADD_TEST_EQ(MIRROR_CLASS_ACCESS_FLAGS_OFFSET, art::mirror::Class::AccessFlagsOffset().Int32Value()) -#define MIRROR_CLASS_OBJECT_SIZE_OFFSET (96 + MIRROR_OBJECT_HEADER_SIZE) +#define MIRROR_CLASS_OBJECT_SIZE_OFFSET (112 + MIRROR_OBJECT_HEADER_SIZE) ADD_TEST_EQ(MIRROR_CLASS_OBJECT_SIZE_OFFSET, art::mirror::Class::ObjectSizeOffset().Int32Value()) -#define MIRROR_CLASS_STATUS_OFFSET (108 + MIRROR_OBJECT_HEADER_SIZE) +#define MIRROR_CLASS_STATUS_OFFSET (124 + MIRROR_OBJECT_HEADER_SIZE) ADD_TEST_EQ(MIRROR_CLASS_STATUS_OFFSET, art::mirror::Class::StatusOffset().Int32Value()) @@ -169,6 +169,10 @@ ADD_TEST_EQ(MIRROR_OBJECT_ARRAY_DATA_OFFSET, ADD_TEST_EQ(static_cast<size_t>(MIRROR_OBJECT_ARRAY_COMPONENT_SIZE), sizeof(art::mirror::HeapReference<art::mirror::Object>)) +#define MIRROR_LONG_ARRAY_DATA_OFFSET (8 + MIRROR_OBJECT_HEADER_SIZE) +ADD_TEST_EQ(MIRROR_LONG_ARRAY_DATA_OFFSET, + art::mirror::Array::DataOffset(sizeof(uint64_t)).Int32Value()) + // Offsets within java.lang.String. #define MIRROR_STRING_COUNT_OFFSET MIRROR_OBJECT_HEADER_SIZE ADD_TEST_EQ(MIRROR_STRING_COUNT_OFFSET, art::mirror::String::CountOffset().Int32Value()) @@ -177,21 +181,21 @@ ADD_TEST_EQ(MIRROR_STRING_COUNT_OFFSET, art::mirror::String::CountOffset().Int32 ADD_TEST_EQ(MIRROR_STRING_VALUE_OFFSET, art::mirror::String::ValueOffset().Int32Value()) // Offsets within java.lang.reflect.ArtMethod. -#define MIRROR_ART_METHOD_DEX_CACHE_METHODS_OFFSET (4 + MIRROR_OBJECT_HEADER_SIZE) -ADD_TEST_EQ(MIRROR_ART_METHOD_DEX_CACHE_METHODS_OFFSET, - art::mirror::ArtMethod::DexCacheResolvedMethodsOffset().Int32Value()) +#define ART_METHOD_DEX_CACHE_METHODS_OFFSET 4 +ADD_TEST_EQ(ART_METHOD_DEX_CACHE_METHODS_OFFSET, + art::ArtMethod::DexCacheResolvedMethodsOffset().Int32Value()) -#define MIRROR_ART_METHOD_DEX_CACHE_TYPES_OFFSET (8 + MIRROR_OBJECT_HEADER_SIZE) -ADD_TEST_EQ(MIRROR_ART_METHOD_DEX_CACHE_TYPES_OFFSET, - art::mirror::ArtMethod::DexCacheResolvedTypesOffset().Int32Value()) +#define ART_METHOD_DEX_CACHE_TYPES_OFFSET 8 +ADD_TEST_EQ(ART_METHOD_DEX_CACHE_TYPES_OFFSET, + art::ArtMethod::DexCacheResolvedTypesOffset().Int32Value()) -#define MIRROR_ART_METHOD_QUICK_CODE_OFFSET_32 (36 + MIRROR_OBJECT_HEADER_SIZE) -ADD_TEST_EQ(MIRROR_ART_METHOD_QUICK_CODE_OFFSET_32, - art::mirror::ArtMethod::EntryPointFromQuickCompiledCodeOffset(4).Int32Value()) +#define ART_METHOD_QUICK_CODE_OFFSET_32 36 +ADD_TEST_EQ(ART_METHOD_QUICK_CODE_OFFSET_32, + art::ArtMethod::EntryPointFromQuickCompiledCodeOffset(4).Int32Value()) -#define MIRROR_ART_METHOD_QUICK_CODE_OFFSET_64 (48 + MIRROR_OBJECT_HEADER_SIZE) -ADD_TEST_EQ(MIRROR_ART_METHOD_QUICK_CODE_OFFSET_64, - art::mirror::ArtMethod::EntryPointFromQuickCompiledCodeOffset(8).Int32Value()) +#define ART_METHOD_QUICK_CODE_OFFSET_64 48 +ADD_TEST_EQ(ART_METHOD_QUICK_CODE_OFFSET_64, + art::ArtMethod::EntryPointFromQuickCompiledCodeOffset(8).Int32Value()) #define LOCK_WORD_STATE_SHIFT 30 ADD_TEST_EQ(LOCK_WORD_STATE_SHIFT, static_cast<int32_t>(art::LockWord::kStateShift)) |