comparison src/share/vm/ci/ciEnv.cpp @ 12946:b8860472c377

8014910: deadlock between JVM/TI ClassPrepare event handler and CompilerThread Summary: Revert changes in JDK-8008962 Reviewed-by: coleenp, sspitsyn
author iklam
date Tue, 22 Oct 2013 14:29:02 -0700
parents 5cc2d82aa82a
children e2509677809c
comparison
equal deleted inserted replaced
12944:1327b7f85503 12946:b8860472c377
481 // The klass has not been inserted into the constant pool. 481 // The klass has not been inserted into the constant pool.
482 // Try to look it up by name. 482 // Try to look it up by name.
483 { 483 {
484 // We have to lock the cpool to keep the oop from being resolved 484 // We have to lock the cpool to keep the oop from being resolved
485 // while we are accessing it. 485 // while we are accessing it.
486 oop cplock = cpool->lock(); 486 MonitorLockerEx ml(cpool->lock());
487 ObjectLocker ol(cplock, THREAD, cplock != NULL);
488 constantTag tag = cpool->tag_at(index); 487 constantTag tag = cpool->tag_at(index);
489 if (tag.is_klass()) { 488 if (tag.is_klass()) {
490 // The klass has been inserted into the constant pool 489 // The klass has been inserted into the constant pool
491 // very recently. 490 // very recently.
492 klass = KlassHandle(THREAD, cpool->resolved_klass_at(index)); 491 klass = KlassHandle(THREAD, cpool->resolved_klass_at(index));