Mercurial > hg > graal-jvmci-8
comparison src/share/vm/prims/jvmtiEnv.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 | c115fac239eb |
children | 096c224171c4 e4062d6c5f22 997fd9660dd5 |
comparison
equal
deleted
inserted
replaced
12944:1327b7f85503 | 12946:b8860472c377 |
---|---|
257 // Not cached, we need to reconstitute the class file from the | 257 // Not cached, we need to reconstitute the class file from the |
258 // VM representation. We don't attach the reconstituted class | 258 // VM representation. We don't attach the reconstituted class |
259 // bytes to the InstanceKlass here because they have not been | 259 // bytes to the InstanceKlass here because they have not been |
260 // validated and we're not at a safepoint. | 260 // validated and we're not at a safepoint. |
261 constantPoolHandle constants(current_thread, ikh->constants()); | 261 constantPoolHandle constants(current_thread, ikh->constants()); |
262 oop cplock = constants->lock(); | 262 MonitorLockerEx ml(constants->lock()); // lock constant pool while we query it |
263 ObjectLocker ol(cplock, current_thread, cplock != NULL); // lock constant pool while we query it | |
264 | 263 |
265 JvmtiClassFileReconstituter reconstituter(ikh); | 264 JvmtiClassFileReconstituter reconstituter(ikh); |
266 if (reconstituter.get_error() != JVMTI_ERROR_NONE) { | 265 if (reconstituter.get_error() != JVMTI_ERROR_NONE) { |
267 return reconstituter.get_error(); | 266 return reconstituter.get_error(); |
268 } | 267 } |
2416 return JVMTI_ERROR_ABSENT_INFORMATION; | 2415 return JVMTI_ERROR_ABSENT_INFORMATION; |
2417 } | 2416 } |
2418 | 2417 |
2419 instanceKlassHandle ikh(thread, k_oop); | 2418 instanceKlassHandle ikh(thread, k_oop); |
2420 constantPoolHandle constants(thread, ikh->constants()); | 2419 constantPoolHandle constants(thread, ikh->constants()); |
2421 oop cplock = constants->lock(); | 2420 MonitorLockerEx ml(constants->lock()); // lock constant pool while we query it |
2422 ObjectLocker ol(cplock, thread, cplock != NULL); // lock constant pool while we query it | |
2423 | 2421 |
2424 JvmtiConstantPoolReconstituter reconstituter(ikh); | 2422 JvmtiConstantPoolReconstituter reconstituter(ikh); |
2425 if (reconstituter.get_error() != JVMTI_ERROR_NONE) { | 2423 if (reconstituter.get_error() != JVMTI_ERROR_NONE) { |
2426 return reconstituter.get_error(); | 2424 return reconstituter.get_error(); |
2427 } | 2425 } |