Create list of open dex files for libbacktrace.

This fixes unwinds after recent changes (oob apks; cdex data sharing).

Bug: 72520014
Test: m test-art-host-gtest
Change-Id: Ie2a02657b2afbe899acd2e61f0a57d207e688b99
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc
index 2c62095..17b94d3 100644
--- a/compiler/jit/jit_compiler.cc
+++ b/compiler/jit/jit_compiler.cc
@@ -76,7 +76,7 @@
     const ArrayRef<mirror::Class*> types_array(types, count);
     std::vector<uint8_t> elf_file = debug::WriteDebugElfFileForClasses(
         kRuntimeISA, jit_compiler->GetCompilerDriver()->GetInstructionSetFeatures(), types_array);
-    MutexLock mu(Thread::Current(), g_jit_debug_mutex);
+    MutexLock mu(Thread::Current(), *Locks::native_debug_interface_lock_);
     CreateJITCodeEntry(std::move(elf_file));
   }
 }
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 47ef194..b3f23a0 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -1410,7 +1410,7 @@
       GetCompilerDriver()->GetInstructionSetFeatures(),
       mini_debug_info,
       ArrayRef<const debug::MethodDebugInfo>(&info, 1));
-  MutexLock mu(Thread::Current(), g_jit_debug_mutex);
+  MutexLock mu(Thread::Current(), *Locks::native_debug_interface_lock_);
   JITCodeEntry* entry = CreateJITCodeEntry(elf_file);
   IncrementJITCodeEntryRefcount(entry, info.code_address);