Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8282096: G1: Remove redundant checks in G1CardSet::free_mem_object
Reviewed-by: tschatzl, iwalulya
  • Loading branch information
albertnetymk committed Feb 21, 2022
1 parent 52a85d8 commit c5d9142
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/hotspot/share/gc/g1/g1CardSet.cpp
Expand Up @@ -365,15 +365,7 @@ void G1CardSet::free_mem_object(CardSetPtr card_set) {
assert(type == G1CardSet::CardSetArrayOfCards ||
type == G1CardSet::CardSetBitMap ||
type == G1CardSet::CardSetHowl, "should not free card set type %zu", type);

#ifdef ASSERT
if (type == G1CardSet::CardSetArrayOfCards ||
type == G1CardSet::CardSetBitMap ||
type == G1CardSet::CardSetHowl) {
G1CardSetContainer* card_set = (G1CardSetContainer*)value;
assert((card_set->refcount() == 1), "must be");
}
#endif
assert(static_cast<G1CardSetContainer*>(value)->refcount() == 1, "must be");

_mm->free(card_set_type_to_mem_object_type(type), value);
}
Expand Down

1 comment on commit c5d9142

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.