< prev index next >

src/hotspot/share/runtime/biasedLocking.hpp

Print this page
rev 56251 : imported patch 8226705-v1
rev 56253 : [mq]: 8226705-v3-pat


 173 
 174 private:
 175   static void single_revoke_at_safepoint(oop obj, bool is_bulk, JavaThread* requester, JavaThread** biaser);
 176   static void bulk_revoke_at_safepoint(oop o, bool bulk_rebias, JavaThread* requester);
 177   static Condition single_revoke_with_handshake(Handle obj, JavaThread *requester, JavaThread *biaser);
 178   static void walk_stack_and_revoke(oop obj, JavaThread* biased_locker);
 179 
 180 public:
 181   // This initialization routine should only be called once and
 182   // schedules a PeriodicTask to turn on biased locking a few seconds
 183   // into the VM run to avoid startup time regressions
 184   static void init();
 185 
 186   // This provides a global switch for leaving biased locking disabled
 187   // for the first part of a run and enabling it later
 188   static bool enabled();
 189 
 190   // This should be called by JavaThreads to revoke the bias of an object
 191   static void revoke(Handle obj, TRAPS);
 192 



 193   static void revoke_at_safepoint(Handle obj);
 194 
 195   // These are used by deoptimization to ensure that monitors on the stack
 196   // can be migrated
 197   static void revoke(GrowableArray<Handle>* objs, JavaThread *biaser);
 198   static void revoke_at_safepoint(GrowableArray<Handle>* objs);
 199 
 200   static void print_counters() { _counters.print(); }
 201   static BiasedLockingCounters* counters() { return &_counters; }
 202 
 203   // These routines are GC-related and should not be called by end
 204   // users. GCs which do not do preservation of mark words do not need
 205   // to call these routines.
 206   static void preserve_marks();
 207   static void restore_marks();
 208 };
 209 
 210 #endif // SHARE_RUNTIME_BIASEDLOCKING_HPP


 173 
 174 private:
 175   static void single_revoke_at_safepoint(oop obj, bool is_bulk, JavaThread* requester, JavaThread** biaser);
 176   static void bulk_revoke_at_safepoint(oop o, bool bulk_rebias, JavaThread* requester);
 177   static Condition single_revoke_with_handshake(Handle obj, JavaThread *requester, JavaThread *biaser);
 178   static void walk_stack_and_revoke(oop obj, JavaThread* biased_locker);
 179 
 180 public:
 181   // This initialization routine should only be called once and
 182   // schedules a PeriodicTask to turn on biased locking a few seconds
 183   // into the VM run to avoid startup time regressions
 184   static void init();
 185 
 186   // This provides a global switch for leaving biased locking disabled
 187   // for the first part of a run and enabling it later
 188   static bool enabled();
 189 
 190   // This should be called by JavaThreads to revoke the bias of an object
 191   static void revoke(Handle obj, TRAPS);
 192 
 193   // This must only be called by a JavaThread to revoke the bias of an owned object.
 194   static void revoke_own_lock(Handle obj, TRAPS);
 195 
 196   static void revoke_at_safepoint(Handle obj);
 197 
 198   // These are used by deoptimization to ensure that monitors on the stack
 199   // can be migrated
 200   static void revoke(GrowableArray<Handle>* objs, JavaThread *biaser);

 201 
 202   static void print_counters() { _counters.print(); }
 203   static BiasedLockingCounters* counters() { return &_counters; }
 204 
 205   // These routines are GC-related and should not be called by end
 206   // users. GCs which do not do preservation of mark words do not need
 207   // to call these routines.
 208   static void preserve_marks();
 209   static void restore_marks();
 210 };
 211 
 212 #endif // SHARE_RUNTIME_BIASEDLOCKING_HPP
< prev index next >