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

@ -259,8 +259,7 @@ JvmtiEnv::RetransformClasses(jint class_count, const jclass* classes) {
// bytes to the InstanceKlass here because they have not been
// validated and we're not at a safepoint.
constantPoolHandle constants(current_thread, ikh->constants());
oop cplock = constants->lock();
ObjectLocker ol(cplock, current_thread, cplock != NULL); // lock constant pool while we query it
MonitorLockerEx ml(constants->lock()); // lock constant pool while we query it
JvmtiClassFileReconstituter reconstituter(ikh);
if (reconstituter.get_error() != JVMTI_ERROR_NONE) {
@ -2418,8 +2417,7 @@ JvmtiEnv::GetConstantPool(oop k_mirror, jint* constant_pool_count_ptr, jint* con
instanceKlassHandle ikh(thread, k_oop);
constantPoolHandle constants(thread, ikh->constants());
oop cplock = constants->lock();
ObjectLocker ol(cplock, thread, cplock != NULL); // lock constant pool while we query it
MonitorLockerEx ml(constants->lock()); // lock constant pool while we query it
JvmtiConstantPoolReconstituter reconstituter(ikh);
if (reconstituter.get_error() != JVMTI_ERROR_NONE) {