Interpreter restructuring

This is a restructuring of the Dalvik ARM and x86 interpreters:

  o Combine the old portstd and portdbg interpreters into a single
    portable interpreter.
  o Add debug/profiling support to the fast (mterp) interpreters.
  o Delete old mechansim of switching between interpreters.  Now, once
    you choose an interpreter at startup, you stick with it.
  o Allow JIT to co-exist with profiling & debugging (necessary for
    first-class support of debugging with the JIT active).
  o Adds single-step capability to the fast assembly interpreters without
    slowing them down (and, in fact, measurably improves their performance).
  o Remove old "polling for safe point" mechanism.  Breakouts now achieved
    via modifying base of interpreter handler table.
  o Simplify interpeter control mechanism.
  o Allow thread-granularity control for profiling & debugging

The primary motivation behind this change was to improve the responsiveness
of debugging and profiling and to make it easier to add new debugging and
profiling capabilities in the future.  Instead of always bailing out to the
slow debug portable interpreter, we can now stay in the fast interpreter.

A nice side effect of the change is that the fast interpreters
got a healthy speed boost because we were able to replace the
polling safepoint check that involved a dozen or so instructions
with a single table-base reload.  When combined with the two earlier CLs
related to this restructuring, we show a 5.6% performance improvement
using libdvm_interp.so on the Checkers benchmark relative to Honeycomb.

Change-Id: I8d37e866b3618def4e582fc73f1cf69ffe428f3c
diff --git a/vm/Profile.h b/vm/Profile.h
index 0cd6495..b821394 100644
--- a/vm/Profile.h
+++ b/vm/Profile.h
@@ -107,25 +107,25 @@
 /*
  * Call these when a method enters or exits.
  */
-#define TRACE_METHOD_ENTER(_self, _method)                                 \
+#define TRACE_METHOD_ENTER(_self, _method)                                  \
     do {                                                                    \
-        if (gDvm.interpBreak & kSubModeMethodTrace)                         \
+        if (_self->interpBreak.ctl.subMode & kSubModeMethodTrace)           \
             dvmMethodTraceAdd(_self, _method, METHOD_TRACE_ENTER);          \
-        if (gDvm.interpBreak & kSubModeEmulatorTrace)                       \
+        if (_self->interpBreak.ctl.subMode & kSubModeEmulatorTrace)         \
             dvmEmitEmulatorTrace(_method, METHOD_TRACE_ENTER);              \
     } while(0);
-#define TRACE_METHOD_EXIT(_self, _method)                                  \
+#define TRACE_METHOD_EXIT(_self, _method)                                   \
     do {                                                                    \
-        if (gDvm.interpBreak & kSubModeMethodTrace)                         \
+        if (_self->interpBreak.ctl.subMode & kSubModeMethodTrace)           \
             dvmMethodTraceAdd(_self, _method, METHOD_TRACE_EXIT);           \
-        if (gDvm.interpBreak & kSubModeEmulatorTrace)                       \
+        if (_self->interpBreak.ctl.subMode & kSubModeEmulatorTrace)         \
             dvmEmitEmulatorTrace(_method, METHOD_TRACE_EXIT);               \
     } while(0);
-#define TRACE_METHOD_UNROLL(_self, _method)                                \
+#define TRACE_METHOD_UNROLL(_self, _method)                                 \
     do {                                                                    \
-        if (gDvm.interpBreak & kSubModeMethodTrace)                         \
+        if (_self->interpBreak.ctl.subMode & kSubModeMethodTrace)           \
             dvmMethodTraceAdd(_self, _method, METHOD_TRACE_UNROLL);         \
-        if (gDvm.interpBreak & kSubModeEmulatorTrace)                       \
+        if (_self->interpBreak.ctl.subMode & kSubModeEmulatorTrace)         \
             dvmEmitEmulatorTrace(_method, METHOD_TRACE_UNROLL);             \
     } while(0);
 
@@ -138,7 +138,7 @@
 void dvmMethodTraceClassPrepEnd(void);
 
 void dvmFastMethodTraceEnter(const Method* method, struct Thread* self);
-void dvmFastJavaMethodTraceExit(struct Thread* self);
+void dvmFastMethodTraceExit(struct Thread* self);
 void dvmFastNativeMethodTraceExit(const Method* method, struct Thread* self);
 
 /*