< prev index next >

src/hotspot/share/gc/shared/referenceProcessor.hpp

Print this page
rev 49944 : imported patch 8201492-properly-implement-non-contiguous-reference-processing
rev 49945 : imported patch 8201492-stefanj-review
rev 49946 : imported patch 8201492-kim-review
rev 49949 : imported patch 8202021-cleanup-referenceprocessor
rev 49950 : imported patch 8202021-stefanj-review
rev 49951 : imported patch 8202017-reference-processor-remove-enqueue
rev 49953 : imported patch 8201491-precleaning
rev 49954 : [mq]: 8201491-kbarrett-review


 271                 BoolObjectClosure* is_alive,
 272                 OopClosure*        keep_alive,
 273                 VoidClosure*       complete_gc);
 274   // Phase3: process the referents by either clearing them
 275   // or keeping them alive (and their closure), and enqueuing them.
 276   void process_phase3(DiscoveredList&    refs_list,
 277                       bool               clear_referent,
 278                       BoolObjectClosure* is_alive,
 279                       OopClosure*        keep_alive,
 280                       VoidClosure*       complete_gc);
 281 
 282   // "Preclean" all the discovered reference lists by removing references that
 283   // are active (e.g. due to the mutator calling enqueue()) or with NULL or
 284   // strongly reachable referents.
 285   // The first argument is a predicate on an oop that indicates
 286   // its (strong) reachability and the fourth is a closure that
 287   // may be used to incrementalize or abort the precleaning process.
 288   // The caller is responsible for taking care of potential
 289   // interference with concurrent operations on these lists
 290   // (or predicates involved) by other threads.
 291   // Returns whether the operation should be aborted.
 292   void preclean_discovered_references(BoolObjectClosure* is_alive,
 293                                       OopClosure*        keep_alive,
 294                                       VoidClosure*       complete_gc,
 295                                       YieldClosure*      yield,
 296                                       GCTimer*           gc_timer);
 297 
 298   // Returns the name of the discovered reference list
 299   // occupying the i / _num_queues slot.
 300   const char* list_name(uint i);
 301 
 302 private:
 303   // "Preclean" the given discovered reference list by removing references with
 304   // the attributes mentioned in preclean_discovered_references().
 305   // Supports both normal and fine grain yielding.

 306   bool preclean_discovered_reflist(DiscoveredList&    refs_list,
 307                                    BoolObjectClosure* is_alive,
 308                                    OopClosure*        keep_alive,
 309                                    VoidClosure*       complete_gc,
 310                                    YieldClosure*      yield);
 311 
 312   // round-robin mod _num_queues (not: _not_ mod _max_num_queues)
 313   uint next_id() {
 314     uint id = _next_id;
 315     assert(!_discovery_is_mt, "Round robin should only be used in serial discovery");
 316     if (++_next_id == _num_queues) {
 317       _next_id = 0;
 318     }
 319     assert(_next_id < _num_queues, "_next_id %u _num_queues %u _max_num_queues %u", _next_id, _num_queues, _max_num_queues);
 320     return id;
 321   }
 322   DiscoveredList* get_discovered_list(ReferenceType rt);
 323   inline void add_to_discovered_list_mt(DiscoveredList& refs_list, oop obj,
 324                                         HeapWord* discovered_addr);
 325 




 271                 BoolObjectClosure* is_alive,
 272                 OopClosure*        keep_alive,
 273                 VoidClosure*       complete_gc);
 274   // Phase3: process the referents by either clearing them
 275   // or keeping them alive (and their closure), and enqueuing them.
 276   void process_phase3(DiscoveredList&    refs_list,
 277                       bool               clear_referent,
 278                       BoolObjectClosure* is_alive,
 279                       OopClosure*        keep_alive,
 280                       VoidClosure*       complete_gc);
 281 
 282   // "Preclean" all the discovered reference lists by removing references that
 283   // are active (e.g. due to the mutator calling enqueue()) or with NULL or
 284   // strongly reachable referents.
 285   // The first argument is a predicate on an oop that indicates
 286   // its (strong) reachability and the fourth is a closure that
 287   // may be used to incrementalize or abort the precleaning process.
 288   // The caller is responsible for taking care of potential
 289   // interference with concurrent operations on these lists
 290   // (or predicates involved) by other threads.

 291   void preclean_discovered_references(BoolObjectClosure* is_alive,
 292                                       OopClosure*        keep_alive,
 293                                       VoidClosure*       complete_gc,
 294                                       YieldClosure*      yield,
 295                                       GCTimer*           gc_timer);
 296 
 297   // Returns the name of the discovered reference list
 298   // occupying the i / _num_queues slot.
 299   const char* list_name(uint i);
 300 
 301 private:
 302   // "Preclean" the given discovered reference list by removing references with
 303   // the attributes mentioned in preclean_discovered_references().
 304   // Supports both normal and fine grain yielding.
 305   // Returns whether the operation should be aborted.
 306   bool preclean_discovered_reflist(DiscoveredList&    refs_list,
 307                                    BoolObjectClosure* is_alive,
 308                                    OopClosure*        keep_alive,
 309                                    VoidClosure*       complete_gc,
 310                                    YieldClosure*      yield);
 311 
 312   // round-robin mod _num_queues (not: _not_ mod _max_num_queues)
 313   uint next_id() {
 314     uint id = _next_id;
 315     assert(!_discovery_is_mt, "Round robin should only be used in serial discovery");
 316     if (++_next_id == _num_queues) {
 317       _next_id = 0;
 318     }
 319     assert(_next_id < _num_queues, "_next_id %u _num_queues %u _max_num_queues %u", _next_id, _num_queues, _max_num_queues);
 320     return id;
 321   }
 322   DiscoveredList* get_discovered_list(ReferenceType rt);
 323   inline void add_to_discovered_list_mt(DiscoveredList& refs_list, oop obj,
 324                                         HeapWord* discovered_addr);
 325 


< prev index next >