Adjust CHECK on instrumentation stack.

When installing the instrumentation stack, it may be that we hit a
resolution stub at the bottom of the call stack. This means the
instrumentation stack will have an instrumentation frame with a runtime
method, when the actual stack will replace this method with the actual
ArtMethod being called.

Adjust CHECK in stack walking to not assume methods match with the
instrumentation stack when seeing a runtime method.

Bug: 72608560
Test: ./art/test/run-test --host --dev --runtime-option -verbose:deopt,plugin --prebuild --compact-dex-level fast --jit --no-relocate --create-runner --runtime-option -Xjitthreshold:0 --no-relocate --gcstress --runtime-option -Xcheck:jni  2001-virtual-structural-multithread
Test: art/tools/parallel_run.py -j80 /tmp/path/runit.sh --out failure.txt

Change-Id: Ic208fa52f4d8b14838b21022744e048e3ca7d093
diff --git a/runtime/stack.cc b/runtime/stack.cc
index 4148dc7..a4ce99b 100644
--- a/runtime/stack.cc
+++ b/runtime/stack.cc
@@ -960,7 +960,9 @@
                 Runtime::Current()->GetCalleeSaveMethod(CalleeSaveType::kSaveRefsAndArgs);
             CHECK_EQ(GetMethod(), callee) << "Expected: " << ArtMethod::PrettyMethod(callee)
                                           << " Found: " << ArtMethod::PrettyMethod(GetMethod());
-          } else {
+          } else if (!instrumentation_frame.method_->IsRuntimeMethod()) {
+            // Trampolines get replaced with their actual method in the stack,
+            // so don't do the check below for runtime methods.
             // Instrumentation generally doesn't distinguish between a method's obsolete and
             // non-obsolete version.
             CHECK_EQ(instrumentation_frame.method_->GetNonObsoleteMethod(),