hotspot/src/share/vm/opto/graphKit.cpp
changeset 34148 6efbc7ffd767
parent 33628 09241459a8b8
child 34211 d25c2fc1e248
equal deleted inserted replaced
34147:8726d73d17fb 34148:6efbc7ffd767
  3984   Node* zeroX = __ ConX(0);
  3984   Node* zeroX = __ ConX(0);
  3985 
  3985 
  3986   float likely  = PROB_LIKELY(0.999);
  3986   float likely  = PROB_LIKELY(0.999);
  3987   float unlikely  = PROB_UNLIKELY(0.999);
  3987   float unlikely  = PROB_UNLIKELY(0.999);
  3988 
  3988 
  3989   BasicType active_type = in_bytes(PtrQueue::byte_width_of_active()) == 4 ? T_INT : T_BYTE;
  3989   BasicType active_type = in_bytes(SATBMarkQueue::byte_width_of_active()) == 4 ? T_INT : T_BYTE;
  3990   assert(in_bytes(PtrQueue::byte_width_of_active()) == 4 || in_bytes(PtrQueue::byte_width_of_active()) == 1, "flag width");
  3990   assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 4 || in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "flag width");
  3991 
  3991 
  3992   // Offsets into the thread
  3992   // Offsets into the thread
  3993   const int marking_offset = in_bytes(JavaThread::satb_mark_queue_offset() +  // 648
  3993   const int marking_offset = in_bytes(JavaThread::satb_mark_queue_offset() +  // 648
  3994                                           PtrQueue::byte_offset_of_active());
  3994                                           SATBMarkQueue::byte_offset_of_active());
  3995   const int index_offset   = in_bytes(JavaThread::satb_mark_queue_offset() +  // 656
  3995   const int index_offset   = in_bytes(JavaThread::satb_mark_queue_offset() +  // 656
  3996                                           PtrQueue::byte_offset_of_index());
  3996                                           SATBMarkQueue::byte_offset_of_index());
  3997   const int buffer_offset  = in_bytes(JavaThread::satb_mark_queue_offset() +  // 652
  3997   const int buffer_offset  = in_bytes(JavaThread::satb_mark_queue_offset() +  // 652
  3998                                           PtrQueue::byte_offset_of_buf());
  3998                                           SATBMarkQueue::byte_offset_of_buf());
  3999 
  3999 
  4000   // Now the actual pointers into the thread
  4000   // Now the actual pointers into the thread
  4001   Node* marking_adr = __ AddP(no_base, tls, __ ConX(marking_offset));
  4001   Node* marking_adr = __ AddP(no_base, tls, __ ConX(marking_offset));
  4002   Node* buffer_adr  = __ AddP(no_base, tls, __ ConX(buffer_offset));
  4002   Node* buffer_adr  = __ AddP(no_base, tls, __ ConX(buffer_offset));
  4003   Node* index_adr   = __ AddP(no_base, tls, __ ConX(index_offset));
  4003   Node* index_adr   = __ AddP(no_base, tls, __ ConX(index_offset));
  4006   Node* marking = __ load(__ ctrl(), marking_adr, TypeInt::INT, active_type, Compile::AliasIdxRaw);
  4006   Node* marking = __ load(__ ctrl(), marking_adr, TypeInt::INT, active_type, Compile::AliasIdxRaw);
  4007 
  4007 
  4008   // if (!marking)
  4008   // if (!marking)
  4009   __ if_then(marking, BoolTest::ne, zero, unlikely); {
  4009   __ if_then(marking, BoolTest::ne, zero, unlikely); {
  4010     BasicType index_bt = TypeX_X->basic_type();
  4010     BasicType index_bt = TypeX_X->basic_type();
  4011     assert(sizeof(size_t) == type2aelembytes(index_bt), "Loading G1 PtrQueue::_index with wrong size.");
  4011     assert(sizeof(size_t) == type2aelembytes(index_bt), "Loading G1 SATBMarkQueue::_index with wrong size.");
  4012     Node* index   = __ load(__ ctrl(), index_adr, TypeX_X, index_bt, Compile::AliasIdxRaw);
  4012     Node* index   = __ load(__ ctrl(), index_adr, TypeX_X, index_bt, Compile::AliasIdxRaw);
  4013 
  4013 
  4014     if (do_load) {
  4014     if (do_load) {
  4015       // load original value
  4015       // load original value
  4016       // alias_idx correct??
  4016       // alias_idx correct??
  4194 
  4194 
  4195   const TypeFunc *tf = OptoRuntime::g1_wb_post_Type();
  4195   const TypeFunc *tf = OptoRuntime::g1_wb_post_Type();
  4196 
  4196 
  4197   // Offsets into the thread
  4197   // Offsets into the thread
  4198   const int index_offset  = in_bytes(JavaThread::dirty_card_queue_offset() +
  4198   const int index_offset  = in_bytes(JavaThread::dirty_card_queue_offset() +
  4199                                      PtrQueue::byte_offset_of_index());
  4199                                      DirtyCardQueue::byte_offset_of_index());
  4200   const int buffer_offset = in_bytes(JavaThread::dirty_card_queue_offset() +
  4200   const int buffer_offset = in_bytes(JavaThread::dirty_card_queue_offset() +
  4201                                      PtrQueue::byte_offset_of_buf());
  4201                                      DirtyCardQueue::byte_offset_of_buf());
  4202 
  4202 
  4203   // Pointers into the thread
  4203   // Pointers into the thread
  4204 
  4204 
  4205   Node* buffer_adr = __ AddP(no_base, tls, __ ConX(buffer_offset));
  4205   Node* buffer_adr = __ AddP(no_base, tls, __ ConX(buffer_offset));
  4206   Node* index_adr =  __ AddP(no_base, tls, __ ConX(index_offset));
  4206   Node* index_adr =  __ AddP(no_base, tls, __ ConX(index_offset));