Tear down the code cache when it is full and restart from scratch.
Because the code cache may be wiped out after safe points now the patching of
inline cache for predicted chains is done through the compiler thread's work
queue.
diff --git a/vm/Thread.h b/vm/Thread.h
index a30c77c..a6ad832 100644
--- a/vm/Thread.h
+++ b/vm/Thread.h
@@ -287,8 +287,9 @@
SUSPEND_FOR_STACK_DUMP,
SUSPEND_FOR_DEX_OPT,
#if defined(WITH_JIT)
- SUSPEND_FOR_TBL_RESIZE,
- SUSPEND_FOR_IC_PATCH,
+ SUSPEND_FOR_TBL_RESIZE, // jit-table resize
+ SUSPEND_FOR_IC_PATCH, // polymorphic callsite inline-cache patch
+ SUSPEND_FOR_CC_RESET, // code-cache reset
#endif
} SuspendCause;
void dvmSuspendThread(Thread* thread);