Skip to content

Commit f933961

Browse files
author
Daniel D. Daugherty
committed
8252980: comment only changes extracted from JDK-8247281
Reviewed-by: iklam, dholmes
1 parent 4333942 commit f933961

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

src/hotspot/share/runtime/objectMonitor.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -706,9 +706,6 @@ void ObjectMonitor::EnterI(TRAPS) {
706706

707707
assert(_owner == Self, "invariant");
708708
assert(object() != NULL, "invariant");
709-
// I'd like to write:
710-
// guarantee (((oop)(object()))->mark() == markWord::encode(this), "invariant") ;
711-
// but as we're at a safepoint that's not safe.
712709

713710
UnlinkAfterAcquire(Self, &node);
714711
if (_succ == Self) _succ = NULL;

src/hotspot/share/runtime/synchronizer.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1892,17 +1892,17 @@ ObjectMonitor* ObjectSynchronizer::inflate(Thread* self, oop object,
18921892
// CASE: stack-locked
18931893
// Could be stack-locked either by this thread or by some other thread.
18941894
//
1895-
// Note that we allocate the objectmonitor speculatively, _before_ attempting
1895+
// Note that we allocate the ObjectMonitor speculatively, _before_ attempting
18961896
// to install INFLATING into the mark word. We originally installed INFLATING,
1897-
// allocated the objectmonitor, and then finally STed the address of the
1898-
// objectmonitor into the mark. This was correct, but artificially lengthened
1899-
// the interval in which INFLATED appeared in the mark, thus increasing
1897+
// allocated the ObjectMonitor, and then finally STed the address of the
1898+
// ObjectMonitor into the mark. This was correct, but artificially lengthened
1899+
// the interval in which INFLATING appeared in the mark, thus increasing
19001900
// the odds of inflation contention.
19011901
//
1902-
// We now use per-thread private objectmonitor free lists.
1902+
// We now use per-thread private ObjectMonitor free lists.
19031903
// These list are reprovisioned from the global free list outside the
19041904
// critical INFLATING...ST interval. A thread can transfer
1905-
// multiple objectmonitors en-mass from the global free list to its local free list.
1905+
// multiple ObjectMonitors en-mass from the global free list to its local free list.
19061906
// This reduces coherency traffic and lock contention on the global free list.
19071907
// Using such local free lists, it doesn't matter if the om_alloc() call appears
19081908
// before or after the CAS(INFLATING) operation.
@@ -1912,7 +1912,7 @@ ObjectMonitor* ObjectSynchronizer::inflate(Thread* self, oop object,
19121912

19131913
if (mark.has_locker()) {
19141914
ObjectMonitor* m = om_alloc(self);
1915-
// Optimistically prepare the objectmonitor - anticipate successful CAS
1915+
// Optimistically prepare the ObjectMonitor - anticipate successful CAS
19161916
// We do this before the CAS in order to minimize the length of time
19171917
// in which INFLATING appears in the mark.
19181918
m->Recycle();

0 commit comments

Comments
 (0)