Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.
/ lanai Public archive

Commit 71b06ed

Browse files
committedApr 21, 2020
8243146: Further cleanups after UseAdaptiveGCBoundary removal
Reviewed-by: kbarrett, sjohanss
1 parent 74b3243 commit 71b06ed

13 files changed

+73
-607
lines changed
 

‎src/hotspot/share/gc/parallel/adjoiningGenerations.cpp

-86
This file was deleted.

‎src/hotspot/share/gc/parallel/adjoiningGenerations.hpp

-70
This file was deleted.

‎src/hotspot/share/gc/parallel/adjoiningVirtualSpaces.cpp

-60
This file was deleted.

‎src/hotspot/share/gc/parallel/adjoiningVirtualSpaces.hpp

-110
This file was deleted.

‎src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp

+25-12
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424

2525
#include "precompiled.hpp"
2626
#include "code/codeCache.hpp"
27-
#include "gc/parallel/adjoiningGenerations.hpp"
28-
#include "gc/parallel/adjoiningVirtualSpaces.hpp"
2927
#include "gc/parallel/parallelArguments.hpp"
3028
#include "gc/parallel/objectStartArray.inline.hpp"
3129
#include "gc/parallel/parallelScavengeHeap.inline.hpp"
@@ -80,19 +78,34 @@ jint ParallelScavengeHeap::initialize() {
8078
BarrierSet::set_barrier_set(barrier_set);
8179

8280
// Make up the generations
83-
// Calculate the maximum size that a generation can grow. This
84-
// includes growth into the other generation. Note that the
85-
// parameter _max_gen_size is kept as the maximum
86-
// size of the generation as the boundaries currently stand.
87-
// _max_gen_size is still used as that value.
81+
assert(MinOldSize <= OldSize && OldSize <= MaxOldSize, "Parameter check");
82+
assert(MinNewSize <= NewSize && NewSize <= MaxNewSize, "Parameter check");
83+
84+
// Layout the reserved space for the generations.
85+
// If OldGen is allocated on nv-dimm, we need to split the reservation (this is required for windows).
86+
ReservedSpace old_rs = heap_rs.first_part(MaxOldSize, ParallelArguments::is_heterogeneous_heap() /* split */);
87+
ReservedSpace young_rs = heap_rs.last_part(MaxOldSize);
88+
assert(young_rs.size() == MaxNewSize, "Didn't reserve all of the heap");
89+
90+
// Create and initialize the generations.
91+
_young_gen = new PSYoungGen(
92+
young_rs,
93+
NewSize,
94+
MinNewSize,
95+
MaxNewSize);
96+
_old_gen = new PSOldGen(
97+
old_rs,
98+
OldSize,
99+
MinOldSize,
100+
MaxOldSize,
101+
"old", 1);
102+
103+
assert(young_gen()->gen_size_limit() == young_rs.size(),"Consistency check");
104+
assert(old_gen()->gen_size_limit() == old_rs.size(), "Consistency check");
105+
88106
double max_gc_pause_sec = ((double) MaxGCPauseMillis)/1000.0;
89107
double max_gc_minor_pause_sec = ((double) MaxGCMinorPauseMillis)/1000.0;
90108

91-
_gens = AdjoiningGenerations::create_adjoining_generations(heap_rs);
92-
93-
_old_gen = _gens->old_gen();
94-
_young_gen = _gens->young_gen();
95-
96109
const size_t eden_capacity = _young_gen->eden_space()->capacity_in_bytes();
97110
const size_t old_capacity = _old_gen->capacity_in_bytes();
98111
const size_t initial_promo_size = MIN2(eden_capacity, old_capacity);

0 commit comments

Comments
 (0)
This repository has been archived.