summaryrefslogtreecommitdiffstats
path: root/compiler/image_writer.h
diff options
context:
space:
mode:
authorMingyao Yang <mingyao@google.com>2014-05-15 17:02:16 -0700
committerIan Rogers <irogers@google.com>2014-07-11 17:17:10 -0700
commit98d1cc8033251c93786e2fa8c59a2e555a9493be (patch)
treef0a76b8fff060ee484af09028da65a8339d57057 /compiler/image_writer.h
parentaebf3cda094f34cf846d19a7724bdc8005267c95 (diff)
downloadandroid_art-98d1cc8033251c93786e2fa8c59a2e555a9493be.tar.gz
android_art-98d1cc8033251c93786e2fa8c59a2e555a9493be.tar.bz2
android_art-98d1cc8033251c93786e2fa8c59a2e555a9493be.zip
Improve performance of invokevirtual/invokeinterface with embedded imt/vtable
Add an embedded version of imt/vtable into class object. Both tables start at fixed offset within class object so method/entry point can be loaded directly from class object for invokeinterface/invokevirtual. Bug: 8142917 Change-Id: I4240d58cfbe9250107c95c0708c036854c455968
Diffstat (limited to 'compiler/image_writer.h')
-rw-r--r--compiler/image_writer.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/image_writer.h b/compiler/image_writer.h
index 2bcb41e3fe..cf5bc930d1 100644
--- a/compiler/image_writer.h
+++ b/compiler/image_writer.h
@@ -149,6 +149,13 @@ class ImageWriter {
void FixupObject(mirror::Object* orig, mirror::Object* copy)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ // Get quick code for non-resolution/imt_conflict/abstract method.
+ const byte* GetQuickCode(mirror::ArtMethod* method, bool* quick_is_interpreted)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
+ const byte* GetQuickEntryPoint(mirror::ArtMethod* method)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
// Patches references in OatFile to expect runtime addresses.
void PatchOatCodeAndMethods(File* elf_file)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
@@ -192,6 +199,7 @@ class ImageWriter {
uint32_t quick_to_interpreter_bridge_offset_;
friend class FixupVisitor;
+ friend class FixupClassVisitor;
DISALLOW_COPY_AND_ASSIGN(ImageWriter);
};