Jit: Make most Jit compile failures non-fatal; just abort offending translation
Issue 2175597 Jit compile failures should abort translation, but not the VM
Added new dvmCompileAbort() to replace uses of dvmAbort() when something goes
wrong during the compliation of a trace. In that case, we'll abort the translation
and set it's head to the interpret-only "translation".
diff --git a/vm/compiler/Compiler.h b/vm/compiler/Compiler.h
index 932f41d..21c86ab 100644
--- a/vm/compiler/Compiler.h
+++ b/vm/compiler/Compiler.h
@@ -15,6 +15,7 @@
*/
#include <Thread.h>
+#include <setjmp.h>
#ifndef _DALVIK_VM_COMPILER
#define _DALVIK_VM_COMPILER
@@ -56,6 +57,7 @@
WorkOrderKind kind;
void* info;
JitTranslationInfo result;
+ jmp_buf *bailPtr;
} CompilerWorkOrder;
/* Chain cell for predicted method invocation */
@@ -152,7 +154,7 @@
void *dvmCheckCodeCache(void *method);
bool dvmCompileMethod(const Method *method, JitTranslationInfo *info);
bool dvmCompileTrace(JitTraceDescription *trace, int numMaxInsts,
- JitTranslationInfo *info);
+ JitTranslationInfo *info, jmp_buf *bailPtr);
void dvmCompilerDumpStats(void);
void dvmCompilerDrainQueue(void);
void dvmJitUnchainAll(void);
@@ -184,5 +186,4 @@
void dvmCompilerStateRefresh(void);
JitTraceDescription *dvmCopyTraceDescriptor(const u2 *pc,
const struct JitEntry *desc);
-
#endif /* _DALVIK_VM_COMPILER */