hotspot/src/share/vm/opto/graphKit.cpp
changeset 20403 45a89fbcd8f7
parent 19770 7cb9f982ea81
child 20408 ca559663042f
equal deleted inserted replaced
20402:9def9d6d969a 20403:45a89fbcd8f7
  3711   Node* tls = __ thread(); // ThreadLocalStorage
  3711   Node* tls = __ thread(); // ThreadLocalStorage
  3712 
  3712 
  3713   Node* no_base = __ top();
  3713   Node* no_base = __ top();
  3714   float likely  = PROB_LIKELY(0.999);
  3714   float likely  = PROB_LIKELY(0.999);
  3715   float unlikely  = PROB_UNLIKELY(0.999);
  3715   float unlikely  = PROB_UNLIKELY(0.999);
  3716   Node* zero = __ ConI(0);
  3716   Node* young_card = __ ConI((jint)G1SATBCardTableModRefBS::g1_young_card_val());
       
  3717   Node* dirty_card = __ ConI((jint)CardTableModRefBS::dirty_card_val());
  3717   Node* zeroX = __ ConX(0);
  3718   Node* zeroX = __ ConX(0);
  3718 
  3719 
  3719   // Get the alias_index for raw card-mark memory
  3720   // Get the alias_index for raw card-mark memory
  3720   const TypePtr* card_type = TypeRawPtr::BOTTOM;
  3721   const TypePtr* card_type = TypeRawPtr::BOTTOM;
  3721 
  3722 
  3767         // Ok must mark the card if not already dirty
  3768         // Ok must mark the card if not already dirty
  3768 
  3769 
  3769         // load the original value of the card
  3770         // load the original value of the card
  3770         Node* card_val = __ load(__ ctrl(), card_adr, TypeInt::INT, T_BYTE, Compile::AliasIdxRaw);
  3771         Node* card_val = __ load(__ ctrl(), card_adr, TypeInt::INT, T_BYTE, Compile::AliasIdxRaw);
  3771 
  3772 
  3772         __ if_then(card_val, BoolTest::ne, zero); {
  3773         __ if_then(card_val, BoolTest::ne, young_card); {
  3773           g1_mark_card(ideal, card_adr, oop_store, alias_idx, index, index_adr, buffer, tf);
  3774           sync_kit(ideal);
       
  3775           // Use Op_MemBarVolatile to achieve the effect of a StoreLoad barrier.
       
  3776           insert_mem_bar(Op_MemBarVolatile, oop_store);
       
  3777           __ sync_kit(this);
       
  3778 
       
  3779           Node* card_val_reload = __ load(__ ctrl(), card_adr, TypeInt::INT, T_BYTE, Compile::AliasIdxRaw);
       
  3780           __ if_then(card_val_reload, BoolTest::ne, dirty_card); {
       
  3781             g1_mark_card(ideal, card_adr, oop_store, alias_idx, index, index_adr, buffer, tf);
       
  3782           } __ end_if();
  3774         } __ end_if();
  3783         } __ end_if();
  3775       } __ end_if();
  3784       } __ end_if();
  3776     } __ end_if();
  3785     } __ end_if();
  3777   } else {
  3786   } else {
  3778     // Object.clone() instrinsic uses this path.
  3787     // Object.clone() instrinsic uses this path.