src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp

Print this page
rev 5920 : 8035406: Improve data structure for Code Cache remembered sets
Summary: Change the code cache remembered sets data structure from a GrowableArray to a chunked list of nmethods. This makes the data structure more amenable to parallelization, and decreases freeing time.
Reviewed-by:
rev 5921 : 8027295: Free CSet takes ~50% of young pause time
Summary: Improve fast card cache iteration and avoid taking locks when freeing the collection set.
Reviewed-by:


 822   // "scan_rs" to roots inside the heap (having done "set_region" to
 823   // indicate the region in which the root resides),
 824   // and does "scan_metadata" If "scan_rs" is
 825   // NULL, then this step is skipped.  The "worker_i"
 826   // param is for use with parallel roots processing, and should be
 827   // the "i" of the calling parallel worker thread's work(i) function.
 828   // In the sequential case this param will be ignored.
 829   void g1_process_strong_roots(bool is_scavenging,
 830                                ScanningOption so,
 831                                OopClosure* scan_non_heap_roots,
 832                                OopsInHeapRegionClosure* scan_rs,
 833                                G1KlassScanClosure* scan_klasses,
 834                                int worker_i);
 835 
 836   // Frees a non-humongous region by initializing its contents and
 837   // adding it to the free list that's passed as a parameter (this is
 838   // usually a local list which will be appended to the master free
 839   // list later). The used bytes of freed regions are accumulated in
 840   // pre_used. If par is true, the region's RSet will not be freed
 841   // up. The assumption is that this will be done later.


 842   void free_region(HeapRegion* hr,
 843                    size_t* pre_used,
 844                    FreeRegionList* free_list,
 845                    bool par);
 846 
 847   // Frees a humongous region by collapsing it into individual regions
 848   // and calling free_region() for each of them. The freed regions
 849   // will be added to the free list that's passed as a parameter (this
 850   // is usually a local list which will be appended to the master free
 851   // list later). The used bytes of freed regions are accumulated in
 852   // pre_used. If par is true, the region's RSet will not be freed
 853   // up. The assumption is that this will be done later.
 854   void free_humongous_region(HeapRegion* hr,
 855                              size_t* pre_used,
 856                              FreeRegionList* free_list,
 857                              HumongousRegionSet* humongous_proxy_set,
 858                              bool par);
 859 
 860   // Notifies all the necessary spaces that the committed space has
 861   // been updated (either expanded or shrunk). It should be called
 862   // after _g1_storage is updated.
 863   void update_committed_space(HeapWord* old_end, HeapWord* new_end);
 864 
 865   // The concurrent marker (and the thread it runs in.)




 822   // "scan_rs" to roots inside the heap (having done "set_region" to
 823   // indicate the region in which the root resides),
 824   // and does "scan_metadata" If "scan_rs" is
 825   // NULL, then this step is skipped.  The "worker_i"
 826   // param is for use with parallel roots processing, and should be
 827   // the "i" of the calling parallel worker thread's work(i) function.
 828   // In the sequential case this param will be ignored.
 829   void g1_process_strong_roots(bool is_scavenging,
 830                                ScanningOption so,
 831                                OopClosure* scan_non_heap_roots,
 832                                OopsInHeapRegionClosure* scan_rs,
 833                                G1KlassScanClosure* scan_klasses,
 834                                int worker_i);
 835 
 836   // Frees a non-humongous region by initializing its contents and
 837   // adding it to the free list that's passed as a parameter (this is
 838   // usually a local list which will be appended to the master free
 839   // list later). The used bytes of freed regions are accumulated in
 840   // pre_used. If par is true, the region's RSet will not be freed
 841   // up. The assumption is that this will be done later.
 842   // The locked parameter indicates if the caller has already taken
 843   // care of proper synchronization. This may allow some optimizations.
 844   void free_region(HeapRegion* hr,
 845                    size_t* pre_used,
 846                    FreeRegionList* free_list,
 847                    bool par, bool locked = false);
 848 
 849   // Frees a humongous region by collapsing it into individual regions
 850   // and calling free_region() for each of them. The freed regions
 851   // will be added to the free list that's passed as a parameter (this
 852   // is usually a local list which will be appended to the master free
 853   // list later). The used bytes of freed regions are accumulated in
 854   // pre_used. If par is true, the region's RSet will not be freed
 855   // up. The assumption is that this will be done later.
 856   void free_humongous_region(HeapRegion* hr,
 857                              size_t* pre_used,
 858                              FreeRegionList* free_list,
 859                              HumongousRegionSet* humongous_proxy_set,
 860                              bool par);
 861 
 862   // Notifies all the necessary spaces that the committed space has
 863   // been updated (either expanded or shrunk). It should be called
 864   // after _g1_storage is updated.
 865   void update_committed_space(HeapWord* old_end, HeapWord* new_end);
 866 
 867   // The concurrent marker (and the thread it runs in.)