mirror of
https://github.com/openjdk/jdk.git
synced 2026-07-19 07:29:08 +00:00
8326975: Parallel: Remove redundant PSOldGen::is_allocated
Reviewed-by: gli, tschatzl
This commit is contained in:
parent
430290066c
commit
8f6edd8dc8
@ -122,7 +122,7 @@ jint ParallelScavengeHeap::initialize() {
|
||||
_gc_policy_counters =
|
||||
new PSGCAdaptivePolicyCounters("ParScav:MSC", 2, 2, _size_policy);
|
||||
|
||||
if (!PSParallelCompact::initialize()) {
|
||||
if (!PSParallelCompact::initialize_aux_data()) {
|
||||
return JNI_ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
@ -121,12 +121,6 @@ void PSOldGen::initialize_performance_counters(const char* perf_data_name, int l
|
||||
_object_space, _gen_counters);
|
||||
}
|
||||
|
||||
// Assume that the generation has been allocated if its
|
||||
// reserved size is not 0.
|
||||
bool PSOldGen::is_allocated() {
|
||||
return virtual_space()->reserved_size() != 0;
|
||||
}
|
||||
|
||||
size_t PSOldGen::num_iterable_blocks() const {
|
||||
return (object_space()->used_in_bytes() + IterateBlockSize - 1) / IterateBlockSize;
|
||||
}
|
||||
|
||||
@ -105,9 +105,6 @@ class PSOldGen : public CHeapObj<mtGC> {
|
||||
ObjectStartArray* start_array() { return &_start_array; }
|
||||
PSVirtualSpace* virtual_space() const { return _virtual_space;}
|
||||
|
||||
// Has the generation been successfully allocated?
|
||||
bool is_allocated();
|
||||
|
||||
// Size info
|
||||
size_t capacity_in_bytes() const { return object_space()->capacity_in_bytes(); }
|
||||
size_t used_in_bytes() const { return object_space()->used_in_bytes(); }
|
||||
|
||||
@ -862,14 +862,10 @@ void PSParallelCompact::post_initialize() {
|
||||
ParCompactionManager::initialize(mark_bitmap());
|
||||
}
|
||||
|
||||
bool PSParallelCompact::initialize() {
|
||||
bool PSParallelCompact::initialize_aux_data() {
|
||||
ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
|
||||
MemRegion mr = heap->reserved_region();
|
||||
|
||||
// Was the old gen get allocated successfully?
|
||||
if (!heap->old_gen()->is_allocated()) {
|
||||
return false;
|
||||
}
|
||||
assert(mr.byte_size() != 0, "heap should be reserved");
|
||||
|
||||
initialize_space_info();
|
||||
initialize_dead_wood_limiter();
|
||||
|
||||
@ -1069,7 +1069,7 @@ class PSParallelCompact : AllStatic {
|
||||
// allocations. This should be called during the VM initialization
|
||||
// at a pointer where it would be appropriate to return a JNI_ENOMEM
|
||||
// in the event of a failure.
|
||||
static bool initialize();
|
||||
static bool initialize_aux_data();
|
||||
|
||||
// Closure accessors
|
||||
static BoolObjectClosure* is_alive_closure() { return &_is_alive_closure; }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user