diff options
author | 2017-05-05 16:59:29 -0700 | |
---|---|---|
committer | 2017-05-25 15:11:56 -0700 | |
commit | 5ea8413714ceec50a758df6614dc4a3ec6179112 (patch) | |
tree | edbf6a2ffe8aa717d2121b0daa1fc68678fc2ed2 /runtime/common_dex_operations.h | |
parent | 8bdf4e0d2094b7c9a9a1ffc1a58dbdff4cbe7126 (diff) |
Stop interpreter from accessing code items of compiled code.
The ArtInterpreterToCompiledCodeBridge accesses the code item in a
number of places to handle argument marshalling. However, the code item
of a compiled method should have no need to be accessed by the runtime
at all, since the code has been compiled. By removing these accesses,
there is a drop in the memory footprint of the dex file, since these
code items remain untouched by the runtime.
Includes fixes for JIT and deopt.
For Maps:
Systrace vdex memory usage: 19.4/33.4MB -> 18.8/33.4MB
Dumpsys meminfo vdex PSS: 9371kB -> 9275kB
Bug: 35800981
Test: mm test-art-host
Change-Id: I3bf17f8866287d9a8f127c16da23bebb801456dc
Diffstat (limited to 'runtime/common_dex_operations.h')
-rw-r--r-- | runtime/common_dex_operations.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/runtime/common_dex_operations.h b/runtime/common_dex_operations.h index 6693eefa5a..133ddb0721 100644 --- a/runtime/common_dex_operations.h +++ b/runtime/common_dex_operations.h @@ -36,8 +36,8 @@ namespace interpreter { void ArtInterpreterToCompiledCodeBridge(Thread* self, ArtMethod* caller, - const DexFile::CodeItem* code_item, ShadowFrame* shadow_frame, + uint16_t arg_offset, JValue* result); } // namespace interpreter @@ -46,17 +46,15 @@ inline void PerformCall(Thread* self, ArtMethod* caller_method, const size_t first_dest_reg, ShadowFrame* callee_frame, - JValue* result) + JValue* result, + bool use_interpreter_entrypoint) REQUIRES_SHARED(Locks::mutator_lock_) { if (LIKELY(Runtime::Current()->IsStarted())) { - ArtMethod* target = callee_frame->GetMethod(); - if (ClassLinker::ShouldUseInterpreterEntrypoint( - target, - target->GetEntryPointFromQuickCompiledCode())) { + if (use_interpreter_entrypoint) { interpreter::ArtInterpreterToInterpreterBridge(self, code_item, callee_frame, result); } else { interpreter::ArtInterpreterToCompiledCodeBridge( - self, caller_method, code_item, callee_frame, result); + self, caller_method, callee_frame, first_dest_reg, result); } } else { interpreter::UnstartedRuntime::Invoke(self, code_item, callee_frame, result, first_dest_reg); |