summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2021-06-16 18:29:49 +0000
committerChristopher Ferris <cferris@google.com>2021-06-16 23:49:14 +0000
commit7cb7fd05e3e02c0473fda317c11080e21bfa882e (patch)
tree1e96a1253f1835e1f32d00a89a68705227aa46d1
parentd03d88dc970cf5414ebeeeb7e2d1266d9dd81a87 (diff)
downloadunwinding-7cb7fd05e3e02c0473fda317c11080e21bfa882e.tar.gz
Remove CheckDexSupport check.
The dex file support is being statically linked in to the library so the check to verify the shared library can be loaded is not necessary. Bug: 191276623 Test: All unit tests pass on host and device. Change-Id: I7e14b2068e4f9b66be4bd02ba14860307b7eafb3 Merged-In: I7e14b2068e4f9b66be4bd02ba14860307b7eafb3 (cherry picked from commit fe0339021348c6aa034d06dbda3dc1a513f447a5)
-rw-r--r--libunwindstack/DexFile.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/libunwindstack/DexFile.cpp b/libunwindstack/DexFile.cpp
index e576354..15a814d 100644
--- a/libunwindstack/DexFile.cpp
+++ b/libunwindstack/DexFile.cpp
@@ -39,14 +39,6 @@ namespace unwindstack {
std::map<DexFile::MappedFileKey, std::weak_ptr<DexFile::DexFileApi>> DexFile::g_mapped_dex_files;
std::mutex DexFile::g_lock;
-static bool CheckDexSupport() {
- if (std::string err_msg; !art_api::dex::TryLoadLibdexfile(&err_msg)) {
- ALOGW("Failed to initialize DEX file support: %s", err_msg.c_str());
- return false;
- }
- return true;
-}
-
std::shared_ptr<DexFile> DexFile::CreateFromDisk(uint64_t addr, uint64_t size, MapInfo* map) {
if (map == nullptr || map->name().empty()) {
return nullptr; // MapInfo not backed by file.
@@ -85,8 +77,7 @@ std::shared_ptr<DexFile> DexFile::CreateFromDisk(uint64_t addr, uint64_t size, M
std::shared_ptr<DexFile> DexFile::Create(uint64_t base_addr, uint64_t file_size, Memory* memory,
MapInfo* info) {
- static bool has_dex_support = CheckDexSupport();
- if (!has_dex_support || file_size == 0) {
+ if (file_size == 0) {
return nullptr;
}