Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
[GR-21996] [GR-22875] Add guarantee about neutral header.
Browse files Browse the repository at this point in the history
PullRequest: labsjdk-ce-11/98
  • Loading branch information
tkrodriguez committed Jun 25, 2020
2 parents c39db3a + 35985eb commit 7b3a617
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/share/runtime/synchronizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,7 @@ ObjectMonitor* ObjectSynchronizer::inflate(Thread * Self,
// object is in the mark. Furthermore the owner can't complete
// an unlock on the object, either.
markOop dmw = mark->displaced_mark_helper();
assert(dmw->is_neutral(), "invariant");
guarantee(dmw->is_neutral(), "displaced mark in " INTPTR_FORMAT "is not neutral " INTPTR_FORMAT, p2i(object), p2i(dmw));

// Setup monitor fields to proper values -- prepare the monitor
m->set_header(dmw);
Expand Down Expand Up @@ -1540,7 +1540,7 @@ ObjectMonitor* ObjectSynchronizer::inflate(Thread * Self,
// An inflateTry() method that we could call from fast_enter() and slow_enter()
// would be useful.

assert(mark->is_neutral(), "invariant");
guarantee(mark->is_neutral(), "mark in " INTPTR_FORMAT "is not neutral " INTPTR_FORMAT, p2i(object), p2i(mark));
ObjectMonitor * m = omAlloc(Self);
// prepare m for installation - set monitor to initial state
m->Recycle();
Expand Down

0 comments on commit 7b3a617

Please sign in to comment.