Allow late lookup for @CriticalNative methods.
Test: Add and enable tests in 178-app-image-native-method
Test: Add and enable tests in jni_compiler_test
Test: Manually step through the new stub in GDB and check
that backtrace works at various points.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: aosp_taimen-userdebug boots.
Test: run-gtests.sh
Test: testrunner.py --target --optimizing
Bug: 112189621
Change-Id: If094e5062acbb99eefa88f2afb4815f93730cb82
diff --git a/imgdiag/imgdiag.cc b/imgdiag/imgdiag.cc
index 10f4015..421e7d7 100644
--- a/imgdiag/imgdiag.cc
+++ b/imgdiag/imgdiag.cc
@@ -853,6 +853,10 @@
if (jdl != nullptr) {
entry_point_names_[jdl] = "JniDlsymLookupTrampoline (from boot oat file)";
}
+ const void* jdlc = oat_header.GetJniDlsymLookupCriticalTrampoline();
+ if (jdlc != nullptr) {
+ entry_point_names_[jdlc] = "JniDlsymLookupCriticalTrampoline (from boot oat file)";
+ }
const void* qgjt = oat_header.GetQuickGenericJniTrampoline();
if (qgjt != nullptr) {
entry_point_names_[qgjt] = "QuickGenericJniTrampoline (from boot oat file)";
@@ -897,6 +901,8 @@
return "QuickResolutionStub";
} else if (class_linker_->IsJniDlsymLookupStub(addr)) {
return "JniDlsymLookupStub";
+ } else if (class_linker_->IsJniDlsymLookupCriticalStub(addr)) {
+ return "JniDlsymLookupCriticalStub";
}
// Match the address against those that we saved from the boot OAT files.
if (entry_point_names_.find(addr) != entry_point_names_.end()) {