|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jikesrvm.mm.mminterface.Handshake
public class Handshake
Handshake handles mutator requests to initiate a collection, and wait for a collection to complete. It implements the process of suspending all mutator threads executing in Java and starting all the GC threads (CollectorThreads) for the processors that will be participating in a collection. This may not be all processors, if we exclude those executing in native code. Because the threading strategy within RVM is currently under revision, the logic here is also changing and somewhat "messy".
CollectorThread| Field Summary | |
|---|---|
private int |
collectorThreadsParked
|
int |
gcTrigger
|
private Monitor |
lock
Instance variables |
protected boolean |
requestFlag
|
static int |
verbose
Class variables |
| Constructor Summary | |
|---|---|
Handshake()
|
|
| Method Summary | |
|---|---|
void |
boot()
|
(package private) void |
parkCollectorThread()
|
private boolean |
request(int why)
Called by mutators to request a garbage collection. |
void |
requestAndAwaitCompletion(int why)
Called by mutators to request a garbage collection and wait for it to complete. |
void |
requestAndContinue(int why)
Called by mutators to request an asynchronous garbage collection. |
void |
reset()
|
void |
waitForGCToFinish()
Call this if you know that a GC request has already been made and you'd like to wait on that GC to finish - presumably because you're trying to allocate and cannot reasonably do so before GC is done. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int verbose
private Monitor lock
protected boolean requestFlag
public int gcTrigger
private int collectorThreadsParked
| Constructor Detail |
|---|
public Handshake()
| Method Detail |
|---|
public void boot()
public void waitForGCToFinish()
public void requestAndAwaitCompletion(int why)
public void requestAndContinue(int why)
public void reset()
void parkCollectorThread()
private boolean request(int why)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||