< prev index next >

src/hotspot/share/interpreter/interpreterRuntime.cpp

Print this page

 707     put_code,
 708     info.field_holder(),
 709     info.index(),
 710     info.offset(),
 711     state,
 712     info.access_flags().is_final(),
 713     info.access_flags().is_volatile()
 714   );
 715 }
 716 
 717 
 718 //------------------------------------------------------------------------------------------------------------------------
 719 // Synchronization
 720 //
 721 // The interpreter's synchronization code is factored out so that it can
 722 // be shared by method invocation and synchronized blocks.
 723 //%note synchronization_3
 724 
 725 //%note monitor_1
 726 JRT_ENTRY_NO_ASYNC(void, InterpreterRuntime::monitorenter(JavaThread* current, BasicObjectLock* elem))









 727 #ifdef ASSERT
 728   current->last_frame().interpreter_frame_verify_monitor(elem);
 729 #endif
 730   if (PrintBiasedLockingStatistics) {
 731     Atomic::inc(BiasedLocking::slow_path_entry_count_addr());
 732   }
 733   Handle h_obj(current, elem->obj());
 734   assert(Universe::heap()->is_in_or_null(h_obj()),
 735          "must be NULL or an object");
 736   ObjectSynchronizer::enter(h_obj, elem->lock(), current);
 737   assert(Universe::heap()->is_in_or_null(elem->obj()),
 738          "must be NULL or an object");
 739 #ifdef ASSERT
 740   current->last_frame().interpreter_frame_verify_monitor(elem);
 741 #endif
 742 JRT_END
 743 
 744 
 745 JRT_LEAF(void, InterpreterRuntime::monitorexit(BasicObjectLock* elem))
 746   oop obj = elem->obj();

 707     put_code,
 708     info.field_holder(),
 709     info.index(),
 710     info.offset(),
 711     state,
 712     info.access_flags().is_final(),
 713     info.access_flags().is_volatile()
 714   );
 715 }
 716 
 717 
 718 //------------------------------------------------------------------------------------------------------------------------
 719 // Synchronization
 720 //
 721 // The interpreter's synchronization code is factored out so that it can
 722 // be shared by method invocation and synchronized blocks.
 723 //%note synchronization_3
 724 
 725 //%note monitor_1
 726 JRT_ENTRY_NO_ASYNC(void, InterpreterRuntime::monitorenter(JavaThread* current, BasicObjectLock* elem))
 727   if (!UseHeavyMonitors && UseFastLocking) {
 728     // This is a hack to get around the limitation of registers in x86_32. We really
 729     // send an oopDesc* instead of a BasicObjectLock*.
 730     Handle h_obj(current, oop((reinterpret_cast<oopDesc*>(elem))));
 731     assert(Universe::heap()->is_in_or_null(h_obj()),
 732            "must be NULL or an object");
 733     ObjectSynchronizer::enter(h_obj, NULL, current);
 734     return;
 735   }
 736 #ifdef ASSERT
 737   current->last_frame().interpreter_frame_verify_monitor(elem);
 738 #endif
 739   if (PrintBiasedLockingStatistics) {
 740     Atomic::inc(BiasedLocking::slow_path_entry_count_addr());
 741   }
 742   Handle h_obj(current, elem->obj());
 743   assert(Universe::heap()->is_in_or_null(h_obj()),
 744          "must be NULL or an object");
 745   ObjectSynchronizer::enter(h_obj, elem->lock(), current);
 746   assert(Universe::heap()->is_in_or_null(elem->obj()),
 747          "must be NULL or an object");
 748 #ifdef ASSERT
 749   current->last_frame().interpreter_frame_verify_monitor(elem);
 750 #endif
 751 JRT_END
 752 
 753 
 754 JRT_LEAF(void, InterpreterRuntime::monitorexit(BasicObjectLock* elem))
 755   oop obj = elem->obj();
< prev index next >