Add atomic method reference map
Less RAM usage and faster than using a normal map with
MethodReference. Speed is faster by avoiding locking and tree
traversal. RAM usage is lower since the map usually had a value
for most method references.
Plan on using for marking methods for dex2dex, storing compiled
methods. Also use the new map for VerifiedMethods (refactoring).
Added test.
Bug: 32641252
Test: test-art-host-run-test
Change-Id: I46268031b8e0daf9be3597145cf6ecf579a039e2
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index 9e6032f..91a32f9 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -1636,7 +1636,7 @@
soa.Decode<mirror::ClassLoader>(class_loader_).Ptr())));
// Pre-register dex files so that we can access verification results without locks during
// compilation and verification.
- verification_results_->PreRegisterDexFile(dex_file);
+ verification_results_->AddDexFile(dex_file);
}
return true;