3216 BasicType active_type = in_bytes(PtrQueue::byte_width_of_active()) == 4 ? T_INT : T_BYTE; 3217 assert(in_bytes(PtrQueue::byte_width_of_active()) == 4 || in_bytes(PtrQueue::byte_width_of_active()) == 1, "flag width"); 3218 3219 // Offsets into the thread 3220 const int marking_offset = in_bytes(JavaThread::satb_mark_queue_offset() + // 648 3221 PtrQueue::byte_offset_of_active()); 3222 const int index_offset = in_bytes(JavaThread::satb_mark_queue_offset() + // 656 3223 PtrQueue::byte_offset_of_index()); 3224 const int buffer_offset = in_bytes(JavaThread::satb_mark_queue_offset() + // 652 3225 PtrQueue::byte_offset_of_buf()); 3226 // Now the actual pointers into the thread 3227 3228 // set_control( ctl); 3229 3230 Node* marking_adr = __ AddP(no_base, thread, __ ConX(marking_offset)); 3231 Node* buffer_adr = __ AddP(no_base, thread, __ ConX(buffer_offset)); 3232 Node* index_adr = __ AddP(no_base, thread, __ ConX(index_offset)); 3233 3234 // Now some of the values 3235 3236 Node* marking = __ load(no_ctrl, marking_adr, TypeInt::INT, active_type, Compile::AliasIdxRaw); 3237 Node* index = __ load(no_ctrl, index_adr, TypeInt::INT, T_INT, Compile::AliasIdxRaw); 3238 Node* buffer = __ load(no_ctrl, buffer_adr, TypeRawPtr::NOTNULL, T_ADDRESS, Compile::AliasIdxRaw); 3239 3240 // if (!marking) 3241 __ if_then(marking, BoolTest::ne, zero); { 3242 3243 const Type* t1 = adr->bottom_type(); 3244 const Type* t2 = val->bottom_type(); 3245 3246 Node* orig = __ load(no_ctrl, adr, val_type, bt, alias_idx); 3247 // if (orig != NULL) 3248 __ if_then(orig, BoolTest::ne, null()); { 3249 3250 // load original value 3251 // alias_idx correct?? 3252 3253 // is the queue for this thread full? 3254 __ if_then(index, BoolTest::ne, zero, likely); { 3255 3256 // decrement the index 3257 Node* next_index = __ SubI(index, __ ConI(sizeof(intptr_t))); 3258 Node* next_indexX = next_index; 3259 #ifdef _LP64 3260 // We could refine the type for what it's worth 3261 // const TypeLong* lidxtype = TypeLong::make(CONST64(0), get_size_from_queue); 3262 next_indexX = _gvn.transform( new (C, 2) ConvI2LNode(next_index, TypeLong::make(0, max_jlong, Type::WidenMax)) ); 3263 #endif // _LP64 3264 3265 // Now get the buffer location we will log the original value into and store it 3266 3267 Node *log_addr = __ AddP(no_base, buffer, next_indexX); 3268 // __ store(__ ctrl(), log_addr, orig, T_OBJECT, C->get_alias_index(TypeOopPtr::BOTTOM)); | 3216 BasicType active_type = in_bytes(PtrQueue::byte_width_of_active()) == 4 ? T_INT : T_BYTE; 3217 assert(in_bytes(PtrQueue::byte_width_of_active()) == 4 || in_bytes(PtrQueue::byte_width_of_active()) == 1, "flag width"); 3218 3219 // Offsets into the thread 3220 const int marking_offset = in_bytes(JavaThread::satb_mark_queue_offset() + // 648 3221 PtrQueue::byte_offset_of_active()); 3222 const int index_offset = in_bytes(JavaThread::satb_mark_queue_offset() + // 656 3223 PtrQueue::byte_offset_of_index()); 3224 const int buffer_offset = in_bytes(JavaThread::satb_mark_queue_offset() + // 652 3225 PtrQueue::byte_offset_of_buf()); 3226 // Now the actual pointers into the thread 3227 3228 // set_control( ctl); 3229 3230 Node* marking_adr = __ AddP(no_base, thread, __ ConX(marking_offset)); 3231 Node* buffer_adr = __ AddP(no_base, thread, __ ConX(buffer_offset)); 3232 Node* index_adr = __ AddP(no_base, thread, __ ConX(index_offset)); 3233 3234 // Now some of the values 3235 3236 Node* marking = __ load(__ ctrl(), marking_adr, TypeInt::INT, active_type, Compile::AliasIdxRaw); 3237 3238 // if (!marking) 3239 __ if_then(marking, BoolTest::ne, zero); { 3240 Node* index = __ load(__ ctrl(), index_adr, TypeInt::INT, T_INT, Compile::AliasIdxRaw); 3241 3242 const Type* t1 = adr->bottom_type(); 3243 const Type* t2 = val->bottom_type(); 3244 3245 Node* orig = __ load(no_ctrl, adr, val_type, bt, alias_idx); 3246 // if (orig != NULL) 3247 __ if_then(orig, BoolTest::ne, null()); { 3248 Node* buffer = __ load(__ ctrl(), buffer_adr, TypeRawPtr::NOTNULL, T_ADDRESS, Compile::AliasIdxRaw); 3249 3250 // load original value 3251 // alias_idx correct?? 3252 3253 // is the queue for this thread full? 3254 __ if_then(index, BoolTest::ne, zero, likely); { 3255 3256 // decrement the index 3257 Node* next_index = __ SubI(index, __ ConI(sizeof(intptr_t))); 3258 Node* next_indexX = next_index; 3259 #ifdef _LP64 3260 // We could refine the type for what it's worth 3261 // const TypeLong* lidxtype = TypeLong::make(CONST64(0), get_size_from_queue); 3262 next_indexX = _gvn.transform( new (C, 2) ConvI2LNode(next_index, TypeLong::make(0, max_jlong, Type::WidenMax)) ); 3263 #endif // _LP64 3264 3265 // Now get the buffer location we will log the original value into and store it 3266 3267 Node *log_addr = __ AddP(no_base, buffer, next_indexX); 3268 // __ store(__ ctrl(), log_addr, orig, T_OBJECT, C->get_alias_index(TypeOopPtr::BOTTOM)); |