Be a bit smarter with JIT code triggering deoptimization.
Do not re-use an OSR method that triggered deoptimization.
Also add a stack overflow check before doing OSR.
bug:27094810
Change-Id: I6ff6a7fb9b3df9b7c0ff37e3610595efa70ad067
diff --git a/runtime/jit/jit_code_cache.h b/runtime/jit/jit_code_cache.h
index 048f8d0..71f5cda 100644
--- a/runtime/jit/jit_code_cache.h
+++ b/runtime/jit/jit_code_cache.h
@@ -172,6 +172,10 @@
size_t GetMemorySizeOfCodePointer(const void* ptr) REQUIRES(!lock_);
+ void InvalidateCompiledCodeFor(ArtMethod* method, const OatQuickMethodHeader* code)
+ REQUIRES(!lock_)
+ SHARED_REQUIRES(Locks::mutator_lock_);
+
private:
// Take ownership of maps.
JitCodeCache(MemMap* code_map,