--- a/src/hotspot/share/code/vtableStubs.cpp Wed Dec 05 17:33:01 2018 +0000
+++ b/src/hotspot/share/code/vtableStubs.cpp Wed Dec 05 15:57:26 2018 +0100
@@ -124,7 +124,7 @@
void VtableStubs::initialize() {
VtableStub::_receiver_location = SharedRuntime::name_for_receiver();
{
- MutexLocker ml(VtableStubs_lock);
+ MutexLockerEx ml(VtableStubs_lock, Mutex::_no_safepoint_check_flag);
assert(_number_of_vtable_stubs == 0, "potential performance bug: VtableStubs initialized more than once");
assert(is_power_of_2(N), "N must be a power of 2");
for (int i = 0; i < N; i++) {
@@ -247,7 +247,7 @@
VtableStub* VtableStubs::lookup(bool is_vtable_stub, int vtable_index) {
- MutexLocker ml(VtableStubs_lock);
+ MutexLockerEx ml(VtableStubs_lock, Mutex::_no_safepoint_check_flag);
unsigned hash = VtableStubs::hash(is_vtable_stub, vtable_index);
VtableStub* s = _table[hash];
while( s && !s->matches(is_vtable_stub, vtable_index)) s = s->next();
@@ -256,7 +256,7 @@
void VtableStubs::enter(bool is_vtable_stub, int vtable_index, VtableStub* s) {
- MutexLocker ml(VtableStubs_lock);
+ MutexLockerEx ml(VtableStubs_lock, Mutex::_no_safepoint_check_flag);
assert(s->matches(is_vtable_stub, vtable_index), "bad vtable stub");
unsigned int h = VtableStubs::hash(is_vtable_stub, vtable_index);
// enter s at the beginning of the corresponding list
@@ -266,7 +266,7 @@
}
VtableStub* VtableStubs::entry_point(address pc) {
- MutexLocker ml(VtableStubs_lock);
+ MutexLockerEx ml(VtableStubs_lock, Mutex::_no_safepoint_check_flag);
VtableStub* stub = (VtableStub*)(pc - VtableStub::entry_offset());
uint hash = VtableStubs::hash(stub->is_vtable_stub(), stub->index());
VtableStub* s;