summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2016-12-03 01:20:05 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2016-12-03 01:20:06 +0000
commit0480523e01102e40a072d266e43a18a0ca4344e4 (patch)
tree3d38b5a98764fd99d6c5de1a6e9c9509168baef4 /compiler
parentb487af4fc80ffabe0219657a9690be1316dab8e7 (diff)
parentcc1b5357f83f0b787d51fbfde3fe870c8a2fa050 (diff)
Merge "ART: Clean up ClassLinker"
Diffstat (limited to 'compiler')
-rw-r--r--compiler/image_writer.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc
index fb5560b124..7bb2bb71a9 100644
--- a/compiler/image_writer.cc
+++ b/compiler/image_writer.cc
@@ -433,7 +433,7 @@ void ImageWriter::PrepareDexCacheArraySlots() {
ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
Thread* const self = Thread::Current();
- ReaderMutexLock mu(self, *class_linker->DexLock());
+ ReaderMutexLock mu(self, *Locks::dex_lock_);
for (const ClassLinker::DexCacheData& data : class_linker->GetDexCachesData()) {
ObjPtr<mirror::DexCache> dex_cache =
ObjPtr<mirror::DexCache>::DownCast(self->DecodeJObject(data.weak_root));
@@ -884,7 +884,7 @@ void ImageWriter::PruneNonImageClasses() {
ScopedAssertNoThreadSuspension sa(__FUNCTION__);
ReaderMutexLock mu(self, *Locks::classlinker_classes_lock_); // For ClassInClassTable
- ReaderMutexLock mu2(self, *class_linker->DexLock());
+ ReaderMutexLock mu2(self, *Locks::dex_lock_);
for (const ClassLinker::DexCacheData& data : class_linker->GetDexCachesData()) {
if (self->IsJWeakCleared(data.weak_root)) {
continue;
@@ -1013,7 +1013,7 @@ ObjectArray<Object>* ImageWriter::CreateImageRoots(size_t oat_index) const {
// caches. We check that the number of dex caches does not change.
size_t dex_cache_count = 0;
{
- ReaderMutexLock mu(self, *class_linker->DexLock());
+ ReaderMutexLock mu(self, *Locks::dex_lock_);
// Count number of dex caches not in the boot image.
for (const ClassLinker::DexCacheData& data : class_linker->GetDexCachesData()) {
ObjPtr<mirror::DexCache> dex_cache =
@@ -1031,7 +1031,7 @@ ObjectArray<Object>* ImageWriter::CreateImageRoots(size_t oat_index) const {
hs.NewHandle(ObjectArray<Object>::Alloc(self, object_array_class.Get(), dex_cache_count)));
CHECK(dex_caches.Get() != nullptr) << "Failed to allocate a dex cache array.";
{
- ReaderMutexLock mu(self, *class_linker->DexLock());
+ ReaderMutexLock mu(self, *Locks::dex_lock_);
size_t non_image_dex_caches = 0;
// Re-count number of non image dex caches.
for (const ClassLinker::DexCacheData& data : class_linker->GetDexCachesData()) {