mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8227175: ZGC: ZHeapIterator visits potentially dead objects
Reviewed-by: zgu, eosterlund
This commit is contained in:
parent
24f58a0ac0
commit
02a31bf561
23 changed files with 395 additions and 187 deletions
|
@ -206,16 +206,17 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
|||
|
||||
// The "claim" is typically used to check if oops_do needs to be applied on
|
||||
// the CLD or not. Most GCs only perform strong marking during the marking phase.
|
||||
enum {
|
||||
_claim_none = 0,
|
||||
_claim_finalizable = 2,
|
||||
_claim_strong = 3
|
||||
enum Claim {
|
||||
_claim_none = 0,
|
||||
_claim_finalizable = 2,
|
||||
_claim_strong = 3,
|
||||
_claim_other = 4
|
||||
};
|
||||
void clear_claim() { _claim = 0; }
|
||||
void clear_claim(int claim);
|
||||
bool claimed() const { return _claim != 0; }
|
||||
bool claimed(int claim) const { return (_claim & claim) == claim; }
|
||||
bool try_claim(int claim);
|
||||
int get_claim() const { return _claim; }
|
||||
void set_claim(int claim) { _claim = claim; }
|
||||
|
||||
// Computes if the CLD is alive or not. This is safe to call in concurrent
|
||||
// contexts.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue