public class Collection extends Collection
| Modifier and Type | Field and Description |
|---|---|
private static RVMThread.SoftHandshakeVisitor |
mutatorFlushVisitor |
EXTERNAL_GC_TRIGGER, INTERNAL_GC_TRIGGER, INTERNAL_PHASE_GC_TRIGGER, RESOURCE_GC_TRIGGER, TRIGGER_REASONS, triggerReasons, UNKNOWN_GC_TRIGGER| Constructor and Description |
|---|
Collection() |
| Modifier and Type | Method and Description |
|---|---|
void |
blockForGC()
Block for the garbage collector.
|
int |
getActiveThreads() |
int |
getDefaultThreads() |
void |
outOfMemory()
Fail with an out of memory error.
|
void |
prepareMutator(MutatorContext m)
Prepare a mutator for collection.
|
void |
requestMutatorFlush()
Request each mutator flush remembered sets.
|
void |
resumeAllMutators()
Resume all mutators blocked for GC.
|
static void |
scheduleFinalizerThread()
Schedule the finalizerThread, if there are objects to be
finalized and the finalizerThread is on its queue (ie. currently
idle).
|
void |
spawnCollectorContext(CollectorContext context)
Spawns a thread to execute the supplied collector context.
|
void |
stopAllMutators()
Stop all mutator threads.
|
private static RVMThread.SoftHandshakeVisitor mutatorFlushVisitor
public Collection()
public void spawnCollectorContext(CollectorContext context)
spawnCollectorContext in class Collectioncontext - the context to executepublic int getDefaultThreads()
getDefaultThreads in class Collectionpublic int getActiveThreads()
getActiveThreads in class Collectionpublic void blockForGC()
CollectionblockForGC in class Collectionpublic void outOfMemory()
outOfMemory in class Collectionpublic final void prepareMutator(MutatorContext m)
CollectionprepareMutator in class Collectionm - the mutator to preparepublic void stopAllMutators()
CollectionFixpoint until there are no threads that we haven't blocked. Fixpoint is needed to catch the (unlikely) case that a thread spawns another thread while we are waiting.
stopAllMutators in class Collectionpublic void resumeAllMutators()
CollectionresumeAllMutators in class Collectionpublic void requestMutatorFlush()
CollectionrequestMutatorFlush in class Collectionpublic static void scheduleFinalizerThread()