Merge "Check for data races when reading JIT/DEX entries."
am: 59c70a5b75
Change-Id: I64832ce6d28f0dd0c9036e48031ce3b9faae8dac
Cr-Mirrored-From: https://chromium.googlesource.com/aosp/platform/system/core
Cr-Mirrored-Commit: 9363485979e3d42d029b6206d61d1618168b79b8
diff --git a/UnwindStack.cpp b/UnwindStack.cpp
index f5f9b2a..ff19833 100644
--- a/UnwindStack.cpp
+++ b/UnwindStack.cpp
@@ -32,9 +32,6 @@
#include <unwindstack/Regs.h>
#include <unwindstack/RegsGetLocal.h>
-#if !defined(NO_LIBDEXFILE_SUPPORT)
-#include <unwindstack/DexFiles.h>
-#endif
#include <unwindstack/Unwinder.h>
#include "BacktraceLog.h"
@@ -50,14 +47,6 @@
regs, stack_map->process_memory());
unwinder.SetResolveNames(stack_map->ResolveNames());
stack_map->SetArch(regs->Arch());
- if (stack_map->GetJitDebug() != nullptr) {
- unwinder.SetJitDebug(stack_map->GetJitDebug(), regs->Arch());
- }
-#if !defined(NO_LIBDEXFILE_SUPPORT)
- if (stack_map->GetDexFiles() != nullptr) {
- unwinder.SetDexFiles(stack_map->GetDexFiles(), regs->Arch());
- }
-#endif
unwinder.Unwind(skip_names, &stack_map->GetSuffixesToIgnore());
if (error != nullptr) {
switch (unwinder.LastErrorCode()) {
diff --git a/UnwindStackMap.cpp b/UnwindStackMap.cpp
index 4518891..726fdfa 100644
--- a/UnwindStackMap.cpp
+++ b/UnwindStackMap.cpp
@@ -43,13 +43,6 @@
// Create the process memory object.
process_memory_ = unwindstack::Memory::CreateProcessMemory(pid_);
- // Create a JitDebug object for getting jit unwind information.
- std::vector<std::string> search_libs_{"libart.so", "libartd.so"};
- jit_debug_.reset(new unwindstack::JitDebug(process_memory_, search_libs_));
-#if !defined(NO_LIBDEXFILE_SUPPORT)
- dex_files_.reset(new unwindstack::DexFiles(process_memory_, search_libs_));
-#endif
-
if (!stack_maps_->Parse()) {
return false;
}
diff --git a/UnwindStackMap.h b/UnwindStackMap.h
index e19b605..9bb9709 100644
--- a/UnwindStackMap.h
+++ b/UnwindStackMap.h
@@ -27,9 +27,6 @@
#include <backtrace/Backtrace.h>
#include <backtrace/BacktraceMap.h>
-#if !defined(NO_LIBDEXFILE_SUPPORT)
-#include <unwindstack/DexFiles.h>
-#endif
#include <unwindstack/Elf.h>
#include <unwindstack/JitDebug.h>
#include <unwindstack/Maps.h>
@@ -53,12 +50,6 @@
const std::shared_ptr<unwindstack::Memory>& process_memory() { return process_memory_; }
- unwindstack::JitDebug* GetJitDebug() { return jit_debug_.get(); }
-
-#if !defined(NO_LIBDEXFILE_SUPPORT)
- unwindstack::DexFiles* GetDexFiles() { return dex_files_.get(); }
-#endif
-
void SetArch(unwindstack::ArchEnum arch) { arch_ = arch; }
protected:
@@ -66,11 +57,6 @@
std::unique_ptr<unwindstack::Maps> stack_maps_;
std::shared_ptr<unwindstack::Memory> process_memory_;
- std::unique_ptr<unwindstack::JitDebug> jit_debug_;
-#if !defined(NO_LIBDEXFILE_SUPPORT)
- std::unique_ptr<unwindstack::DexFiles> dex_files_;
-#endif
-
unwindstack::ArchEnum arch_ = unwindstack::ARCH_UNKNOWN;
};