equal
deleted
inserted
replaced
237 assert(exception_frame.is_deoptimized_frame(), "must be deopted"); |
237 assert(exception_frame.is_deoptimized_frame(), "must be deopted"); |
238 pc = exception_frame.pc(); |
238 pc = exception_frame.pc(); |
239 } |
239 } |
240 #ifdef ASSERT |
240 #ifdef ASSERT |
241 assert(exception.not_null(), "NULL exceptions should be handled by throw_exception"); |
241 assert(exception.not_null(), "NULL exceptions should be handled by throw_exception"); |
242 assert(exception->is_oop(), "just checking"); |
|
243 // Check that exception is a subclass of Throwable, otherwise we have a VerifyError |
242 // Check that exception is a subclass of Throwable, otherwise we have a VerifyError |
244 if (!(exception->is_a(SystemDictionary::Throwable_klass()))) { |
243 if (!(exception->is_a(SystemDictionary::Throwable_klass()))) { |
245 if (ExitVMOnVerifyError) vm_exit(-1); |
244 if (ExitVMOnVerifyError) vm_exit(-1); |
246 ShouldNotReachHere(); |
245 ShouldNotReachHere(); |
247 } |
246 } |
383 if (PrintBiasedLockingStatistics) { |
382 if (PrintBiasedLockingStatistics) { |
384 Atomic::inc(BiasedLocking::slow_path_entry_count_addr()); |
383 Atomic::inc(BiasedLocking::slow_path_entry_count_addr()); |
385 } |
384 } |
386 #endif |
385 #endif |
387 Handle h_obj(thread, obj); |
386 Handle h_obj(thread, obj); |
388 assert(h_obj()->is_oop(), "must be NULL or an object"); |
|
389 if (UseBiasedLocking) { |
387 if (UseBiasedLocking) { |
390 // Retry fast entry if bias is revoked to avoid unnecessary inflation |
388 // Retry fast entry if bias is revoked to avoid unnecessary inflation |
391 ObjectSynchronizer::fast_enter(h_obj, lock, true, CHECK); |
389 ObjectSynchronizer::fast_enter(h_obj, lock, true, CHECK); |
392 } else { |
390 } else { |
393 if (JVMCIUseFastLocking) { |
391 if (JVMCIUseFastLocking) { |
405 assert(thread->last_Java_sp(), "last_Java_sp must be set"); |
403 assert(thread->last_Java_sp(), "last_Java_sp must be set"); |
406 // monitorexit is non-blocking (leaf routine) => no exceptions can be thrown |
404 // monitorexit is non-blocking (leaf routine) => no exceptions can be thrown |
407 EXCEPTION_MARK; |
405 EXCEPTION_MARK; |
408 |
406 |
409 #ifdef DEBUG |
407 #ifdef DEBUG |
410 if (!obj->is_oop()) { |
408 if (!oopDesc::is_oop(obj)) { |
411 ResetNoHandleMark rhm; |
409 ResetNoHandleMark rhm; |
412 nmethod* method = thread->last_frame().cb()->as_nmethod_or_null(); |
410 nmethod* method = thread->last_frame().cb()->as_nmethod_or_null(); |
413 if (method != NULL) { |
411 if (method != NULL) { |
414 tty->print_cr("ERROR in monitorexit in method %s wrong obj " INTPTR_FORMAT, method->name(), p2i(obj)); |
412 tty->print_cr("ERROR in monitorexit in method %s wrong obj " INTPTR_FORMAT, method->name(), p2i(obj)); |
415 } |
413 } |
453 JRT_LEAF(void, JVMCIRuntime::log_object(JavaThread* thread, oopDesc* obj, bool as_string, bool newline)) |
451 JRT_LEAF(void, JVMCIRuntime::log_object(JavaThread* thread, oopDesc* obj, bool as_string, bool newline)) |
454 ttyLocker ttyl; |
452 ttyLocker ttyl; |
455 |
453 |
456 if (obj == NULL) { |
454 if (obj == NULL) { |
457 tty->print("NULL"); |
455 tty->print("NULL"); |
458 } else if (obj->is_oop_or_null(true) && (!as_string || !java_lang_String::is_instance(obj))) { |
456 } else if (oopDesc::is_oop_or_null(obj, true) && (!as_string || !java_lang_String::is_instance(obj))) { |
459 if (obj->is_oop_or_null(true)) { |
457 if (oopDesc::is_oop_or_null(obj, true)) { |
460 char buf[O_BUFLEN]; |
458 char buf[O_BUFLEN]; |
461 tty->print("%s@" INTPTR_FORMAT, obj->klass()->name()->as_C_string(buf, O_BUFLEN), p2i(obj)); |
459 tty->print("%s@" INTPTR_FORMAT, obj->klass()->name()->as_C_string(buf, O_BUFLEN), p2i(obj)); |
462 } else { |
460 } else { |
463 tty->print(INTPTR_FORMAT, p2i(obj)); |
461 tty->print(INTPTR_FORMAT, p2i(obj)); |
464 } |
462 } |