< prev index next >

src/hotspot/share/runtime/threadSMR.hpp

Print this page
rev 47959 : imported patch 10.07.open.rebase_20171110.dcubed
rev 47964 : coleenp CR: Change ThreadsList::_threads from 'mtGC' -> 'mtThread', add header comment to threadSMR.hpp file, cleanup JavaThreadIteratorWithHandle ctr, make ErrorHandling more efficient.
rev 47965 : misc CR updates; rebase to 2017.11.22 bits.


  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_RUNTIME_THREADSMR_HPP
  26 #define SHARE_VM_RUNTIME_THREADSMR_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 #include "runtime/timer.hpp"
  30 
  31 // Thread Safe Memory Reclaimation (Thread-SMR) support.
  32 //
  33 // ThreadsListHandles are used to safely perform operations on one or more
  34 // threads without the risk of the thread or threads exiting during the
  35 // operation. It is no longer necessary to hold the Threads_lock to safely
  36 // perform an operation on a target thread.
  37 //
  38 // There are several different ways to refer to java.lang.Thread objects
  39 // so we have a few ways to get a protected JavaThread *:
  40 //
  41 // JNI jobject example:
  42 //   jobject jthread = ...;
  43 //   :
  44 //   ThreadsListHandle tlh;
  45 //   JavaThread* jt = NULL;
  46 //   bool is_alive = tlh.cv_internal_thread_to_JavaThread(jthread, &jt, NULL);
  47 //   if (is_alive) {
  48 //     :  // do stuff with 'jt'...
  49 //   }
  50 //
  51 // JVM/TI jthread example:




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_RUNTIME_THREADSMR_HPP
  26 #define SHARE_VM_RUNTIME_THREADSMR_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 #include "runtime/timer.hpp"
  30 
  31 // Thread Safe Memory Reclamation (Thread-SMR) support.
  32 //
  33 // ThreadsListHandles are used to safely perform operations on one or more
  34 // threads without the risk of the thread or threads exiting during the
  35 // operation. It is no longer necessary to hold the Threads_lock to safely
  36 // perform an operation on a target thread.
  37 //
  38 // There are several different ways to refer to java.lang.Thread objects
  39 // so we have a few ways to get a protected JavaThread *:
  40 //
  41 // JNI jobject example:
  42 //   jobject jthread = ...;
  43 //   :
  44 //   ThreadsListHandle tlh;
  45 //   JavaThread* jt = NULL;
  46 //   bool is_alive = tlh.cv_internal_thread_to_JavaThread(jthread, &jt, NULL);
  47 //   if (is_alive) {
  48 //     :  // do stuff with 'jt'...
  49 //   }
  50 //
  51 // JVM/TI jthread example:


< prev index next >