Skip to content

Commit e1d1a11

Browse files
committed
8307392: [Lilliput] Revert deflation of dead object's monitors
Reviewed-by: shade
1 parent b55b924 commit e1d1a11

File tree

4 files changed

+0
-21
lines changed

4 files changed

+0
-21
lines changed

src/hotspot/share/gc/shared/oopStorage.inline.hpp

-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030
#include "memory/allocation.hpp"
3131
#include "oops/oop.hpp"
32-
#include "runtime/objectMonitor.hpp"
3332
#include "runtime/safepoint.hpp"
3433
#include "utilities/align.hpp"
3534
#include "utilities/count_trailing_zeros.hpp"
@@ -263,7 +262,6 @@ class OopStorage::IfAliveFn {
263262
if (_is_alive->do_object_b(v)) {
264263
result = _f(ptr);
265264
} else {
266-
ObjectMonitor::maybe_deflate_dead(ptr);
267265
*ptr = nullptr; // Clear dead value.
268266
}
269267
}

src/hotspot/share/gc/shared/weakProcessor.inline.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ class WeakProcessor::CountingClosure : public Closure {
6565
_keep_alive->do_oop(p);
6666
++_live;
6767
} else {
68-
ObjectMonitor::maybe_deflate_dead(p);
6968
*p = nullptr;
7069
++_new_dead;
7170
}

src/hotspot/share/runtime/objectMonitor.cpp

-16
Original file line numberDiff line numberDiff line change
@@ -600,22 +600,6 @@ bool ObjectMonitor::deflate_monitor() {
600600
return true; // Success, ObjectMonitor has been deflated.
601601
}
602602

603-
// We might access the dead object headers for parsable heap walk, make sure
604-
// headers are in correct shape, e.g. monitors deflated.
605-
void ObjectMonitor::maybe_deflate_dead(oop* p) {
606-
oop obj = *p;
607-
assert(obj != NULL, "must not yet been cleared");
608-
markWord mark = obj->mark();
609-
if (mark.has_monitor()) {
610-
ObjectMonitor* monitor = mark.monitor();
611-
if (p == monitor->_object.ptr_raw()) {
612-
assert(monitor->object_peek() == obj, "lock object must match");
613-
markWord dmw = monitor->header();
614-
obj->set_mark(dmw);
615-
}
616-
}
617-
}
618-
619603
// Install the displaced mark word (dmw) of a deflating ObjectMonitor
620604
// into the header of the object associated with the monitor. This
621605
// idempotent method is called by a thread that is deflating a

src/hotspot/share/runtime/objectMonitor.hpp

-2
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,6 @@ class ObjectMonitor : public CHeapObj<mtObjectMonitor> {
343343
// Use the following at your own risk
344344
intx complete_exit(JavaThread* current);
345345

346-
static void maybe_deflate_dead(oop* p);
347-
348346
private:
349347
void AddWaiter(ObjectWaiter* waiter);
350348
void INotify(JavaThread* current);

0 commit comments

Comments
 (0)