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/compiler/Utility.c b/vm/compiler/Utility.c
index 77a2397..26bb3d0 100644
--- a/vm/compiler/Utility.c
+++ b/vm/compiler/Utility.c
@@ -79,7 +79,8 @@
currentArena->next = newArena;
currentArena = newArena;
numArenaBlocks++;
- LOGD("Total arena pages for JIT: %d", numArenaBlocks);
+ if (numArenaBlocks > 10)
+ LOGD("Total arena pages for JIT: %d", numArenaBlocks);
goto retry;
}
return NULL;