< prev index next >

src/hotspot/share/opto/graphKit.cpp

Print this page

        

@@ -46,10 +46,13 @@
 #include "opto/parse.hpp"
 #include "opto/rootnode.hpp"
 #include "opto/runtime.hpp"
 #include "runtime/deoptimization.hpp"
 #include "runtime/sharedRuntime.hpp"
+#if INCLUDE_ALL_GCS
+#include "gc/g1/g1ThreadLocalData.hpp"
+#endif // INCLUDE_ALL_GCS
 
 //----------------------------GraphKit-----------------------------------------
 // Main utility constructor.
 GraphKit::GraphKit(JVMState* jvms)
   : Phase(Phase::Parser),

@@ -4079,16 +4082,13 @@
 
   BasicType active_type = in_bytes(SATBMarkQueue::byte_width_of_active()) == 4 ? T_INT : T_BYTE;
   assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 4 || in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "flag width");
 
   // Offsets into the thread
-  const int marking_offset = in_bytes(JavaThread::satb_mark_queue_offset() +  // 648
-                                          SATBMarkQueue::byte_offset_of_active());
-  const int index_offset   = in_bytes(JavaThread::satb_mark_queue_offset() +  // 656
-                                          SATBMarkQueue::byte_offset_of_index());
-  const int buffer_offset  = in_bytes(JavaThread::satb_mark_queue_offset() +  // 652
-                                          SATBMarkQueue::byte_offset_of_buf());
+  const int marking_offset = in_bytes(G1ThreadLocalData::satb_mark_queue_active_offset());
+  const int index_offset   = in_bytes(G1ThreadLocalData::satb_mark_queue_index_offset());
+  const int buffer_offset  = in_bytes(G1ThreadLocalData::satb_mark_queue_buffer_offset());
 
   // Now the actual pointers into the thread
   Node* marking_adr = __ AddP(no_base, tls, __ ConX(marking_offset));
   Node* buffer_adr  = __ AddP(no_base, tls, __ ConX(buffer_offset));
   Node* index_adr   = __ AddP(no_base, tls, __ ConX(index_offset));

@@ -4284,14 +4284,12 @@
   const TypePtr* card_type = TypeRawPtr::BOTTOM;
 
   const TypeFunc *tf = OptoRuntime::g1_wb_post_Type();
 
   // Offsets into the thread
-  const int index_offset  = in_bytes(JavaThread::dirty_card_queue_offset() +
-                                     DirtyCardQueue::byte_offset_of_index());
-  const int buffer_offset = in_bytes(JavaThread::dirty_card_queue_offset() +
-                                     DirtyCardQueue::byte_offset_of_buf());
+  const int index_offset  = in_bytes(G1ThreadLocalData::dirty_card_queue_index_offset());
+  const int buffer_offset = in_bytes(G1ThreadLocalData::dirty_card_queue_buffer_offset());
 
   // Pointers into the thread
 
   Node* buffer_adr = __ AddP(no_base, tls, __ ConX(buffer_offset));
   Node* index_adr =  __ AddP(no_base, tls, __ ConX(index_offset));
< prev index next >