< prev index next >

src/hotspot/share/runtime/biasedLocking.hpp

Print this page
rev 54936 : [mq]: 8221734-v3


 158   static int* fast_path_entry_count_addr();
 159   static int* slow_path_entry_count_addr();
 160 
 161   enum Condition {
 162     NOT_BIASED = 1,
 163     BIAS_REVOKED = 2,
 164     BIAS_REVOKED_AND_REBIASED = 3
 165   };
 166 
 167   // This initialization routine should only be called once and
 168   // schedules a PeriodicTask to turn on biased locking a few seconds
 169   // into the VM run to avoid startup time regressions
 170   static void init();
 171 
 172   // This provides a global switch for leaving biased locking disabled
 173   // for the first part of a run and enabling it later
 174   static bool enabled();
 175 
 176   // This should be called by JavaThreads to revoke the bias of an object
 177   static Condition revoke_and_rebias(Handle obj, bool attempt_rebias, TRAPS);

 178 
 179   // These do not allow rebiasing; they are used by deoptimization to
 180   // ensure that monitors on the stack can be migrated
 181   static void revoke(GrowableArray<Handle>* objs);
 182   static void revoke_at_safepoint(Handle obj);
 183   static void revoke_at_safepoint(GrowableArray<Handle>* objs);
 184 
 185   static void print_counters() { _counters.print(); }
 186   static BiasedLockingCounters* counters() { return &_counters; }
 187 
 188   // These routines are GC-related and should not be called by end
 189   // users. GCs which do not do preservation of mark words do not need
 190   // to call these routines.
 191   static void preserve_marks();
 192   static void restore_marks();
 193 };
 194 
 195 #endif // SHARE_RUNTIME_BIASEDLOCKING_HPP


 158   static int* fast_path_entry_count_addr();
 159   static int* slow_path_entry_count_addr();
 160 
 161   enum Condition {
 162     NOT_BIASED = 1,
 163     BIAS_REVOKED = 2,
 164     BIAS_REVOKED_AND_REBIASED = 3
 165   };
 166 
 167   // This initialization routine should only be called once and
 168   // schedules a PeriodicTask to turn on biased locking a few seconds
 169   // into the VM run to avoid startup time regressions
 170   static void init();
 171 
 172   // This provides a global switch for leaving biased locking disabled
 173   // for the first part of a run and enabling it later
 174   static bool enabled();
 175 
 176   // This should be called by JavaThreads to revoke the bias of an object
 177   static Condition revoke_and_rebias(Handle obj, bool attempt_rebias, TRAPS);
 178   static Condition revoke_own_locks_in_handshake(Handle obj, TRAPS);
 179 
 180   // These do not allow rebiasing; they are used by deoptimization to
 181   // ensure that monitors on the stack can be migrated
 182   static void revoke(GrowableArray<Handle>* objs);
 183   static void revoke_at_safepoint(Handle obj);
 184   static void revoke_at_safepoint(GrowableArray<Handle>* objs);
 185 
 186   static void print_counters() { _counters.print(); }
 187   static BiasedLockingCounters* counters() { return &_counters; }
 188 
 189   // These routines are GC-related and should not be called by end
 190   // users. GCs which do not do preservation of mark words do not need
 191   // to call these routines.
 192   static void preserve_marks();
 193   static void restore_marks();
 194 };
 195 
 196 #endif // SHARE_RUNTIME_BIASEDLOCKING_HPP
< prev index next >