435 if (current->has_last_Java_frame()) {
436 LogStream info_stream(vblog.info());
437 current->print_stack_on(&info_stream);
438 } else {
439 vblog.info("Cannot find the last Java frame");
440 }
441
442 EventSyncOnValueBasedClass event;
443 if (event.should_commit()) {
444 event.set_valueBasedClass(obj->klass());
445 event.commit();
446 }
447 }
448
449 if (bcp_was_adjusted) {
450 last_frame.interpreter_frame_set_bcp(last_frame.interpreter_frame_bcp() + 1);
451 }
452 }
453
454 static bool useHeavyMonitors() {
455 #if defined(X86) || defined(AARCH64) || defined(PPC64)
456 return UseHeavyMonitors;
457 #else
458 return false;
459 #endif
460 }
461
462 // -----------------------------------------------------------------------------
463 // Monitor Enter/Exit
464 // The interpreter and compiler assembly code tries to lock using the fast path
465 // of this algorithm. Make sure to update that code if the following function is
466 // changed. The implementation is extremely sensitive to race condition. Be careful.
467
468 void ObjectSynchronizer::enter(Handle obj, BasicLock* lock, JavaThread* current) {
469 if (obj->klass()->is_value_based()) {
470 handle_sync_on_value_based_class(obj, current);
471 }
472
473 if (!useHeavyMonitors()) {
474 markWord mark = obj->mark();
475 if (mark.is_neutral()) {
|
435 if (current->has_last_Java_frame()) {
436 LogStream info_stream(vblog.info());
437 current->print_stack_on(&info_stream);
438 } else {
439 vblog.info("Cannot find the last Java frame");
440 }
441
442 EventSyncOnValueBasedClass event;
443 if (event.should_commit()) {
444 event.set_valueBasedClass(obj->klass());
445 event.commit();
446 }
447 }
448
449 if (bcp_was_adjusted) {
450 last_frame.interpreter_frame_set_bcp(last_frame.interpreter_frame_bcp() + 1);
451 }
452 }
453
454 static bool useHeavyMonitors() {
455 #if defined(X86) || defined(AARCH64) || defined(PPC64) || defined(RISCV64)
456 return UseHeavyMonitors;
457 #else
458 return false;
459 #endif
460 }
461
462 // -----------------------------------------------------------------------------
463 // Monitor Enter/Exit
464 // The interpreter and compiler assembly code tries to lock using the fast path
465 // of this algorithm. Make sure to update that code if the following function is
466 // changed. The implementation is extremely sensitive to race condition. Be careful.
467
468 void ObjectSynchronizer::enter(Handle obj, BasicLock* lock, JavaThread* current) {
469 if (obj->klass()->is_value_based()) {
470 handle_sync_on_value_based_class(obj, current);
471 }
472
473 if (!useHeavyMonitors()) {
474 markWord mark = obj->mark();
475 if (mark.is_neutral()) {
|