Revert^2 "Move Trace to use trampolines"

This reverts commit 27d85eaf54d1cf5f9279ba4d333488b0fbbf441f.

An ancestor of the original CL got a typo put in it during a minor
refactor. This caused a check to be reversed and was not noticed since
it was a rebase.

Reason for revert:  Fixed issue causing --trace failures on some tests

Change-Id: I066519950294edae7b2c22a5850b4a9a96ba46c9
Test: ./test.py --host --trace --ntrace
diff --git a/runtime/trace.cc b/runtime/trace.cc
index 292cac6..1986eec 100644
--- a/runtime/trace.cc
+++ b/runtime/trace.cc
@@ -433,7 +433,12 @@
                                                    instrumentation::Instrumentation::kMethodExited |
                                                    instrumentation::Instrumentation::kMethodUnwind);
         // TODO: In full-PIC mode, we don't need to fully deopt.
-        runtime->GetInstrumentation()->EnableMethodTracing(kTracerInstrumentationKey);
+        // TODO: We can only use trampoline entrypoints if we are java-debuggable since in that case
+        // we know that inlining and other problematic optimizations are disabled. We might just
+        // want to use the trampolines anyway since it is faster. It makes the story with disabling
+        // jit-gc more complex though.
+        runtime->GetInstrumentation()->EnableMethodTracing(
+            kTracerInstrumentationKey, /*needs_interpreter*/!runtime->IsJavaDebuggable());
       }
     }
   }
diff --git a/test/knownfailures.json b/test/knownfailures.json
index 9ba2b50..2b7a9b0 100644
--- a/test/knownfailures.json
+++ b/test/knownfailures.json
@@ -193,6 +193,22 @@
         "bug": "http://b/34369284"
     },
     {
+        "tests": ["018-stack-overflow",
+                  "107-int-math2",
+                  "667-jit-jni-stub"],
+        "description": ["We run for long enough for jit to compile some of the methods ",
+                        "which means it takes so long to finish the test that it will ",
+                        "timeout. The timeout is due to having to walk the stack ",
+                        "when entering and exiting methods due to the way the instrumentation ",
+                        "trampoline is implemented."],
+        "variant": "debuggable & jit & trace | debuggable & jit & stream"
+    },
+    {
+        "tests": "1935-get-set-current-frame-jit",
+        "description": ["Test expects that OSR works but tracing turns this feature off."],
+        "variant": "trace | stream"
+    },
+    {
         "tests": "1940-ddms-ext",
         "description": ["Test expects to be able to start tracing but we cannot",
                         "do that if tracing is already ongoing."],
@@ -201,7 +217,7 @@
     {
         "tests": "137-cfi",
         "description": ["This test unrolls and expects managed frames, but",
-                        "tracing means we run the interpreter."],
+                        "tracing means we run the interpreter or trampolines."],
         "variant": "trace | stream"
     },
     {