org.jikesrvm.scheduler
Class TimerThread

java.lang.Object
  extended by org.jikesrvm.scheduler.SystemThread
      extended by org.jikesrvm.scheduler.TimerThread

public class TimerThread
extends SystemThread

The timer thread. Although we are using purely native threading, threads need to occasionally be poked for the purposes of sampling and OSR.

It should be noted that the implementation of this class prioritizes unobtrusiveness and lock-freedom over precision. For example, on any given timer release some threads may be missed or poked more than once, with the understanding that if they are missed on one release then they will (with high probability) not be missed on a future release.

It may be that to make the system scale, more than one timer thread will be needed. But for now, this should suffice.


Field Summary
private static int verbose
           
 
Fields inherited from class org.jikesrvm.scheduler.SystemThread
rvmThread
 
Constructor Summary
TimerThread()
           
 
Method Summary
private static void printExceptionAndDie(Throwable e)
           
 void run()
           
 
Methods inherited from class org.jikesrvm.scheduler.SystemThread
getRVMThread, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

verbose

private static final int verbose
See Also:
Constant Field Values
Constructor Detail

TimerThread

public TimerThread()
Method Detail

run

public void run()
Specified by:
run in class SystemThread

printExceptionAndDie

private static void printExceptionAndDie(Throwable e)