Use generic name for JNI trampolines.
JNI trampolines tend to be deduplicated which seems to lead to confusion.
Bug: 32949969
Test: test.py -b --host -r -t 137-cfi
Change-Id: Ic39998448a05f98fc1e068c4f384f35085121911
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 795c367..f4bf11d 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -1313,7 +1313,7 @@
const auto* method_header = reinterpret_cast<const OatQuickMethodHeader*>(code);
const uintptr_t code_address = reinterpret_cast<uintptr_t>(method_header->GetCode());
debug::MethodDebugInfo info = {};
- DCHECK(info.custom_name.empty());
+ info.custom_name = "art_jni_trampoline";
info.dex_file = dex_file;
info.class_def_index = class_def_idx;
info.dex_method_index = method_idx;
diff --git a/dex2oat/linker/oat_writer.cc b/dex2oat/linker/oat_writer.cc
index c392177..6b23883 100644
--- a/dex2oat/linker/oat_writer.cc
+++ b/dex2oat/linker/oat_writer.cc
@@ -1349,7 +1349,7 @@
// Record debug information for this function if we are doing that.
debug::MethodDebugInfo& info = writer_->method_info_[debug_info_idx];
- DCHECK(info.custom_name.empty());
+ info.custom_name = (access_flags & kAccNative) ? "art_jni_trampoline" : "";
info.dex_file = method_ref.dex_file;
info.class_def_index = class_def_index;
info.dex_method_index = method_ref.index;