Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/graphKit.cpp @ 3282:149bb459be66
7029167: add support for conditional card marks
Reviewed-by: iveresov, kvn
author | never |
---|---|
date | Wed, 27 Apr 2011 15:40:36 -0700 |
parents | 548597e74aa4 |
children | 286c498ae0d4 |
comparison
equal
deleted
inserted
replaced
3281:273b56978029 | 3282:149bb459be66 |
---|---|
3445 // Combine card table base and card offset | 3445 // Combine card table base and card offset |
3446 Node* card_adr = __ AddP(__ top(), byte_map_base_node(), card_offset ); | 3446 Node* card_adr = __ AddP(__ top(), byte_map_base_node(), card_offset ); |
3447 | 3447 |
3448 // Get the alias_index for raw card-mark memory | 3448 // Get the alias_index for raw card-mark memory |
3449 int adr_type = Compile::AliasIdxRaw; | 3449 int adr_type = Compile::AliasIdxRaw; |
3450 Node* zero = __ ConI(0); // Dirty card value | |
3451 BasicType bt = T_BYTE; | |
3452 | |
3453 if (UseCondCardMark) { | |
3454 // The classic GC reference write barrier is typically implemented | |
3455 // as a store into the global card mark table. Unfortunately | |
3456 // unconditional stores can result in false sharing and excessive | |
3457 // coherence traffic as well as false transactional aborts. | |
3458 // UseCondCardMark enables MP "polite" conditional card mark | |
3459 // stores. In theory we could relax the load from ctrl() to | |
3460 // no_ctrl, but that doesn't buy much latitude. | |
3461 Node* card_val = __ load( __ ctrl(), card_adr, TypeInt::BYTE, bt, adr_type); | |
3462 __ if_then(card_val, BoolTest::ne, zero); | |
3463 } | |
3464 | |
3450 // Smash zero into card | 3465 // Smash zero into card |
3451 Node* zero = __ ConI(0); | |
3452 BasicType bt = T_BYTE; | |
3453 if( !UseConcMarkSweepGC ) { | 3466 if( !UseConcMarkSweepGC ) { |
3454 __ store(__ ctrl(), card_adr, zero, bt, adr_type); | 3467 __ store(__ ctrl(), card_adr, zero, bt, adr_type); |
3455 } else { | 3468 } else { |
3456 // Specialized path for CM store barrier | 3469 // Specialized path for CM store barrier |
3457 __ storeCM(__ ctrl(), card_adr, zero, oop_store, adr_idx, bt, adr_type); | 3470 __ storeCM(__ ctrl(), card_adr, zero, oop_store, adr_idx, bt, adr_type); |
3471 } | |
3472 | |
3473 if (UseCondCardMark) { | |
3474 __ end_if(); | |
3458 } | 3475 } |
3459 | 3476 |
3460 // Final sync IdealKit and GraphKit. | 3477 // Final sync IdealKit and GraphKit. |
3461 final_sync(ideal); | 3478 final_sync(ideal); |
3462 } | 3479 } |