src/share/vm/opto/graphKit.cpp

changeset 1420
685e959d09ea
parent 1390
26fbe81d30cf
child 1462
39b01ab7035a
equal deleted inserted replaced
1393:c7e94e8fff43 1420:685e959d09ea
1448 g1_write_barrier_post(store, obj, adr, adr_idx, val, bt, use_precise); 1448 g1_write_barrier_post(store, obj, adr, adr_idx, val, bt, use_precise);
1449 break; 1449 break;
1450 1450
1451 case BarrierSet::CardTableModRef: 1451 case BarrierSet::CardTableModRef:
1452 case BarrierSet::CardTableExtension: 1452 case BarrierSet::CardTableExtension:
1453 write_barrier_post(store, obj, adr, val, use_precise); 1453 write_barrier_post(store, obj, adr, adr_idx, val, use_precise);
1454 break; 1454 break;
1455 1455
1456 case BarrierSet::ModRef: 1456 case BarrierSet::ModRef:
1457 break; 1457 break;
1458 1458
3163 // Insert a write-barrier store. This is to let generational GC work; we have 3163 // Insert a write-barrier store. This is to let generational GC work; we have
3164 // to flag all oop-stores before the next GC point. 3164 // to flag all oop-stores before the next GC point.
3165 void GraphKit::write_barrier_post(Node* oop_store, 3165 void GraphKit::write_barrier_post(Node* oop_store,
3166 Node* obj, 3166 Node* obj,
3167 Node* adr, 3167 Node* adr,
3168 uint adr_idx,
3168 Node* val, 3169 Node* val,
3169 bool use_precise) { 3170 bool use_precise) {
3170 // No store check needed if we're storing a NULL or an old object 3171 // No store check needed if we're storing a NULL or an old object
3171 // (latter case is probably a string constant). The concurrent 3172 // (latter case is probably a string constant). The concurrent
3172 // mark sweep garbage collector, however, needs to have all nonNull 3173 // mark sweep garbage collector, however, needs to have all nonNull
3212 BasicType bt = T_BYTE; 3213 BasicType bt = T_BYTE;
3213 if( !UseConcMarkSweepGC ) { 3214 if( !UseConcMarkSweepGC ) {
3214 __ store(__ ctrl(), card_adr, zero, bt, adr_type); 3215 __ store(__ ctrl(), card_adr, zero, bt, adr_type);
3215 } else { 3216 } else {
3216 // Specialized path for CM store barrier 3217 // Specialized path for CM store barrier
3217 __ storeCM(__ ctrl(), card_adr, zero, oop_store, bt, adr_type); 3218 __ storeCM(__ ctrl(), card_adr, zero, oop_store, adr_idx, bt, adr_type);
3218 } 3219 }
3219 3220
3220 // Final sync IdealKit and GraphKit. 3221 // Final sync IdealKit and GraphKit.
3221 sync_kit(ideal); 3222 sync_kit(ideal);
3222 } 3223 }
3312 // Update the card table and add card address to the queue 3313 // Update the card table and add card address to the queue
3313 // 3314 //
3314 void GraphKit::g1_mark_card(IdealKit& ideal, 3315 void GraphKit::g1_mark_card(IdealKit& ideal,
3315 Node* card_adr, 3316 Node* card_adr,
3316 Node* oop_store, 3317 Node* oop_store,
3318 uint oop_alias_idx,
3317 Node* index, 3319 Node* index,
3318 Node* index_adr, 3320 Node* index_adr,
3319 Node* buffer, 3321 Node* buffer,
3320 const TypeFunc* tf) { 3322 const TypeFunc* tf) {
3321 3323
3322 Node* zero = __ ConI(0); 3324 Node* zero = __ ConI(0);
3323 Node* no_base = __ top(); 3325 Node* no_base = __ top();
3324 BasicType card_bt = T_BYTE; 3326 BasicType card_bt = T_BYTE;
3325 // Smash zero into card. MUST BE ORDERED WRT TO STORE 3327 // Smash zero into card. MUST BE ORDERED WRT TO STORE
3326 __ storeCM(__ ctrl(), card_adr, zero, oop_store, card_bt, Compile::AliasIdxRaw); 3328 __ storeCM(__ ctrl(), card_adr, zero, oop_store, oop_alias_idx, card_bt, Compile::AliasIdxRaw);
3327 3329
3328 // Now do the queue work 3330 // Now do the queue work
3329 __ if_then(index, BoolTest::ne, zero); { 3331 __ if_then(index, BoolTest::ne, zero); {
3330 3332
3331 Node* next_index = __ SubI(index, __ ConI(sizeof(intptr_t))); 3333 Node* next_index = __ SubI(index, __ ConI(sizeof(intptr_t)));
3433 3435
3434 // load the original value of the card 3436 // load the original value of the card
3435 Node* card_val = __ load(__ ctrl(), card_adr, TypeInt::INT, T_BYTE, Compile::AliasIdxRaw); 3437 Node* card_val = __ load(__ ctrl(), card_adr, TypeInt::INT, T_BYTE, Compile::AliasIdxRaw);
3436 3438
3437 __ if_then(card_val, BoolTest::ne, zero); { 3439 __ if_then(card_val, BoolTest::ne, zero); {
3438 g1_mark_card(ideal, card_adr, oop_store, index, index_adr, buffer, tf); 3440 g1_mark_card(ideal, card_adr, oop_store, alias_idx, index, index_adr, buffer, tf);
3439 } __ end_if(); 3441 } __ end_if();
3440 } __ end_if(); 3442 } __ end_if();
3441 } __ end_if(); 3443 } __ end_if();
3442 } else { 3444 } else {
3443 // Object.clone() instrinsic uses this path. 3445 // Object.clone() instrinsic uses this path.
3444 g1_mark_card(ideal, card_adr, oop_store, index, index_adr, buffer, tf); 3446 g1_mark_card(ideal, card_adr, oop_store, alias_idx, index, index_adr, buffer, tf);
3445 } 3447 }
3446 3448
3447 // Final sync IdealKit and GraphKit. 3449 // Final sync IdealKit and GraphKit.
3448 sync_kit(ideal); 3450 sync_kit(ideal);
3449 } 3451 }

mercurial