< prev index next >

src/share/vm/opto/graphKit.cpp

Print this page




3831 
3832   // Get the alias_index for raw card-mark memory
3833   int adr_type = Compile::AliasIdxRaw;
3834   Node*   zero = __ ConI(0); // Dirty card value
3835   BasicType bt = T_BYTE;
3836 
3837   if (UseCondCardMark) {
3838     // The classic GC reference write barrier is typically implemented
3839     // as a store into the global card mark table.  Unfortunately
3840     // unconditional stores can result in false sharing and excessive
3841     // coherence traffic as well as false transactional aborts.
3842     // UseCondCardMark enables MP "polite" conditional card mark
3843     // stores.  In theory we could relax the load from ctrl() to
3844     // no_ctrl, but that doesn't buy much latitude.
3845     Node* card_val = __ load( __ ctrl(), card_adr, TypeInt::BYTE, bt, adr_type);
3846     __ if_then(card_val, BoolTest::ne, zero);
3847   }
3848 
3849   // Smash zero into card
3850   if( !UseConcMarkSweepGC ) {



3851     __ store(__ ctrl(), card_adr, zero, bt, adr_type, MemNode::release);

3852   } else {
3853     // Specialized path for CM store barrier
3854     __ storeCM(__ ctrl(), card_adr, zero, oop_store, adr_idx, bt, adr_type);
3855   }
3856 
3857   if (UseCondCardMark) {
3858     __ end_if();
3859   }
3860 
3861   // Final sync IdealKit and GraphKit.
3862   final_sync(ideal);
3863 }
3864 
3865 // G1 pre/post barriers
3866 void GraphKit::g1_write_barrier_pre(bool do_load,
3867                                     Node* obj,
3868                                     Node* adr,
3869                                     uint alias_idx,
3870                                     Node* val,
3871                                     const TypeOopPtr* val_type,




3831 
3832   // Get the alias_index for raw card-mark memory
3833   int adr_type = Compile::AliasIdxRaw;
3834   Node*   zero = __ ConI(0); // Dirty card value
3835   BasicType bt = T_BYTE;
3836 
3837   if (UseCondCardMark) {
3838     // The classic GC reference write barrier is typically implemented
3839     // as a store into the global card mark table.  Unfortunately
3840     // unconditional stores can result in false sharing and excessive
3841     // coherence traffic as well as false transactional aborts.
3842     // UseCondCardMark enables MP "polite" conditional card mark
3843     // stores.  In theory we could relax the load from ctrl() to
3844     // no_ctrl, but that doesn't buy much latitude.
3845     Node* card_val = __ load( __ ctrl(), card_adr, TypeInt::BYTE, bt, adr_type);
3846     __ if_then(card_val, BoolTest::ne, zero);
3847   }
3848 
3849   // Smash zero into card
3850   if( !UseConcMarkSweepGC ) {
3851 #if defined(AARCH64)
3852     __ store(__ ctrl(), card_adr, zero, bt, adr_type, MemNode::unordered);
3853 #else
3854     __ store(__ ctrl(), card_adr, zero, bt, adr_type, MemNode::release);
3855 #endif
3856   } else {
3857     // Specialized path for CM store barrier
3858     __ storeCM(__ ctrl(), card_adr, zero, oop_store, adr_idx, bt, adr_type);
3859   }
3860 
3861   if (UseCondCardMark) {
3862     __ end_if();
3863   }
3864 
3865   // Final sync IdealKit and GraphKit.
3866   final_sync(ideal);
3867 }
3868 
3869 // G1 pre/post barriers
3870 void GraphKit::g1_write_barrier_pre(bool do_load,
3871                                     Node* obj,
3872                                     Node* adr,
3873                                     uint alias_idx,
3874                                     Node* val,
3875                                     const TypeOopPtr* val_type,


< prev index next >