diff options
| author | 2018-08-02 16:43:35 +0000 | |
|---|---|---|
| committer | 2018-08-02 16:43:35 +0000 | |
| commit | eeac119a22b09496eb66109c906df6a5243eac36 (patch) | |
| tree | c006a2c9b8c5c513939274409845e0be57cb18a5 /compiler/optimizing/optimizing_compiler.cc | |
| parent | 1bfd891d06e276d602b4a6ccf1a9f70967195218 (diff) | |
| parent | ced04835d8e3cd3f68576cfffc1d21283ca151b4 (diff) | |
Merge "Reuse arena memory for each block in scheduler."
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
| -rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index d96746fdd7..b2733ee1f2 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -1101,15 +1101,18 @@ static void CreateJniStackMap(ArenaStack* arena_stack, const JniCompiledMethod& jni_compiled_method, /* out */ ArenaVector<uint8_t>* stack_map) { ScopedArenaAllocator allocator(arena_stack); - StackMapStream stack_map_stream(&allocator, jni_compiled_method.GetInstructionSet()); - stack_map_stream.BeginMethod( + // 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( + new (&allocator) StackMapStream(&allocator, jni_compiled_method.GetInstructionSet())); + stack_map_stream->BeginMethod( jni_compiled_method.GetFrameSize(), jni_compiled_method.GetCoreSpillMask(), jni_compiled_method.GetFpSpillMask(), /* num_dex_registers */ 0); - stack_map_stream.EndMethod(); - stack_map->resize(stack_map_stream.PrepareForFillIn()); - stack_map_stream.FillInCodeInfo(MemoryRegion(stack_map->data(), stack_map->size())); + stack_map_stream->EndMethod(); + stack_map->resize(stack_map_stream->PrepareForFillIn()); + stack_map_stream->FillInCodeInfo(MemoryRegion(stack_map->data(), stack_map->size())); } CompiledMethod* OptimizingCompiler::JniCompile(uint32_t access_flags, |