Do not JIT boot image during native-debugging (keep AOT code instead).

The performance impact is currently significant and being able
to debug framework is not our primary goal for native debugging.

Change-Id: I3366c2a6317004f9dd16700b271a6c9b974f1c6e
diff --git a/runtime/debugger.cc b/runtime/debugger.cc
index bc65893..c375bba 100644
--- a/runtime/debugger.cc
+++ b/runtime/debugger.cc
@@ -622,9 +622,11 @@
   }
 
   Runtime* runtime = Runtime::Current();
-  // Since boot image code is AOT compiled as not debuggable, we need to patch
+  // Since boot image code may be AOT compiled as not debuggable, we need to patch
   // entry points of methods in boot image to interpreter bridge.
-  if (!runtime->GetInstrumentation()->IsForcedInterpretOnly()) {
+  // However, the performance cost of this is non-negligible during native-debugging due to the
+  // forced JIT, so we keep the AOT code in that case in exchange for limited native debugging.
+  if (!runtime->GetInstrumentation()->IsForcedInterpretOnly() && !runtime->IsNativeDebuggable()) {
     ScopedObjectAccess soa(self);
     UpdateEntryPointsClassVisitor visitor(runtime->GetInstrumentation());
     runtime->GetClassLinker()->VisitClasses(&visitor);