< prev index next >

src/hotspot/share/runtime/javaThread.hpp

Print this page
*** 59,10 ***
--- 59,11 ---
  class JvmtiDeferredUpdates;
  class JvmtiSampledObjectAllocEventCollector;
  class JvmtiThreadState;
  
  class Metadata;
+ class ObjectMonitor;
  class OopHandleList;
  class OopStorage;
  class OSThread;
  
  class ThreadsList;

*** 1161,10 ***
--- 1162,11 ---
    // the Java code in Object::wait which are not present in RawMonitorWait.
    bool get_and_clear_interrupted();
  
  private:
    LockStack _lock_stack;
+   OMCache _om_cache;
  
  public:
    LockStack& lock_stack() { return _lock_stack; }
  
    static ByteSize lock_stack_offset()      { return byte_offset_of(JavaThread, _lock_stack); }

*** 1172,10 ***
--- 1174,18 ---
    // JavaThread structure. Those accesses are relative to the current thread, which
    // is typically in a dedicated register.
    static ByteSize lock_stack_top_offset()  { return lock_stack_offset() + LockStack::top_offset(); }
    static ByteSize lock_stack_base_offset() { return lock_stack_offset() + LockStack::base_offset(); }
  
+ 
+   static ByteSize om_cache_offset()        { return byte_offset_of(JavaThread, _om_cache); }
+   static ByteSize om_cache_oops_offset()   { return om_cache_offset() + OMCache::entries_offset(); }
+ 
+   void om_set_monitor_cache(ObjectMonitor* monitor);
+   void om_clear_monitor_cache();
+   ObjectMonitor* om_get_from_monitor_cache(oop obj);
+ 
    static OopStorage* thread_oop_storage();
  
    static void verify_cross_modify_fence_failure(JavaThread *thread) PRODUCT_RETURN;
  
    // Helper function to create the java.lang.Thread object for a
< prev index next >