8014910: deadlock between JVM/TI ClassPrepare event handler and CompilerThread

Revert changes in JDK-8008962

Reviewed-by: coleenp, sspitsyn
This commit is contained in:
Ioi Lam 2013-10-22 14:29:02 -07:00
parent 9fca48316e
commit 0e4eda601c
7 changed files with 42 additions and 53 deletions

View file

@ -483,8 +483,7 @@ ciKlass* ciEnv::get_klass_by_index_impl(constantPoolHandle cpool,
{
// We have to lock the cpool to keep the oop from being resolved
// while we are accessing it.
oop cplock = cpool->lock();
ObjectLocker ol(cplock, THREAD, cplock != NULL);
MonitorLockerEx ml(cpool->lock());
constantTag tag = cpool->tag_at(index);
if (tag.is_klass()) {
// The klass has been inserted into the constant pool