Jit stress mode: translate everything we can and self verify.
This represents a general clean-up of some existing command-line
options: -Xjitthreshold:num and -Xjitblocking. The jit threshold
controls how quickly we treat a Dalvik address as a potential trace
head. Normally this is set around 200 (and the range is 0..255, where
0 is in effect 256 and 1 means begin trace selection on first visit).
-Xjitblocking forces the system to pause execution whenever a translation
request is made and resume when that translation is complete. Normally
the system make a request but continues execution (to avoid jitter).
Additionally, if WITH_SELF_VERIFICATION is defined, we force blocking
to be true, and set the threshold to 1. And finally, we treat
threshold==1 as a special case and disable the 2nd-level trace-building
filter - which causes the system to immediately start trace selection.
diff --git a/vm/interp/Jit.h b/vm/interp/Jit.h
index a69a1f0..b093164 100644
--- a/vm/interp/Jit.h
+++ b/vm/interp/Jit.h
@@ -89,13 +89,13 @@
*/
typedef struct JitEntryInfo {
- unsigned int traceRequested:1; /* already requested a translation */
+ unsigned int traceConstruction:1; /* build underway? */
unsigned int isMethodEntry:1;
unsigned int inlineCandidate:1;
unsigned int profileEnabled:1;
JitInstructionSetType instructionSet:4;
unsigned int unused:8;
- u2 chain; /* Index of next in chain */
+ u2 chain; /* Index of next in chain */
} JitEntryInfo;
typedef union JitEntryInfoUnion {
@@ -122,6 +122,8 @@
s8 dvmJitd2l(double d);
s8 dvmJitf2l(float f);
void dvmJitSetCodeAddr(const u2* dPC, void *nPC, JitInstructionSetType set);
+void dvmJitAbortTraceSelect(InterpState* interpState);
+JitEntry *dvmJitLookupAndAdd(const u2* dPC);
#endif /*_DALVIK_INTERP_JIT*/