summaryrefslogtreecommitdiff
path: root/runtime/java_vm_ext.cc
diff options
context:
space:
mode:
author Hiroshi Yamauchi <yamauchi@google.com> 2015-09-02 16:16:58 -0700
committer Hiroshi Yamauchi <yamauchi@google.com> 2015-09-03 10:45:21 -0700
commitfdbd13c7af91a042eda753e436eeebf0e1937250 (patch)
treec1fb370c9a4a30b9e589802c9c75dcc4919fc6e9 /runtime/java_vm_ext.cc
parentfe3879e6011f629d0dd6b04fab00b9496bd4ea08 (diff)
Some fixes for the CC collector.
- Remove a DCHECK in DisableMarkingCheckpoint, which caused occasional (false) failures. - Check the thread-local GetWeakRefAccessEnabled in boxed lambdas weak access. - Add missing BroadcastForNewAllocationRecords and BroadcastForNewWeakBoxedLambdas. The lack of the former caused occasional deadlocks in the ddmc test. - Remove the 'ensure system weaks disallowed' calls, which weren't useful and dead. Bug: 12687968 Change-Id: I33850c8d12e6e1a3aed1c2bb18eba263cbab76e8
Diffstat (limited to 'runtime/java_vm_ext.cc')
-rw-r--r--runtime/java_vm_ext.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/runtime/java_vm_ext.cc b/runtime/java_vm_ext.cc
index 8060e3dff0..b1c5cf0465 100644
--- a/runtime/java_vm_ext.cc
+++ b/runtime/java_vm_ext.cc
@@ -541,6 +541,7 @@ void JavaVMExt::DumpForSigQuit(std::ostream& os) {
}
void JavaVMExt::DisallowNewWeakGlobals() {
+ CHECK(!kUseReadBarrier);
Thread* const self = Thread::Current();
MutexLock mu(self, weak_globals_lock_);
// DisallowNewWeakGlobals is only called by CMS during the pause. It is required to have the
@@ -551,19 +552,13 @@ void JavaVMExt::DisallowNewWeakGlobals() {
}
void JavaVMExt::AllowNewWeakGlobals() {
+ CHECK(!kUseReadBarrier);
Thread* self = Thread::Current();
MutexLock mu(self, weak_globals_lock_);
allow_accessing_weak_globals_.StoreSequentiallyConsistent(true);
weak_globals_add_condition_.Broadcast(self);
}
-void JavaVMExt::EnsureNewWeakGlobalsDisallowed() {
- // Lock and unlock once to ensure that no threads are still in the
- // middle of adding new weak globals.
- MutexLock mu(Thread::Current(), weak_globals_lock_);
- CHECK(!allow_accessing_weak_globals_.LoadSequentiallyConsistent());
-}
-
void JavaVMExt::BroadcastForNewWeakGlobals() {
CHECK(kUseReadBarrier);
Thread* self = Thread::Current();