< prev index next >
src/hotspot/share/gc/g1/g1CollectedHeap.hpp
Print this page
rev 51649 : version 1
rev 51652 : Added support for eager mixed collection of evacuation failure regions
rev 51878 : Minor changes
rev 52017 : All changes for G1 GC moved from 'combined' repo folder
*** 41,50 ****
--- 41,51 ----
#include "gc/g1/g1InCSetState.hpp"
#include "gc/g1/g1MonitoringSupport.hpp"
#include "gc/g1/g1SurvivorRegions.hpp"
#include "gc/g1/g1YCTypes.hpp"
#include "gc/g1/heapRegionManager.hpp"
+ #include "gc/g1/heapRegionManagerForHeteroHeap.hpp"
#include "gc/g1/heapRegionSet.hpp"
#include "gc/shared/barrierSet.hpp"
#include "gc/shared/collectedHeap.hpp"
#include "gc/shared/gcHeapSummary.hpp"
#include "gc/shared/plab.hpp"
*** 192,202 ****
// Callback for region mapping changed events.
G1RegionMappingChangedListener _listener;
// The sequence of all heap regions in the heap.
! HeapRegionManager _hrm;
// Manages all allocations with regions except humongous object allocations.
G1Allocator* _allocator;
// Manages all heap verification.
--- 193,206 ----
// Callback for region mapping changed events.
G1RegionMappingChangedListener _listener;
// The sequence of all heap regions in the heap.
! HeapRegionManager* _hrm;
!
! // is the heap on heterogenous memory?
! bool _is_hetero_heap;
// Manages all allocations with regions except humongous object allocations.
G1Allocator* _allocator;
// Manages all heap verification.
*** 951,960 ****
--- 955,968 ----
G1CollectorState* collector_state() { return &_collector_state; }
// The current policy object for the collector.
G1Policy* g1_policy() const { return _g1_policy; }
+ HeapRegionManager* hrm() const { return _hrm; }
+
+ bool is_hetero_heap() const { return _is_hetero_heap; }
+
const G1CollectionSet* collection_set() const { return &_collection_set; }
G1CollectionSet* collection_set() { return &_collection_set; }
virtual CollectorPolicy* collector_policy() const;
*** 1003,1039 ****
// allocation, via inlined code (by exporting the address of the top and
// end fields defining the extent of the contiguous allocation region.)
// But G1CollectedHeap doesn't yet support this.
virtual bool is_maximal_no_gc() const {
! return _hrm.available() == 0;
}
// Returns whether there are any regions left in the heap for allocation.
bool has_regions_left_for_allocation() const {
return !is_maximal_no_gc() || num_free_regions() != 0;
}
// The current number of regions in the heap.
! uint num_regions() const { return _hrm.length(); }
// The max number of regions in the heap.
! uint max_regions() const { return _hrm.max_length(); }
// The number of regions that are completely free.
! uint num_free_regions() const { return _hrm.num_free_regions(); }
MemoryUsage get_auxiliary_data_memory_usage() const {
! return _hrm.get_auxiliary_data_memory_usage();
}
// The number of regions that are not completely free.
uint num_used_regions() const { return num_regions() - num_free_regions(); }
#ifdef ASSERT
bool is_on_master_free_list(HeapRegion* hr) {
! return _hrm.is_free(hr);
}
#endif // ASSERT
inline void old_set_add(HeapRegion* hr);
inline void old_set_remove(HeapRegion* hr);
--- 1011,1050 ----
// allocation, via inlined code (by exporting the address of the top and
// end fields defining the extent of the contiguous allocation region.)
// But G1CollectedHeap doesn't yet support this.
virtual bool is_maximal_no_gc() const {
! return _hrm->available() == 0;
}
// Returns whether there are any regions left in the heap for allocation.
bool has_regions_left_for_allocation() const {
return !is_maximal_no_gc() || num_free_regions() != 0;
}
// The current number of regions in the heap.
! uint num_regions() const { return _hrm->length(); }
// The max number of regions in the heap.
! uint max_regions() const { return _hrm->max_length(); }
!
! // Max number of regions that can be comitted.
! uint max_expandable_regions() const { return _hrm->max_expandable_length(); }
// The number of regions that are completely free.
! uint num_free_regions() const { return _hrm->num_free_regions(); }
MemoryUsage get_auxiliary_data_memory_usage() const {
! return _hrm->get_auxiliary_data_memory_usage();
}
// The number of regions that are not completely free.
uint num_used_regions() const { return num_regions() - num_free_regions(); }
#ifdef ASSERT
bool is_on_master_free_list(HeapRegion* hr) {
! return _hrm->is_free(hr);
}
#endif // ASSERT
inline void old_set_add(HeapRegion* hr);
inline void old_set_remove(HeapRegion* hr);
*** 1086,1102 ****
inline InCSetState in_cset_state(const oop obj);
// Return "TRUE" iff the given object address is in the reserved
// region of g1.
bool is_in_g1_reserved(const void* p) const {
! return _hrm.reserved().contains(p);
}
// Returns a MemRegion that corresponds to the space that has been
// reserved for the heap
MemRegion g1_reserved() const {
! return _hrm.reserved();
}
virtual bool is_in_closed_subset(const void* p) const;
G1HotCardCache* g1_hot_card_cache() const { return _hot_card_cache; }
--- 1097,1113 ----
inline InCSetState in_cset_state(const oop obj);
// Return "TRUE" iff the given object address is in the reserved
// region of g1.
bool is_in_g1_reserved(const void* p) const {
! return _hrm->reserved().contains(p);
}
// Returns a MemRegion that corresponds to the space that has been
// reserved for the heap
MemRegion g1_reserved() const {
! return _hrm->reserved();
}
virtual bool is_in_closed_subset(const void* p) const;
G1HotCardCache* g1_hot_card_cache() const { return _hot_card_cache; }
*** 1212,1221 ****
--- 1223,1235 ----
static size_t humongous_obj_size_in_regions(size_t word_size);
// Print the maximum heap capacity.
virtual size_t max_capacity() const;
+ // Return the size of reserved memory. Returns different value than max_capacity() when AllocateOldGenAt is used.
+ virtual size_t max_reserved_capacity() const;
+
virtual jlong millis_since_last_gc();
// Convenience function to be used in situations where the heap type can be
// asserted to be this type.
< prev index next >