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

This reverts commit 5d03317a834efdf3b5240c401f1bc2ceac7a2f25.

We need to catch all possible cases in which new instrumentation appears
or the debugger is attached, and then switch to the reference interpreter
if necessary.  We may, in a future CL, use the alt-mterp mechanism to accompish
this (as did Dalvik).

Only enables Arm64 for now.  Once it survives extended testing, will enable
arm and update x86.

Updated OSR handling to match other interpreters.

Change-Id: I076f1d752d6f59899876bab26b18e2221cd92f69
diff --git a/runtime/instrumentation.h b/runtime/instrumentation.h
index 56aeefc..e3cbf53 100644
--- a/runtime/instrumentation.h
+++ b/runtime/instrumentation.h
@@ -290,6 +290,14 @@
   bool IsActive() const SHARED_REQUIRES(Locks::mutator_lock_) {
     return have_dex_pc_listeners_ || have_method_entry_listeners_ || have_method_exit_listeners_ ||
         have_field_read_listeners_ || have_field_write_listeners_ ||
+        have_exception_caught_listeners_ || have_method_unwind_listeners_ ||
+        have_branch_listeners_ || have_invoke_virtual_or_interface_listeners_;
+  }
+
+  // Any instrumentation *other* than what is needed for Jit profiling active?
+  bool NonJitProfilingActive() const SHARED_REQUIRES(Locks::mutator_lock_) {
+    return have_dex_pc_listeners_ || have_method_exit_listeners_ ||
+        have_field_read_listeners_ || have_field_write_listeners_ ||
         have_exception_caught_listeners_ || have_method_unwind_listeners_;
   }