< prev index next >

src/hotspot/share/code/vtableStubs.cpp

 
 
 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++) {
       _table[i] = NULL;
     }

@@ -245,30 +245,30 return (is_vtable_stub ? ~hash : hash) & mask; } 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(); return s; } 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 s->set_next(_table[h]); _table[h] = s; _number_of_vtable_stubs++; } 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; for (s = _table[hash]; s != NULL && s != stub; s = s->next()) {} return (s == stub) ? s : NULL;
< prev index next >