From 178dce79220c16e6f0061bcd12e9e9683ec045ee Mon Sep 17 00:00:00 2001 From: Jeff Hao Date: Fri, 5 May 2017 16:59:29 -0700 Subject: 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. Maps Vdex Memory Usage: 19.4/33.4MB -> 18.8/33.4MB Bug: 35800981 Test: mm test-art-host Change-Id: I147a9267ec022547b384374e1449d20bcab1ead2 --- runtime/interpreter/interpreter_common.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/interpreter/interpreter_common.h') diff --git a/runtime/interpreter/interpreter_common.h b/runtime/interpreter/interpreter_common.h index 2589ad046b..67e072dd96 100644 --- a/runtime/interpreter/interpreter_common.h +++ b/runtime/interpreter/interpreter_common.h @@ -527,10 +527,11 @@ static inline void AssignRegister(ShadowFrame* new_shadow_frame, const ShadowFra } } +// The arg_offset is the offset to the first input register in the frame. void ArtInterpreterToCompiledCodeBridge(Thread* self, ArtMethod* caller, - const DexFile::CodeItem* code_item, ShadowFrame* shadow_frame, + uint16_t arg_offset, JValue* result); // Set string value created from StringFactory.newStringFromXXX() into all aliases of -- cgit v1.2.3-59-g8ed1b