Skip to content

Commit 7ec55df

Browse files
committedJul 17, 2024
8336638: Parallel: Remove redundant mangle in PSScavenge::invoke
Reviewed-by: zgu
1 parent 6df7acb commit 7ec55df

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed
 

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

+3-4
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,9 @@ bool PSScavenge::invoke(bool clear_soft_refs) {
344344
PSOldGen* old_gen = heap->old_gen();
345345
PSAdaptiveSizePolicy* size_policy = heap->size_policy();
346346

347+
assert(young_gen->to_space()->is_empty(),
348+
"Attempt to scavenge with live objects in to_space");
349+
347350
heap->increment_total_collections();
348351

349352
if (AdaptiveSizePolicy::should_update_eden_stats(gc_cause)) {
@@ -379,10 +382,6 @@ bool PSScavenge::invoke(bool clear_soft_refs) {
379382
// Let the size policy know we're starting
380383
size_policy->minor_collection_begin();
381384

382-
assert(young_gen->to_space()->is_empty(),
383-
"Attempt to scavenge with live objects in to_space");
384-
young_gen->to_space()->clear(SpaceDecorator::Mangle);
385-
386385
#if COMPILER2_OR_JVMCI
387386
DerivedPointerTable::clear();
388387
#endif

0 commit comments

Comments
 (0)
Please sign in to comment.