Clean up after obsolete methods update fix.

This is a follow-up after
    https://android-review.googlesource.com/942485 ,
addressing most of the late comments.

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing --interpreter
Bug: 73333076
Change-Id: I52c0a3cbf81e97474dc46846486263946379416a
diff --git a/runtime/jit/jit_code_cache.cc b/runtime/jit/jit_code_cache.cc
index fee5bec..47a8b47 100644
--- a/runtime/jit/jit_code_cache.cc
+++ b/runtime/jit/jit_code_cache.cc
@@ -1821,17 +1821,9 @@
   }
 
   if (kIsDebugBuild && method != nullptr && !method->IsNative()) {
-    // When we are walking the stack to redefine classes and creating obsolete methods it is
-    // possible that we might have updated the method_code_map by making this method obsolete in a
-    // previous frame. Therefore we should just check that the non-obsolete version of this method
-    // is the one we expect. We change to the non-obsolete versions in the error message since the
-    // obsolete version of the method might not be fully initialized yet. This situation can only
-    // occur when we are in the process of allocating and setting up obsolete methods. Otherwise
-    // method and it->second should be identical. (See openjdkjvmti/ti_redefine.cc for more
-    // information.)
-    DCHECK_EQ(found_method->GetNonObsoleteMethod(), method->GetNonObsoleteMethod())
-        << ArtMethod::PrettyMethod(method->GetNonObsoleteMethod()) << " "
-        << ArtMethod::PrettyMethod(found_method->GetNonObsoleteMethod()) << " "
+    DCHECK_EQ(found_method, method)
+        << ArtMethod::PrettyMethod(method) << " "
+        << ArtMethod::PrettyMethod(found_method) << " "
         << std::hex << pc;
   }
   return method_header;