8156500: Move Reference pending list into VM to prevent deadlocks

Move reference pending list and locking into VM

Co-authored-by: Per Liden <per.liden@oracle.com>
Reviewed-by: coleenp, dholmes, dcubed, mchung, plevart
This commit is contained in:
Kim Barrett 2016-08-30 23:48:16 -04:00
parent 4f55b6c7e0
commit 66706edf15
29 changed files with 133 additions and 576 deletions

View file

@ -30,7 +30,6 @@
#include "gc/shared/collectedHeap.inline.hpp"
#include "gc/shared/gcLocker.hpp"
#include "gc/shared/generation.hpp"
#include "gc/shared/referencePendingListLocker.hpp"
#include "interpreter/bytecodeStream.hpp"
#include "interpreter/bytecodeTracer.hpp"
#include "interpreter/bytecodes.hpp"
@ -400,12 +399,6 @@ void Method::build_interpreter_method_data(const methodHandle& method, TRAPS) {
return;
}
// Do not profile method if current thread holds the pending list lock,
// which avoids deadlock for acquiring the MethodData_lock.
if (ReferencePendingListLocker::is_locked_by_self()) {
return;
}
// Grab a lock here to prevent multiple
// MethodData*s from being created.
MutexLocker ml(MethodData_lock, THREAD);