summaryrefslogtreecommitdiff
path: root/runtime/stack.cc
diff options
context:
space:
mode:
author Mythri Alle <mythria@google.com> 2022-12-15 13:05:59 +0000
committer Mythri Alle <mythria@google.com> 2022-12-15 15:26:00 +0000
commitd4a63a2c34ff6ba3e6e7cad2bac6e971497b82df (patch)
tree44da2a930c123b34bb013e116de468bd4cdad8f8 /runtime/stack.cc
parent1618866de339dfa489c5c5f82ea4ee6a8771448b (diff)
Remove an incorrect debug check due to removal of instrumentation stubs
When validating frames during a stack walk we get the current frame information for quick frames to do some checks. When the current_oat_method_header is a nullptr we get it based on the method type. For native methods, this means that the frame is of GenericJniTrampoline. We added a check there that the available code for the method should be either GenericJniTrampoline or JITed code (because we might have JITed JNI Stubs after the invocation). We didn't expect oat code there. This was true when we used instrumentation stubs for debug / tracing support. Instrumentation stubs were installed which would run necessary entry / exit hooks and then fetch and run oat code. With the removal of instrumentation stubs we install GenericJniTrampoline when necessary. When instrumentation is no longer necessary we install the most optimized code available for the method which could be oat code. So it is possible to see oat code even when running a GenericJniTrampoline. We could expand the DCHECK by expecting oat code as well but I think that may not add much value there. Bug: 206029744 Test: art/testrunner.py -t 602 Change-Id: I8c2cc4dc854c238458480948ecd926960b9f1242
Diffstat (limited to 'runtime/stack.cc')
-rw-r--r--runtime/stack.cc9
1 files changed, 0 insertions, 9 deletions
diff --git a/runtime/stack.cc b/runtime/stack.cc
index c83814abd2..7b70d4165f 100644
--- a/runtime/stack.cc
+++ b/runtime/stack.cc
@@ -778,15 +778,6 @@ QuickMethodFrameInfo StackVisitor::GetCurrentQuickFrameInfo() const {
// (resolution, instrumentation) trampoline; or
// - fake a Generic JNI frame in art_jni_dlsym_lookup_critical_stub.
DCHECK(method->IsNative());
- if (kIsDebugBuild && !method->IsCriticalNative()) {
- ClassLinker* class_linker = runtime->GetClassLinker();
- const void* entry_point = runtime->GetInstrumentation()->GetCodeForInvoke(method);
- CHECK(class_linker->IsQuickGenericJniStub(entry_point) ||
- // The current entrypoint (after filtering out trampolines) may have changed
- // from GenericJNI to JIT-compiled stub since we have entered this frame.
- (runtime->GetJit() != nullptr &&
- runtime->GetJit()->GetCodeCache()->ContainsPc(entry_point))) << method->PrettyMethod();
- }
// Generic JNI frame is just like the SaveRefsAndArgs frame.
// Note that HandleScope, if any, is below the frame.
return RuntimeCalleeSaveFrame::GetMethodFrameInfo(CalleeSaveType::kSaveRefsAndArgs);