8312498: Thread::getState and JVM TI GetThreadState should return TIMED_WAITING virtual thread is timed parked

Reviewed-by: sspitsyn, rpressler
This commit is contained in:
Alan Bateman 2023-09-19 10:58:12 +00:00
parent 670b4567cf
commit 4461eeb31d
10 changed files with 823 additions and 183 deletions

View file

@ -521,20 +521,21 @@ class java_lang_VirtualThread : AllStatic {
JFR_ONLY(static int _jfr_epoch_offset;)
public:
enum {
NEW = 0,
STARTED = 1,
RUNNABLE = 2,
RUNNING = 3,
PARKING = 4,
PARKED = 5,
PINNED = 6,
YIELDING = 7,
TERMINATED = 99,
NEW = 0,
STARTED = 1,
RUNNABLE = 2,
RUNNING = 3,
PARKING = 4,
PARKED = 5,
PINNED = 6,
TIMED_PARKING = 7,
TIMED_PARKED = 8,
TIMED_PINNED = 9,
YIELDING = 10,
TERMINATED = 99,
// can be suspended from scheduling when unmounted
SUSPENDED = 1 << 8,
RUNNABLE_SUSPENDED = (RUNNABLE | SUSPENDED),
PARKED_SUSPENDED = (PARKED | SUSPENDED)
// additional state bits
SUSPENDED = 1 << 8, // suspended when unmounted
};
static void compute_offsets();