diff options
| author | 2016-02-05 17:25:17 +0000 | |
|---|---|---|
| committer | 2016-02-05 17:25:17 +0000 | |
| commit | 9fba3f67a0792ad5eeb495e489d11a87211c318f (patch) | |
| tree | 7204ab0951b14fa2536fe33d974e413a3cbe87a5 /compiler/jit/jit_compiler.cc | |
| parent | 0f638c64686c03256c949051331b0838c9888a2a (diff) | |
| parent | b331febbab8e916680faba722cc84b66b84218a3 (diff) | |
Merge "Revert "Revert "Implement on-stack replacement for arm/arm64/x86/x86_64."""
Diffstat (limited to 'compiler/jit/jit_compiler.cc')
| -rw-r--r-- | compiler/jit/jit_compiler.cc | 11 | 
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc index 67747586c4..68f4783741 100644 --- a/compiler/jit/jit_compiler.cc +++ b/compiler/jit/jit_compiler.cc @@ -60,11 +60,12 @@ extern "C" void jit_unload(void* handle) {    delete reinterpret_cast<JitCompiler*>(handle);  } -extern "C" bool jit_compile_method(void* handle, ArtMethod* method, Thread* self) +extern "C" bool jit_compile_method( +    void* handle, ArtMethod* method, Thread* self, bool osr)      SHARED_REQUIRES(Locks::mutator_lock_) {    auto* jit_compiler = reinterpret_cast<JitCompiler*>(handle);    DCHECK(jit_compiler != nullptr); -  return jit_compiler->CompileMethod(self, method); +  return jit_compiler->CompileMethod(self, method, osr);  }  extern "C" void jit_types_loaded(void* handle, mirror::Class** types, size_t count) @@ -201,7 +202,7 @@ JitCompiler::~JitCompiler() {    }  } -bool JitCompiler::CompileMethod(Thread* self, ArtMethod* method) { +bool JitCompiler::CompileMethod(Thread* self, ArtMethod* method, bool osr) {    TimingLogger logger("JIT compiler timing logger", true, VLOG_IS_ON(jit));    const uint64_t start_time = NanoTime();    StackHandleScope<2> hs(self); @@ -223,8 +224,8 @@ bool JitCompiler::CompileMethod(Thread* self, ArtMethod* method) {      // of that proxy method, as the compiler does not expect a proxy method.      ArtMethod* method_to_compile = method->GetInterfaceMethodIfProxy(sizeof(void*));      JitCodeCache* const code_cache = runtime->GetJit()->GetCodeCache(); -    success = compiler_driver_->GetCompiler()->JitCompile(self, code_cache, method_to_compile); -    if (success && perf_file_ != nullptr) { +    success = compiler_driver_->GetCompiler()->JitCompile(self, code_cache, method_to_compile, osr); +    if (success && (perf_file_ != nullptr)) {        const void* ptr = method_to_compile->GetEntryPointFromQuickCompiledCode();        std::ostringstream stream;        stream << std::hex  |