From 05f87217ddc9b4b9186710c0135b918f456c5aef Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 19 Jun 2019 10:00:00 +0100 Subject: Make the JIT zygote memory shared. Test: boots Bug: 119800099 Change-Id: I75ff8a58eea4de5cb833139641b4e15b8394d9b1 --- compiler/optimizing/optimizing_compiler.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/optimizing_compiler.cc') diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 2153ddd7b4..6f3b9feb9d 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -384,6 +384,7 @@ class OptimizingCompiler final : public Compiler { ArtMethod* method, bool baseline, bool osr, + bool is_shared_jit_code, VariableSizedHandleScope* handles) const; CodeGenerator* TryCompileIntrinsic(ArenaAllocator* allocator, @@ -783,6 +784,7 @@ CodeGenerator* OptimizingCompiler::TryCompile(ArenaAllocator* allocator, ArtMethod* method, bool baseline, bool osr, + bool is_shared_jit_code, VariableSizedHandleScope* handles) const { MaybeRecordStat(compilation_stats_.get(), MethodCompilationStat::kAttemptBytecodeCompilation); const CompilerOptions& compiler_options = GetCompilerOptions(); @@ -850,7 +852,8 @@ CodeGenerator* OptimizingCompiler::TryCompile(ArenaAllocator* allocator, kInvalidInvokeType, dead_reference_safe, compiler_options.GetDebuggable(), - /* osr= */ osr); + /* osr= */ osr, + /* is_shared_jit_code= */ is_shared_jit_code); if (method != nullptr) { graph->SetArtMethod(method); @@ -1107,6 +1110,7 @@ CompiledMethod* OptimizingCompiler::Compile(const dex::CodeItem* code_item, method, compiler_options.IsBaseline(), /* osr= */ false, + /* is_shared_jit_code= */ false, &handles)); } } @@ -1368,6 +1372,7 @@ bool OptimizingCompiler::JitCompile(Thread* self, method, baseline, osr, + /* is_shared_jit_code= */ code_cache->IsSharedRegion(*region), &handles)); if (codegen.get() == nullptr) { return false; -- cgit v1.2.3-59-g8ed1b