OSDN Git Service

Shard classloader classes lock
authorMathieu Chartier <mathieuc@google.com>
Tue, 5 Apr 2016 21:36:57 +0000 (14:36 -0700)
committerMathieu Chartier <mathieuc@google.com>
Tue, 5 Apr 2016 23:10:55 +0000 (16:10 -0700)
commit1609e3a42051769f4a8be3b6731e7bb2f828b3bb
tree62f33befd42f6109931e003742fe3ab03ff3c74b
parent657887ebcd26cf0eae7c40d8ea35bd33186903e7
Shard classloader classes lock

Used to guard adding and removing classes.

Previously we used the class linker classes lock, but this had
a deadlock issue since the reference processor may need to acquire
the lock to mark the classes of a class loader. Another thread could
be blocked trying to access weak globals while also holding the
class linker classes lock.

Bug: 27946564
Change-Id: If7c13e8775f0912e104d1382eacdba7e7edf6818
runtime/base/mutex.h
runtime/class_table-inl.h
runtime/class_table.cc
runtime/class_table.h
runtime/instrumentation.cc
runtime/mirror/class_loader-inl.h