diff options
author | 2015-11-11 23:45:34 -0800 | |
---|---|---|
committer | 2015-11-13 15:21:29 -0800 | |
commit | 04302dbb106d590ff72c0dfecda23d85b6565059 (patch) | |
tree | 2fe66e258de36bcebc913d48e04468b7c639578f /runtime/java_vm_ext.h | |
parent | 0e06a0989f4fc53e0d281a5a2cb5b5a17feaea0c (diff) |
Fix class unloading with the CC collector.
Avoid unnecessarily decoding dex cache and class loader weak roots,
which would trigger read barriers.
Re-enable 141-class-unload with the CC collector.
Bug: 12687968
Bug: 24468364
Change-Id: Ib4c19f25000873cab0e06047040442d135285745
Diffstat (limited to 'runtime/java_vm_ext.h')
-rw-r--r-- | runtime/java_vm_ext.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/java_vm_ext.h b/runtime/java_vm_ext.h index c1fbdc0389..618f6faad5 100644 --- a/runtime/java_vm_ext.h +++ b/runtime/java_vm_ext.h @@ -149,6 +149,11 @@ class JavaVMExt : public JavaVM { SHARED_REQUIRES(Locks::mutator_lock_) REQUIRES(!weak_globals_lock_); + // Checks if the weak global ref has been cleared by the GC without decode (read barrier.) + bool IsWeakGlobalCleared(Thread* self, IndirectRef ref) + SHARED_REQUIRES(Locks::mutator_lock_) + REQUIRES(!weak_globals_lock_); + Mutex& WeakGlobalsLock() RETURN_CAPABILITY(weak_globals_lock_) { return weak_globals_lock_; } |