Revert "Revert "ART: Enable Jit Profiling in Mterp for arm/arm64""

Fixes: missing sign extension in iget template
       Call to wrong branch profiling helper in arm/goto_16 and arm/goto_32
       Missing export PCs
Reworks: Branch handlers to reduce cost of branch profiling.

Re-enables Jit profiling for both Arm and Arm64.

Performance note:
Branch profiling is relatively expensive, though the real
cost will depend on branch frequency.  Taking a very
branch intensive benchmark, CaffeineMark's logic test, we
see the following scores (higher is better):

Mterp  (profiling off) 6187
Mterp  (profiling on)  4305

Switch (profiling off) 3931
Switch (profiling on)  2032

This reverts commit 95717f0010e7a9445450f4d39babfaf3a83e29b5.

Change-Id: Ia2ef8b54ce95bfa86178b89c43f8a703316b2944
diff --git a/runtime/interpreter/interpreter.cc b/runtime/interpreter/interpreter.cc
index 4fd3c78..ceac513 100644
--- a/runtime/interpreter/interpreter.cc
+++ b/runtime/interpreter/interpreter.cc
@@ -324,8 +324,14 @@
         const instrumentation::Instrumentation* const instrumentation =
             Runtime::Current()->GetInstrumentation();
         while (true) {
-          if (instrumentation->IsActive() || !Runtime::Current()->IsStarted()) {
-            // TODO: allow JIT profiling instrumentation.  Now, just punt on all instrumentation.
+          // Mterp does not support all instrumentation.
+          bool unhandled_instrumentation;
+          if ((kRuntimeISA == kArm64) || (kRuntimeISA == kArm)) {
+            unhandled_instrumentation = instrumentation->NonJitProfilingActive();
+          } else {
+            unhandled_instrumentation = instrumentation->IsActive();
+          }
+          if (unhandled_instrumentation || !Runtime::Current()->IsStarted()) {
 #if !defined(__clang__)
             return ExecuteGotoImpl<false, false>(self, code_item, shadow_frame, result_register);
 #else