| Operation |
x86 Instruction Count |
O/S operations
|
| Start thread |
From 50 to 53
|
| Thread death
x is the number of threads joined to the dying thread |
From 123 + 51x
To 137 + 54x
|
| Context Switching
|
No context switch occurs |
Context switch occurs |
| Switch context, when:
- entering a monitor already entered
- pending a semaphore that is unavailable
- sleeping for a specified time
- yielding to threads of equal or higher priority
|
Not applicable |
43
|
| Switch context if a higher priority thread is ready to run, when:
- exiting a monitor that has threads waiting to enter
- posting a semaphore that has threads pending the semaphore
- resetting a thread's priority
- interrupting a sleeping thread
- notifying a monitor
- yielding to higher priority threads
|
15 |
55 |
| Switch context only if necessary, at the end of an interrupt, if a higher priority thread is ready to run |
32 |
69 |
| Switch context as scheduled due to a clock tick |
49
|
82
|
| Switch context only if necessary, at the end of an interrupt, if a higher priority thread is ready to run, while awakening threads
x is the number of awakened sleeping threads, y is the number of threads awakened from waiting on a monitor |
From 47 + 81x + 67y
To 72 + 94x + 104y
|
From 86 + 81x + 67y
To 111 + 94x + 104y
|
| Switch context as scheduled due to a clock tick, while awakening threads
x is the number of awakened sleeping threads, y is the number of threads awakened from waiting on a monitor |
From 64 + 81x + 67y
To 89 + 94x + 104y
|
From 97 + 81x + 67y
To 122 + 94x + 104y
|
JVM-specific operations
|
| Add string to UTF8 string table |
17 |
| Add string to unicode string table |
6 |
| Reserve entry in class table for new class
x is the number of contiguous occupied class table slots scanned
|
48 + 20x
|
| Add unprepared class load structure to class table entry |
4 |
| Add prepared class load structure to class table entry |
7 |
| Add class instance structure to class table, if not done when class load structure added |
3 |
| Resolution of constant pool class entry when first accessed |
7 |
| Resolution of constant pool field entry when first accessed |
8 |
| Resolution of constant pool method entry when first accessed |
9 |
| Resolution of constant pool interface method entry when first accessed |
8 |
| Read java instruction that can be replaced with faster counterpart before replacement |
5 |
| Replace java instruction with faster counterpart |
2 byte instruction 4,
3 byte instruction 8,
5 byte instrution 22 |