src/share/vm/oops/methodOop.cpp

changeset 2363
7cf1a74771e8
parent 2314
f95d63e2154a
child 2462
8012aa3ccede
equal deleted inserted replaced
2362:a5610f0862fe 2363:7cf1a74771e8
307 #endif 307 #endif
308 308
309 // Build a methodDataOop object to hold information about this method 309 // Build a methodDataOop object to hold information about this method
310 // collected in the interpreter. 310 // collected in the interpreter.
311 void methodOopDesc::build_interpreter_method_data(methodHandle method, TRAPS) { 311 void methodOopDesc::build_interpreter_method_data(methodHandle method, TRAPS) {
312 // Do not profile method if current thread holds the pending list lock,
313 // which avoids deadlock for acquiring the MethodData_lock.
314 if (instanceRefKlass::owns_pending_list_lock((JavaThread*)THREAD)) {
315 return;
316 }
317
312 // Grab a lock here to prevent multiple 318 // Grab a lock here to prevent multiple
313 // methodDataOops from being created. 319 // methodDataOops from being created.
314 MutexLocker ml(MethodData_lock, THREAD); 320 MutexLocker ml(MethodData_lock, THREAD);
315 if (method->method_data() == NULL) { 321 if (method->method_data() == NULL) {
316 methodDataOop method_data = oopFactory::new_methodData(method, CHECK); 322 methodDataOop method_data = oopFactory::new_methodData(method, CHECK);

mercurial