aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Coleen Phillimore <coleen.phillimore@oracle.com> 2021-06-24 08:56:24 -0400
committerGravatar Coleen Phillimore <coleen.phillimore@oracle.com> 2021-06-24 08:57:42 -0400
commit7950a6274dc2ff2e7efa40217cc24dcfb6b747a6 (patch)
tree9b064f7609d21e1c23ebd202c768cb4abd57e973
parente515873f887ce4071ab4878a4bafca8eea67afea (diff)
downloadjdk-pr/4584.tar.gz
jdk-pr/4584.zip
8269293: ObjectMonitor thread id fields should be 64 bits.pr/4584
-rw-r--r--src/hotspot/share/runtime/objectMonitor.cpp4
-rw-r--r--src/hotspot/share/runtime/objectMonitor.hpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/hotspot/share/runtime/objectMonitor.cpp b/src/hotspot/share/runtime/objectMonitor.cpp
index 05b9cb35b5e..42f9c668d25 100644
--- a/src/hotspot/share/runtime/objectMonitor.cpp
+++ b/src/hotspot/share/runtime/objectMonitor.cpp
@@ -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(" ...");
diff --git a/src/hotspot/share/runtime/objectMonitor.hpp b/src/hotspot/share/runtime/objectMonitor.hpp
index f100644540e..4f85c429b70 100644
--- a/src/hotspot/share/runtime/objectMonitor.hpp
+++ b/src/hotspot/share/runtime/objectMonitor.hpp
@@ -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.