|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object joeq.Scheduler.jq_NativeThread
public class jq_NativeThread
A jq_NativeThread corresponds to a virtual CPU in the scheduler. There is one jq_NativeThread object for each underlying (heavyweight) kernel thread. The Java (lightweight) threads are multiplexed across the jq_NativeThreads.
Field Summary | |
---|---|
static jq_Class |
_class
|
static jq_StaticMethod |
_ctrl_break_handler
|
static jq_InstanceMethod |
_nativeThreadEntry
|
static jq_StaticField |
_num_of_daemon_threads
|
static jq_StaticField |
_num_of_java_threads
|
static jq_InstanceMethod |
_schedulerLoop
|
static jq_InstanceMethod |
_threadSwitch
|
static boolean |
CHECK
|
boolean |
DETERMINISTIC
|
static int[] |
DISTRIBUTION
|
static jq_NativeThread |
initial_native_thread
Data structure to represent the native thread that exists at virtual machine startup. |
jq_InterrupterThread |
it
|
static int |
MAX_NATIVE_THREADS
|
static jq_NativeThread[] |
native_threads
An array of all native threads. |
static int |
NUM_OF_QUEUES
|
static int |
relatively_prime_value
GCD of relatively_prime_value and the maximum value in DISTRIBUTION should be 1. |
static boolean |
STATISTICS
|
static boolean |
TRACE
Trace flag. |
static float |
TRANSFER_THRESHOLD
|
static boolean |
USE_INTERRUPTER_THREAD
|
Method Summary | |
---|---|
static boolean |
allNativeThreadsInitialized()
Returns true iff all native threads are initialized. |
static void |
ctrl_break_handler()
|
void |
dump(jq_RegisterState regs)
|
static void |
dumpAllThreads()
|
static void |
dumpStatistics()
|
void |
dumpStats()
|
static void |
endCurrentJavaThread()
End the currently-executing Java thread and go back to the scheduler loop to pick up another thread. |
CodeAllocator |
getCodeAllocator()
Get the native thread-local code allocator. |
boolean |
getContext(jq_RegisterState r)
Gets context of this native thread and puts it in r. |
jq_Thread |
getCurrentJavaThread()
Get the currently-executing Java thread. |
jq_Thread |
getCurrentThread()
Returns the jq_Thread that is currently running on this native thread. |
HeapAllocator |
getHeapAllocator()
Get the native thread-local heap allocator. |
jq_ThreadQueue |
getIdleQueue()
|
int |
getIndex()
|
jq_ThreadQueue |
getReadyQueue(int i)
|
jq_ThreadQueue |
getTransferQueue()
|
static void |
initBreakThread()
|
static void |
initInitialNativeThread()
Initialize the initial native thread. |
static void |
initNativeThreads(jq_NativeThread nt,
int num)
Initialize the extra native threads. |
void |
nativeThreadEntry()
The entry point for new native threads. |
void |
resume()
Starts up/resumes this native thread. |
static void |
resumeAllThreads()
|
void |
schedulerLoop()
|
boolean |
setContext(jq_RegisterState r)
Sets context of this native thread to r. |
static void |
startJavaThread(jq_Thread t)
Put the given Java thread on the queue of the least-busy native thread. |
static void |
startNativeThreads()
Start up the extra native threads. |
void |
suspend()
Suspends this native thread. |
static void |
suspendAllThreads()
|
void |
threadSwitch()
Thread switch based on a timer or poker interrupt. |
String |
toString()
|
void |
yieldCurrentThread()
Thread switch based on explicit yield. |
void |
yieldCurrentThreadTo(jq_Thread t)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static boolean TRACE
public static boolean CHECK
public static final boolean STATISTICS
public static final jq_NativeThread initial_native_thread
public static jq_NativeThread[] native_threads
public static final int MAX_NATIVE_THREADS
public static final int NUM_OF_QUEUES
public static boolean USE_INTERRUPTER_THREAD
public jq_InterrupterThread it
public static float TRANSFER_THRESHOLD
public boolean DETERMINISTIC
public static final int relatively_prime_value
public static final int[] DISTRIBUTION
public static final jq_Class _class
public static final jq_InstanceMethod _nativeThreadEntry
public static final jq_InstanceMethod _schedulerLoop
public static final jq_InstanceMethod _threadSwitch
public static final jq_StaticMethod _ctrl_break_handler
public static final jq_StaticField _num_of_java_threads
public static final jq_StaticField _num_of_daemon_threads
Method Detail |
---|
public static void initInitialNativeThread()
public static void initNativeThreads(jq_NativeThread nt, int num)
nt
- initial native threadnum
- number of native threads to initializepublic static void startNativeThreads()
public static boolean allNativeThreadsInitialized()
public jq_Thread getCurrentThread()
public CodeAllocator getCodeAllocator()
public HeapAllocator getHeapAllocator()
public jq_Thread getCurrentJavaThread()
public void resume()
public void suspend()
public boolean getContext(jq_RegisterState r)
public boolean setContext(jq_RegisterState r)
public static void startJavaThread(jq_Thread t)
public static void endCurrentJavaThread()
public void nativeThreadEntry()
public void schedulerLoop()
public static void dumpStatistics()
public void dumpStats()
public void threadSwitch()
public void yieldCurrentThread()
public void yieldCurrentThreadTo(jq_Thread t)
public String toString()
toString
in class Object
public int getIndex()
public static void ctrl_break_handler()
public static void dumpAllThreads()
public static void initBreakThread()
public static void suspendAllThreads()
public static void resumeAllThreads()
public void dump(jq_RegisterState regs)
public jq_ThreadQueue getReadyQueue(int i)
public jq_ThreadQueue getIdleQueue()
public jq_ThreadQueue getTransferQueue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |