src/share/vm/memory/referenceProcessor.hpp

changeset 3117
eca1193ca245
parent 3115
c2bf0120ee5d
child 3175
4dfb2df418f2
equal deleted inserted replaced
3116:05550041d664 3117:eca1193ca245
50 class AbstractRefProcTaskExecutor; 50 class AbstractRefProcTaskExecutor;
51 class DiscoveredList; 51 class DiscoveredList;
52 52
53 class ReferenceProcessor : public CHeapObj { 53 class ReferenceProcessor : public CHeapObj {
54 protected: 54 protected:
55 // Compatibility with pre-4965777 JDK's
56 static bool _pending_list_uses_discovered_field;
55 MemRegion _span; // (right-open) interval of heap 57 MemRegion _span; // (right-open) interval of heap
56 // subject to wkref discovery 58 // subject to wkref discovery
57 bool _discovering_refs; // true when discovery enabled 59 bool _discovering_refs; // true when discovery enabled
58 bool _discovery_is_atomic; // if discovery is atomic wrt 60 bool _discovery_is_atomic; // if discovery is atomic wrt
59 // other collectors in configuration 61 // other collectors in configuration
109 _always_clear_soft_ref_policy : _default_soft_ref_policy; 111 _always_clear_soft_ref_policy : _default_soft_ref_policy;
110 _current_soft_ref_policy->setup(); // snapshot the policy threshold 112 _current_soft_ref_policy->setup(); // snapshot the policy threshold
111 return _current_soft_ref_policy; 113 return _current_soft_ref_policy;
112 } 114 }
113 115
114 public:
115 // Process references with a certain reachability level. 116 // Process references with a certain reachability level.
116 void process_discovered_reflist(DiscoveredList refs_lists[], 117 void process_discovered_reflist(DiscoveredList refs_lists[],
117 ReferencePolicy* policy, 118 ReferencePolicy* policy,
118 bool clear_referent, 119 bool clear_referent,
119 BoolObjectClosure* is_alive, 120 BoolObjectClosure* is_alive,
295 296
296 // whether discovery is atomic wrt other collectors 297 // whether discovery is atomic wrt other collectors
297 bool discovery_is_atomic() const { return _discovery_is_atomic; } 298 bool discovery_is_atomic() const { return _discovery_is_atomic; }
298 void set_atomic_discovery(bool atomic) { _discovery_is_atomic = atomic; } 299 void set_atomic_discovery(bool atomic) { _discovery_is_atomic = atomic; }
299 300
301 // whether the JDK in which we are embedded is a pre-4965777 JDK,
302 // and thus whether or not it uses the discovered field to chain
303 // the entries in the pending list.
304 static bool pending_list_uses_discovered_field() {
305 return _pending_list_uses_discovered_field;
306 }
307
300 // whether discovery is done by multiple threads same-old-timeously 308 // whether discovery is done by multiple threads same-old-timeously
301 bool discovery_is_mt() const { return _discovery_is_mt; } 309 bool discovery_is_mt() const { return _discovery_is_mt; }
302 void set_mt_discovery(bool mt) { _discovery_is_mt = mt; } 310 void set_mt_discovery(bool mt) { _discovery_is_mt = mt; }
303 311
304 // Whether we are in a phase when _processing_ is MT. 312 // Whether we are in a phase when _processing_ is MT.

mercurial