< prev index next >

src/hotspot/share/gc/z/zReferenceProcessor.hpp

Print this page




  22  */
  23 
  24 #ifndef SHARE_GC_Z_ZREFERENCEPROCESSOR_HPP
  25 #define SHARE_GC_Z_ZREFERENCEPROCESSOR_HPP
  26 
  27 #include "gc/shared/referenceDiscoverer.hpp"
  28 #include "gc/z/zValue.hpp"
  29 
  30 class ReferencePolicy;
  31 class ZWorkers;
  32 
  33 class ZReferenceProcessor : public ReferenceDiscoverer {
  34   friend class ZReferenceProcessorTask;
  35 
  36 private:
  37   typedef size_t Counters[REF_COUNT];
  38 
  39   ZWorkers* const      _workers;
  40   ReferencePolicy*     _soft_reference_policy;
  41   ZPerWorker<Counters> _encountered_count;
  42   ZPerWorker<Counters> _dropped_count;
  43   ZPerWorker<Counters> _enqueued_count;
  44   ZPerWorker<oop>      _discovered_list;
  45   ZContended<oop>      _pending_list;
  46   oop*                 _pending_list_tail;
  47 
  48   void update_soft_reference_clock() const;
  49 
  50   ReferenceType reference_type(oop obj) const;
  51   volatile oop* reference_referent_addr(oop obj) const;
  52   oop reference_referent(oop obj) const;
  53   bool is_reference_inactive(oop obj) const;
  54   bool is_referent_alive_or_null(oop obj, ReferenceType type) const;
  55   bool is_referent_softly_alive(oop obj, ReferenceType type) const;
  56   bool should_drop_reference(oop obj, ReferenceType type) const;
  57   bool should_mark_referent(ReferenceType type) const;
  58   bool should_clear_referent(ReferenceType type) const;
  59   void keep_referent_alive(oop obj, ReferenceType type) const;
  60 
  61   void discover(oop obj, ReferenceType type);
  62   oop drop(oop obj, ReferenceType type);


  22  */
  23 
  24 #ifndef SHARE_GC_Z_ZREFERENCEPROCESSOR_HPP
  25 #define SHARE_GC_Z_ZREFERENCEPROCESSOR_HPP
  26 
  27 #include "gc/shared/referenceDiscoverer.hpp"
  28 #include "gc/z/zValue.hpp"
  29 
  30 class ReferencePolicy;
  31 class ZWorkers;
  32 
  33 class ZReferenceProcessor : public ReferenceDiscoverer {
  34   friend class ZReferenceProcessorTask;
  35 
  36 private:
  37   typedef size_t Counters[REF_COUNT];
  38 
  39   ZWorkers* const      _workers;
  40   ReferencePolicy*     _soft_reference_policy;
  41   ZPerWorker<Counters> _encountered_count;
  42   ZPerWorker<Counters> _discovered_count;
  43   ZPerWorker<Counters> _enqueued_count;
  44   ZPerWorker<oop>      _discovered_list;
  45   ZContended<oop>      _pending_list;
  46   oop*                 _pending_list_tail;
  47 
  48   void update_soft_reference_clock() const;
  49 
  50   ReferenceType reference_type(oop obj) const;
  51   volatile oop* reference_referent_addr(oop obj) const;
  52   oop reference_referent(oop obj) const;
  53   bool is_reference_inactive(oop obj) const;
  54   bool is_referent_alive_or_null(oop obj, ReferenceType type) const;
  55   bool is_referent_softly_alive(oop obj, ReferenceType type) const;
  56   bool should_drop_reference(oop obj, ReferenceType type) const;
  57   bool should_mark_referent(ReferenceType type) const;
  58   bool should_clear_referent(ReferenceType type) const;
  59   void keep_referent_alive(oop obj, ReferenceType type) const;
  60 
  61   void discover(oop obj, ReferenceType type);
  62   oop drop(oop obj, ReferenceType type);
< prev index next >