mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-28 15:51:02 +00:00
8373272: Genshen: ShenandoahOldGenerationTest fails after JDK-8373056
Reviewed-by: wkemper
This commit is contained in:
parent
b1c9550182
commit
3ea82b9ff9
@ -165,35 +165,12 @@ TEST_VM_F(ShenandoahOldGenerationTest, test_actual_size_exceeds_promotion_reserv
|
||||
EXPECT_FALSE(promotions_enabled()) << "New plab can only be used for evacuations";
|
||||
}
|
||||
|
||||
TEST_VM_F(ShenandoahOldGenerationTest, test_shared_expends_promoted_but_does_not_change_plab) {
|
||||
TEST_VM_F(ShenandoahOldGenerationTest, test_expend_promoted_should_increase_expended) {
|
||||
SKIP_IF_NOT_SHENANDOAH();
|
||||
ShenandoahAllocRequest req = ShenandoahAllocRequest::for_shared_gc(128, ShenandoahAffiliation::OLD_GENERATION, true);
|
||||
req.set_actual_size(128);
|
||||
size_t actual_size = req.actual_size() * HeapWordSize;
|
||||
|
||||
size_t expended_before = old->get_promoted_expended();
|
||||
old->configure_plab_for_current_thread(req);
|
||||
old->expend_promoted(128);
|
||||
size_t expended_after = old->get_promoted_expended();
|
||||
|
||||
EXPECT_EQ(expended_before + actual_size, expended_after) << "Shared promotion still expends promotion";
|
||||
EXPECT_EQ(plab_promoted(), INITIAL_PLAB_PROMOTED) << "Shared promotion should not count in plab";
|
||||
EXPECT_EQ(plab_size(), INITIAL_PLAB_SIZE) << "Shared promotion should not change size of plab";
|
||||
EXPECT_FALSE(promotions_enabled());
|
||||
}
|
||||
|
||||
TEST_VM_F(ShenandoahOldGenerationTest, test_shared_evacuation_has_no_side_effects) {
|
||||
SKIP_IF_NOT_SHENANDOAH();
|
||||
ShenandoahAllocRequest req = ShenandoahAllocRequest::for_shared_gc(128, ShenandoahAffiliation::OLD_GENERATION, false);
|
||||
req.set_actual_size(128);
|
||||
|
||||
size_t expended_before = old->get_promoted_expended();
|
||||
old->configure_plab_for_current_thread(req);
|
||||
size_t expended_after = old->get_promoted_expended();
|
||||
|
||||
EXPECT_EQ(expended_before, expended_after) << "Not a promotion, should not expend promotion reserve";
|
||||
EXPECT_EQ(plab_promoted(), INITIAL_PLAB_PROMOTED) << "Not a plab, should not have touched plab";
|
||||
EXPECT_EQ(plab_size(), INITIAL_PLAB_SIZE) << "Not a plab, should not have touched plab";
|
||||
EXPECT_FALSE(promotions_enabled());
|
||||
EXPECT_EQ(expended_before + 128, expended_after) << "Should expend promotion";
|
||||
}
|
||||
|
||||
#undef SKIP_IF_NOT_SHENANDOAH
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user