< prev index next >

src/hotspot/share/classfile/classLoaderData.hpp

CLD claiming v2

*** 257,267 **** s2 _keep_alive; // if this CLD is kept alive. // Used for unsafe anonymous classes and the boot class // loader. _keep_alive does not need to be volatile or // atomic since there is one unique CLD per unsafe anonymous class. ! volatile int _claim_value; // non-zero if claimed, for example during GC traces. // To avoid applying oop closure more than once. ChunkedHandleList _handles; // Handles to constant pool arrays, Modules, etc, which // have the same life cycle of the corresponding ClassLoader. NOT_PRODUCT(volatile int _dependency_count;) // number of class loader dependencies --- 257,267 ---- s2 _keep_alive; // if this CLD is kept alive. // Used for unsafe anonymous classes and the boot class // loader. _keep_alive does not need to be volatile or // atomic since there is one unique CLD per unsafe anonymous class. ! volatile int _claim; // non-zero if claimed, for example during GC traces. // To avoid applying oop closure more than once. ChunkedHandleList _handles; // Handles to constant pool arrays, Modules, etc, which // have the same life cycle of the corresponding ClassLoader. NOT_PRODUCT(volatile int _dependency_count;) // number of class loader dependencies ***************
*** 332,354 **** void initialize_name(Handle class_loader); public: // GC interface. ! // The "claim_value" 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, ! // in which case the claim value is enum { ! _claim_value_none = 0, ! _claim_value_strong = 1, ! _claim_value_finalizable = 2 }; ! void clear_claimed() { _claim_value = 0; } ! bool claimed() const { return _claim_value != 0; } ! bool claim(int claim_value); ! int claim_value() const { return _claim_value; } ! void set_claim_value(int claim_value) { _claim_value = claim_value; } // Computes if the CLD is alive or not. This is safe to call in concurrent // contexts. bool is_alive() const; --- 332,353 ---- void initialize_name(Handle class_loader); public: // GC interface. ! // 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 }; ! void clear_claim() { _claim = 0; } ! bool claimed() const { return _claim != 0; } ! 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. bool is_alive() const;
< prev index next >