diff options
author | 2015-10-15 13:53:04 +0100 | |
---|---|---|
committer | 2015-10-21 10:59:27 +0100 | |
commit | 0c3c2668ef44fdbd18d97f9134a85d1a7d561aa4 (patch) | |
tree | 92e8e49ed1b4d5442f20721858c476ed5769d0ea /compiler/jit/jit_compiler.h | |
parent | 7edef7441d28db1403fbc5641b56a26ecf355879 (diff) |
Use DlMallocSpace for the JIT code cache.
- Also tidy up some code in the JIT compiler.
- And mprotect code space to be writable only when allocating.
Change-Id: I46ea5c029aec489f2af63452de31db3736aebc20
Diffstat (limited to 'compiler/jit/jit_compiler.h')
-rw-r--r-- | compiler/jit/jit_compiler.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/compiler/jit/jit_compiler.h b/compiler/jit/jit_compiler.h index ef68caa5fa..757f3f386a 100644 --- a/compiler/jit/jit_compiler.h +++ b/compiler/jit/jit_compiler.h @@ -39,10 +39,6 @@ class JitCompiler { virtual ~JitCompiler(); bool CompileMethod(Thread* self, ArtMethod* method) SHARED_REQUIRES(Locks::mutator_lock_); - // 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, - OatFile::OatMethod* out_method) SHARED_REQUIRES(Locks::mutator_lock_); CompilerCallbacks* GetCompilerCallbacks() const; size_t GetTotalCompileTime() const { return total_time_; @@ -58,12 +54,13 @@ class JitCompiler { std::unique_ptr<CompilerDriver> compiler_driver_; std::unique_ptr<const InstructionSetFeatures> instruction_set_features_; - explicit JitCompiler(); - uint8_t* WriteMethodHeaderAndCode( - const CompiledMethod* compiled_method, uint8_t* reserve_begin, uint8_t* reserve_end, - const uint8_t* mapping_table, const uint8_t* vmap_table, const uint8_t* gc_map); - bool MakeExecutable(CompiledMethod* compiled_method, ArtMethod* method) - SHARED_REQUIRES(Locks::mutator_lock_); + 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, + OatFile::OatMethod* out_method) SHARED_REQUIRES(Locks::mutator_lock_); DISALLOW_COPY_AND_ASSIGN(JitCompiler); }; |