src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Mon Feb 10 13:42:26 2014
--- new/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Mon Feb 10 13:42:26 2014

*** 32,42 **** --- 32,42 ---- #include "gc_implementation/g1/g1MonitoringSupport.hpp" #include "gc_implementation/g1/g1RemSet.hpp" #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" #include "gc_implementation/g1/g1YCTypes.hpp" #include "gc_implementation/g1/heapRegionSeq.hpp" - #include "gc_implementation/g1/heapRegionSets.hpp" #include "gc_implementation/shared/hSpaceCounters.hpp" #include "gc_implementation/shared/parGCAllocBuffer.hpp" #include "memory/barrierSet.hpp" #include "memory/memRegion.hpp" #include "memory/sharedHeap.hpp"
*** 241,262 **** --- 241,262 ---- // The part of _g1_storage that is currently committed. MemRegion _g1_committed; // The master free list. It will satisfy all new region allocations. ! MasterFreeRegionList _free_list; // The secondary free list which contains regions that have been // freed up during the cleanup process. This will be appended to the // master free list when appropriate. ! SecondaryFreeRegionList _secondary_free_list; // It keeps track of the old regions. ! MasterOldRegionSet _old_set; ! HeapRegionSet _old_set; // It keeps track of the humongous regions. ! MasterHumongousRegionSet _humongous_set; ! HeapRegionSet _humongous_set; // The number of regions we could create by expansion. uint _expansion_regions; // The block offset table for the G1 heap.
*** 753,762 **** --- 753,782 ---- G1YCType yc_type(); G1HRPrinter* hr_printer() { return &_hr_printer; } + // Frees a non-humongous region by initializing its contents and + // adding it to the free list that's passed as a parameter (this is + // usually a local list which will be appended to the master free + // list later). The used bytes of freed regions are accumulated in + // pre_used. If par is true, the region's RSet will not be freed + // up. The assumption is that this will be done later. + void free_region(HeapRegion* hr, + FreeRegionList* free_list, + bool par); + + // Frees a humongous region by collapsing it into individual regions + // and calling free_region() for each of them. The freed regions + // will be added to the free list that's passed as a parameter (this + // is usually a local list which will be appended to the master free + // list later). The used bytes of freed regions are accumulated in + // pre_used. If par is true, the region's RSet will not be freed + // up. The assumption is that this will be done later. + void free_humongous_region(HeapRegion* hr, + FreeRegionList* free_list, + bool par); protected: // Shrink the garbage-first heap by at most the given size (in bytes!). // (Rounds down to a HeapRegion boundary.) virtual void shrink(size_t expand_bytes);
*** 836,869 **** --- 856,865 ---- // Apply "blk" to all the weak roots of the system. These include // JNI weak roots, the code cache, system dictionary, symbol table, // string table, and referents of reachable weak refs. void g1_process_weak_roots(OopClosure* root_closure); // Frees a non-humongous region by initializing its contents and // adding it to the free list that's passed as a parameter (this is // usually a local list which will be appended to the master free // list later). The used bytes of freed regions are accumulated in // pre_used. If par is true, the region's RSet will not be freed // up. The assumption is that this will be done later. void free_region(HeapRegion* hr, size_t* pre_used, FreeRegionList* free_list, bool par); // Frees a humongous region by collapsing it into individual regions // and calling free_region() for each of them. The freed regions // will be added to the free list that's passed as a parameter (this // is usually a local list which will be appended to the master free // list later). The used bytes of freed regions are accumulated in // pre_used. If par is true, the region's RSet will not be freed // up. The assumption is that this will be done later. void free_humongous_region(HeapRegion* hr, size_t* pre_used, FreeRegionList* free_list, HumongousRegionSet* humongous_proxy_set, bool par); // Notifies all the necessary spaces that the committed space has // been updated (either expanded or shrunk). It should be called // after _g1_storage is updated. void update_committed_space(HeapWord* old_end, HeapWord* new_end);
*** 1229,1242 **** --- 1225,1234 ---- #ifdef ASSERT bool is_on_master_free_list(HeapRegion* hr) { return hr->containing_set() == &_free_list; } bool is_in_humongous_set(HeapRegion* hr) { return hr->containing_set() == &_humongous_set; } #endif // ASSERT // Wrapper for the region list operations that can be called from // methods outside this class.
*** 1285,1315 **** --- 1277,1290 ---- void collect_locked(GCCause::Cause cause); // True iff an evacuation has failed in the most-recent collection. bool evacuation_failed() { return _evacuation_failed; } // It will free a region if it has allocated objects in it that are // all dead. It calls either free_region() or // free_humongous_region() depending on the type of the region that // is passed to it. void free_region_if_empty(HeapRegion* hr, size_t* pre_used, FreeRegionList* free_list, OldRegionSet* old_proxy_set, HumongousRegionSet* humongous_proxy_set, HRRSCleanupTask* hrrs_cleanup_task, bool par); // It appends the free list to the master free list and updates the // master humongous list according to the contents of the proxy // list. It also adjusts the total used bytes according to pre_used // (if par is true, it will do so by taking the ParGCRareEvent_lock). void update_sets_after_freeing_regions(size_t pre_used, FreeRegionList* free_list, OldRegionSet* old_proxy_set, HumongousRegionSet* humongous_proxy_set, bool par); + void remove_from_sets(const HeapRegionSetCount& old_regions_removed, const HeapRegionSetCount& humongous_regions_removed); + void prepend_to_freelist(FreeRegionList* list); + void decrement_summary_bytes(size_t bytes); + void decrement_summary_bytes_mt(size_t pre_used); // Returns "TRUE" iff "p" points into the committed areas of the heap. virtual bool is_in(const void* p) const; // Return "TRUE" iff the given object address is within the collection

src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File