diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2019-06-06 16:20:54 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2019-06-10 07:32:49 +0000 |
commit | 7f7539b8ed0a31de1d1b6e1f0b730d55e37666a6 (patch) | |
tree | d1611f06e3e468ff61c4d4bc349777b85b3a2e16 /compiler/optimizing/optimizing_compiler.cc | |
parent | 93adcb53c77f4f04dfebd30b94e8ea9936aa8abb (diff) |
Pass the memory region to allocate into to the compiler / allocation.
Test: test.py
Bug: 119800099
Change-Id: Ie3cba5abe3dd4f8756af5ecfd6c26320de314fe8
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index c799b12a4b..9da282bd2c 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -295,6 +295,7 @@ class OptimizingCompiler final : public Compiler { bool JitCompile(Thread* self, jit::JitCodeCache* code_cache, + jit::JitMemoryRegion* region, ArtMethod* method, bool baseline, bool osr, @@ -1248,6 +1249,7 @@ bool EncodeArtMethodInInlineInfo(ArtMethod* method ATTRIBUTE_UNUSED) { bool OptimizingCompiler::JitCompile(Thread* self, jit::JitCodeCache* code_cache, + jit::JitMemoryRegion* region, ArtMethod* method, bool baseline, bool osr, @@ -1282,6 +1284,7 @@ bool OptimizingCompiler::JitCompile(Thread* self, uint8_t* stack_map_data = nullptr; uint8_t* roots_data = nullptr; uint32_t data_size = code_cache->ReserveData(self, + region, stack_map.size(), /* number_of_roots= */ 0, method, @@ -1295,6 +1298,7 @@ bool OptimizingCompiler::JitCompile(Thread* self, const void* code = code_cache->CommitCode( self, + region, method, stack_map_data, roots_data, @@ -1306,6 +1310,7 @@ bool OptimizingCompiler::JitCompile(Thread* self, /* has_should_deoptimize_flag= */ false, cha_single_implementation_list); if (code == nullptr) { + code_cache->ClearData(self, region, stack_map_data, roots_data); return false; } @@ -1379,6 +1384,7 @@ bool OptimizingCompiler::JitCompile(Thread* self, uint8_t* stack_map_data = nullptr; uint8_t* roots_data = nullptr; uint32_t data_size = code_cache->ReserveData(self, + region, stack_map.size(), number_of_roots, method, @@ -1400,6 +1406,7 @@ bool OptimizingCompiler::JitCompile(Thread* self, const void* code = code_cache->CommitCode( self, + region, method, stack_map_data, roots_data, @@ -1413,7 +1420,7 @@ bool OptimizingCompiler::JitCompile(Thread* self, if (code == nullptr) { MaybeRecordStat(compilation_stats_.get(), MethodCompilationStat::kJitOutOfMemoryForCommit); - code_cache->ClearData(self, stack_map_data, roots_data); + code_cache->ClearData(self, region, stack_map_data, roots_data); return false; } |