From 2cd334ae2d4287216523882f0d298cf3901b7ab1 Mon Sep 17 00:00:00 2001 From: Hiroshi Yamauchi Date: Fri, 9 Jan 2015 14:03:35 -0800 Subject: More of the concurrent copying collector. Bug: 12687968 Change-Id: I62f70274d47df6d6cab714df95c518b750ce3105 --- runtime/runtime.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'runtime/runtime.h') diff --git a/runtime/runtime.h b/runtime/runtime.h index d58fe3c..c5a8739 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -43,6 +43,9 @@ namespace art { namespace gc { class Heap; + namespace collector { + class GarbageCollector; + } // namespace collector } // namespace gc namespace mirror { class ArtMethod; @@ -58,6 +61,7 @@ namespace verifier { class MethodVerifier; } // namespace verifier class ClassLinker; +class Closure; class DexFile; class InternTable; class JavaVMExt; @@ -270,8 +274,9 @@ class Runtime { return "2.1.0"; } - void DisallowNewSystemWeaks() EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_); + void DisallowNewSystemWeaks() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); void AllowNewSystemWeaks() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + void EnsureNewSystemWeaksDisallowed() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); // Visit all the roots. If only_dirty is true then non-dirty roots won't be visited. If // clean_dirty is true then dirty roots will be marked as non-dirty after visiting. @@ -287,6 +292,17 @@ class Runtime { void VisitNonThreadRoots(RootCallback* visitor, void* arg) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + void VisitTransactionRoots(RootCallback* visitor, void* arg) + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + + // Visit all of the thread roots. + void VisitThreadRoots(RootCallback* visitor, void* arg) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + + // Flip thread roots from from-space refs to to-space refs. + size_t FlipThreadRoots(Closure* thread_flip_visitor, Closure* flip_callback, + gc::collector::GarbageCollector* collector) + LOCKS_EXCLUDED(Locks::mutator_lock_); + // Visit all other roots which must be done with mutators suspended. void VisitNonConcurrentRoots(RootCallback* visitor, void* arg) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); -- cgit v1.1