8269293: ObjectMonitor thread id fields should be 64 bits.

Reviewed-by: mgronlun, dcubed
This commit is contained in:
Coleen Phillimore 2021-06-24 19:34:17 +00:00
parent 2fd7943ec1
commit 42968db173
2 changed files with 5 additions and 5 deletions

View File

@ -1431,7 +1431,7 @@ bool ObjectMonitor::check_owner(TRAPS) {
static void post_monitor_wait_event(EventJavaMonitorWait* event,
ObjectMonitor* monitor,
jlong notifier_tid,
uint64_t notifier_tid,
jlong timeout,
bool timedout) {
assert(event != NULL, "invariant");
@ -2243,7 +2243,7 @@ void ObjectMonitor::print_debug_style_on(outputStream* st) const {
st->print_cr(" [%d] = '\\0'", (int)sizeof(_pad_buf0) - 1);
st->print_cr(" }");
st->print_cr(" _owner = " INTPTR_FORMAT, p2i(owner_raw()));
st->print_cr(" _previous_owner_tid = " INTPTR_FORMAT, _previous_owner_tid);
st->print_cr(" _previous_owner_tid = " UINT64_FORMAT, _previous_owner_tid);
st->print_cr(" _pad_buf1 = {");
st->print_cr(" [0] = '\\0'");
st->print_cr(" ...");

View File

@ -47,7 +47,7 @@ class ObjectWaiter : public StackObj {
ObjectWaiter* volatile _next;
ObjectWaiter* volatile _prev;
JavaThread* _thread;
jlong _notifier_tid;
uint64_t _notifier_tid;
ParkEvent * _event;
volatile int _notified;
volatile TStates TState;
@ -148,13 +148,13 @@ class ObjectMonitor : public CHeapObj<mtInternal> {
// Used by async deflation as a marker in the _owner field:
#define DEFLATER_MARKER reinterpret_cast<void*>(-1)
void* volatile _owner; // pointer to owning thread OR BasicLock
volatile uintptr_t _previous_owner_tid; // thread id of the previous owner of the monitor
volatile uint64_t _previous_owner_tid; // thread id of the previous owner of the monitor
// Separate _owner and _next_om on different cache lines since
// both can have busy multi-threaded access. _previous_owner_tid is only
// changed by ObjectMonitor::exit() so it is a good choice to share the
// cache line with _owner.
DEFINE_PAD_MINUS_SIZE(1, OM_CACHE_LINE_SIZE, sizeof(void* volatile) +
sizeof(volatile uintptr_t));
sizeof(volatile uint64_t));
ObjectMonitor* _next_om; // Next ObjectMonitor* linkage
volatile intx _recursions; // recursion count, 0 for first entry
ObjectWaiter* volatile _EntryList; // Threads blocked on entry or reentry.