From 7a2c7c2f7062d9fef21b72ff9c10ca8ef863eb8b Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Tue, 20 Nov 2018 10:03:13 +0000 Subject: Refactor code around JIT creation. - Create the JIT early on. - Have dedicated zygote spaces, that get assign after the fork. - Re-parse compiler options after fork to take into account customization of debug flags by the child. Currently, we only create the thread pool in the child, so the zygote isn't jitting yet. Bug: 119800099 Test: test.py, device boots Change-Id: I591ce933ebf54a67937ab1d05206534f55ef2f65 --- compiler/jit/jit_compiler.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'compiler/jit/jit_compiler.h') diff --git a/compiler/jit/jit_compiler.h b/compiler/jit/jit_compiler.h index 5840fece2e..d201611d79 100644 --- a/compiler/jit/jit_compiler.h +++ b/compiler/jit/jit_compiler.h @@ -43,10 +43,13 @@ class JitCompiler { const CompilerOptions& GetCompilerOptions() const { return *compiler_options_.get(); } + CompilerDriver* GetCompilerDriver() const { return compiler_driver_.get(); } + void ParseCompilerOptions(); + private: std::unique_ptr compiler_options_; std::unique_ptr compiler_driver_; @@ -54,11 +57,6 @@ class JitCompiler { JitCompiler(); - // This is in the compiler since the runtime doesn't have access to the compiled method - // structures. - bool AddToCodeCache(ArtMethod* method, const CompiledMethod* compiled_method) - REQUIRES_SHARED(Locks::mutator_lock_); - DISALLOW_COPY_AND_ASSIGN(JitCompiler); }; -- cgit v1.2.3-59-g8ed1b