Skip to content

Commit 450b27d

Browse files
author
Thomas Schatzl
committed
make things selectable
1 parent 26f5c5f commit 450b27d

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/hotspot/share/gc/g1/c2/g1BarrierSetC2.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,11 @@ void G1BarrierSetC2::post_barrier(GraphKit* kit,
468468
Node* card_val = __ load(__ ctrl(), card_adr, TypeInt::INT, T_BYTE, Compile::AliasIdxRaw);
469469

470470
__ if_then(card_val, BoolTest::ne, young_card, unlikely); {
471-
//kit->sync_kit(ideal);
472-
//kit->insert_mem_bar(Op_MemBarVolatile, oop_store);
473-
//__ sync_kit(kit);
471+
if (!UseNewCode) {
472+
kit->sync_kit(ideal);
473+
kit->insert_mem_bar(Op_MemBarVolatile, oop_store);
474+
__ sync_kit(kit);
475+
}
474476

475477
Node* card_val_reload = __ load(__ ctrl(), card_adr, TypeInt::INT, T_BYTE, Compile::AliasIdxRaw);
476478
__ if_then(card_val_reload, BoolTest::ne, dirty_card); {

src/hotspot/share/gc/g1/g1DirtyCardQueue.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,11 @@ class G1RefineBufferedCards : public StackObj {
448448
// setting the regions' tops in humongous allocation path).
449449
// It's okay that reading region's top and reading region's type were racy
450450
// wrto each other. We need both set, in any order, to proceed.
451-
SystemMemoryBarrier::emit();
451+
if (!UseNewCode) {
452+
OrderAccess::fence();
453+
} else {
454+
SystemMemoryBarrier::emit();
455+
}
452456
sort_cards(first_clean_index);
453457
return refine_cleaned_cards(first_clean_index);
454458
}

0 commit comments

Comments
 (0)