8282763: G1: G1CardSetContainer remove intrusive-list details.

Reviewed-by: tschatzl, kbarrett, ayang
This commit is contained in:
Ivan Walulya 2022-03-11 08:43:04 +00:00
parent 88f0938c94
commit 1a5a496aee
2 changed files with 4 additions and 26 deletions

View File

@ -30,11 +30,6 @@
#include "runtime/atomic.hpp"
#include "utilities/bitMap.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/spinYield.hpp"
#include "logging/log.hpp"
#include "runtime/thread.inline.hpp"
// A helper class to encode a few card indexes within a CardSetPtr.
//
@ -143,18 +138,12 @@ public:
// To maintain these constraints, live objects should have ((_ref_count & 0x1) == 1),
// which requires that we increment the reference counts by 2 starting at _ref_count = 3.
//
// When such an object is on a free list, we reuse the same field for linking
// together those free objects.
//
// All but inline pointers are of this kind. For those, card entries are stored
// directly in the CardSetPtr of the ConcurrentHashTable node.
class G1CardSetContainer {
private:
union {
G1CardSetContainer* _next;
uintptr_t _ref_count;
};
uintptr_t _ref_count;
protected:
~G1CardSetContainer() = default;
public:
G1CardSetContainer() : _ref_count(3) { }
@ -166,18 +155,6 @@ public:
// to check the value after attempting to decrement.
uintptr_t decrement_refcount();
G1CardSetContainer* next() {
return _next;
}
G1CardSetContainer** next_addr() {
return &_next;
}
void set_next(G1CardSetContainer* next) {
_next = next;
}
// Log of largest card index that can be stored in any G1CardSetContainer
static uint LogCardsPerRegionLimit;
};

View File

@ -29,6 +29,7 @@
#include "gc/g1/g1GCPhaseTimes.hpp"
#include "utilities/bitMap.inline.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/spinYield.hpp"
inline G1CardSetInlinePtr::CardSetPtr G1CardSetInlinePtr::merge(CardSetPtr orig_value, uint card_in_region, uint idx, uint bits_per_card) {
assert((idx & (SizeFieldMask >> SizeFieldPos)) == idx, "Index %u too large to fit into size field", idx);