< prev index next >

src/hotspot/share/runtime/objectMonitor.hpp

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.
--- 1,7 ---
  /*
!  * Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

*** 215,10 ***
--- 215,11 ---
    static PerfCounter * _sync_Deflations;
    static PerfLongVariable * _sync_MonExtant;
  
    static int Knob_SpinLimit;
  
+   static ByteSize header_offset()      { return byte_offset_of(ObjectMonitor, _header); }
    static ByteSize owner_offset()       { return byte_offset_of(ObjectMonitor, _owner); }
    static ByteSize recursions_offset()  { return byte_offset_of(ObjectMonitor, _recursions); }
    static ByteSize cxq_offset()         { return byte_offset_of(ObjectMonitor, _cxq); }
    static ByteSize succ_offset()        { return byte_offset_of(ObjectMonitor, _succ); }
    static ByteSize EntryList_offset()   { return byte_offset_of(ObjectMonitor, _EntryList); }

*** 296,10 ***
--- 297,11 ---
    int       waiters() const;
  
    int       contentions() const;
    void      add_to_contentions(int value);
    intx      recursions() const                                         { return _recursions; }
+   void      set_recursions(size_t recursions);
  
    // JVM/TI GetObjectMonitorUsage() needs this:
    ObjectWaiter* first_waiter()                                         { return _WaitSet; }
    ObjectWaiter* next_waiter(ObjectWaiter* o)                           { return o->_next; }
    JavaThread* thread_of_waiter(ObjectWaiter* o)                        { return o->_thread; }

*** 330,10 ***
--- 332,11 ---
     public:
      ClearSuccOnSuspend(ObjectMonitor* om) : _om(om)  {}
      void operator()(JavaThread* current);
    };
   public:
+   bool      enter_for(JavaThread* locking_thread);
    bool      enter(JavaThread* current);
    void      exit(JavaThread* current, bool not_suspended = true);
    void      wait(jlong millis, bool interruptible, TRAPS);
    void      notify(TRAPS);
    void      notifyAll(TRAPS);
< prev index next >