< prev index next >

src/hotspot/share/runtime/thread.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  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  *


1058   int _jmp_ring_index;
1059   struct {
1060     // We use intptr_t instead of address so debugger doesn't try and display strings
1061     intptr_t _target;
1062     intptr_t _instruction;
1063     const char*  _file;
1064     int _line;
1065   }   _jmp_ring[jump_ring_buffer_size];
1066 #endif // PRODUCT
1067 
1068 #if INCLUDE_ALL_GCS
1069   // Support for G1 barriers
1070 
1071   SATBMarkQueue _satb_mark_queue;        // Thread-local log for SATB barrier.
1072   // Set of all such queues.
1073   static SATBMarkQueueSet _satb_mark_queue_set;
1074 
1075   DirtyCardQueue _dirty_card_queue;      // Thread-local log for dirty cards.
1076   // Set of all such queues.
1077   static DirtyCardQueueSet _dirty_card_queue_set;
1078 
1079   void flush_barrier_queues();
1080 #endif // INCLUDE_ALL_GCS
1081 
1082   friend class VMThread;
1083   friend class ThreadWaitTransition;
1084   friend class VM_Exit;
1085 
1086   void initialize();                             // Initialized the instance variables
1087 
1088  public:
1089   // Constructor
1090   JavaThread(bool is_attaching_via_jni = false); // for main thread and JNI attached threads
1091   JavaThread(ThreadFunction entry_point, size_t stack_size = 0);
1092   ~JavaThread();
1093 
1094 #ifdef ASSERT
1095   // verify this JavaThread hasn't be published in the Threads::list yet
1096   void verify_not_published();
1097 #endif
1098 
1099   //JNI functiontable getter/setter for JVMTI jni function table interception API.


   1 /*
   2  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  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  *


1058   int _jmp_ring_index;
1059   struct {
1060     // We use intptr_t instead of address so debugger doesn't try and display strings
1061     intptr_t _target;
1062     intptr_t _instruction;
1063     const char*  _file;
1064     int _line;
1065   }   _jmp_ring[jump_ring_buffer_size];
1066 #endif // PRODUCT
1067 
1068 #if INCLUDE_ALL_GCS
1069   // Support for G1 barriers
1070 
1071   SATBMarkQueue _satb_mark_queue;        // Thread-local log for SATB barrier.
1072   // Set of all such queues.
1073   static SATBMarkQueueSet _satb_mark_queue_set;
1074 
1075   DirtyCardQueue _dirty_card_queue;      // Thread-local log for dirty cards.
1076   // Set of all such queues.
1077   static DirtyCardQueueSet _dirty_card_queue_set;


1078 #endif // INCLUDE_ALL_GCS
1079 
1080   friend class VMThread;
1081   friend class ThreadWaitTransition;
1082   friend class VM_Exit;
1083 
1084   void initialize();                             // Initialized the instance variables
1085 
1086  public:
1087   // Constructor
1088   JavaThread(bool is_attaching_via_jni = false); // for main thread and JNI attached threads
1089   JavaThread(ThreadFunction entry_point, size_t stack_size = 0);
1090   ~JavaThread();
1091 
1092 #ifdef ASSERT
1093   // verify this JavaThread hasn't be published in the Threads::list yet
1094   void verify_not_published();
1095 #endif
1096 
1097   //JNI functiontable getter/setter for JVMTI jni function table interception API.


< prev index next >