diff options
author | 2019-03-05 15:41:50 +0000 | |
---|---|---|
committer | 2019-03-06 14:21:51 +0000 | |
commit | bf5f0f3f1eea2e712e7269ff1e1f9b1bcc4cbaee (patch) | |
tree | 030ef55b56ede3dbf42b6b5f19c59bfc0583636f /compiler/optimizing/optimizing_compiler.cc | |
parent | 7e057ec0e023910f6bc42bc552a8463343cf346f (diff) |
Revert "Revert^2 "Add code size to CodeInfo""
This reverts commit e1412dacbf1d2a809bd1fca658cc8cb8f61f8ee6.
Bug: 123510633
Bug: 127305289
Reason for revert: b/127305289
Change-Id: I54557b05a44777f1fa2c15bde4fa648980f42eed
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index dd5d4a5891..9a580d1f72 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -1157,8 +1157,7 @@ CompiledMethod* OptimizingCompiler::Compile(const dex::CodeItem* code_item, } static ScopedArenaVector<uint8_t> CreateJniStackMap(ScopedArenaAllocator* allocator, - const JniCompiledMethod& jni_compiled_method, - size_t code_size) { + const JniCompiledMethod& jni_compiled_method) { // StackMapStream is quite large, so allocate it using the ScopedArenaAllocator // to stay clear of the frame size limit. std::unique_ptr<StackMapStream> stack_map_stream( @@ -1168,7 +1167,7 @@ static ScopedArenaVector<uint8_t> CreateJniStackMap(ScopedArenaAllocator* alloca jni_compiled_method.GetCoreSpillMask(), jni_compiled_method.GetFpSpillMask(), /* num_dex_registers= */ 0); - stack_map_stream->EndMethod(code_size); + stack_map_stream->EndMethod(); return stack_map_stream->Encode(); } @@ -1226,8 +1225,8 @@ CompiledMethod* OptimizingCompiler::JniCompile(uint32_t access_flags, MaybeRecordStat(compilation_stats_.get(), MethodCompilationStat::kCompiledNativeStub); ScopedArenaAllocator stack_map_allocator(&arena_stack); // Will hold the stack map. - ScopedArenaVector<uint8_t> stack_map = CreateJniStackMap( - &stack_map_allocator, jni_compiled_method, jni_compiled_method.GetCode().size()); + ScopedArenaVector<uint8_t> stack_map = CreateJniStackMap(&stack_map_allocator, + jni_compiled_method); return CompiledMethod::SwapAllocCompiledMethod( GetCompiledMethodStorage(), jni_compiled_method.GetInstructionSet(), @@ -1278,8 +1277,8 @@ bool OptimizingCompiler::JitCompile(Thread* self, ArenaStack arena_stack(runtime->GetJitArenaPool()); // StackMapStream is large and it does not fit into this frame, so we need helper method. ScopedArenaAllocator stack_map_allocator(&arena_stack); // Will hold the stack map. - ScopedArenaVector<uint8_t> stack_map = CreateJniStackMap( - &stack_map_allocator, jni_compiled_method, jni_compiled_method.GetCode().size()); + ScopedArenaVector<uint8_t> stack_map = CreateJniStackMap(&stack_map_allocator, + jni_compiled_method); uint8_t* stack_map_data = nullptr; uint8_t* roots_data = nullptr; uint32_t data_size = code_cache->ReserveData(self, |