Skip to content

Commit

Permalink
8325897: Parallel: Remove PSYoungGen::is_maximal_no_gc
Browse files Browse the repository at this point in the history
Reviewed-by: ayang
  • Loading branch information
lgxbslgx committed Mar 14, 2024
1 parent 98e4b75 commit 357c912
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -208,7 +208,8 @@ size_t ParallelScavengeHeap::used() const {
}

bool ParallelScavengeHeap::is_maximal_no_gc() const {
return old_gen()->is_maximal_no_gc() && young_gen()->is_maximal_no_gc();
// We don't expand young-gen except at a GC.
return old_gen()->is_maximal_no_gc();
}


Expand Down
6 changes: 1 addition & 5 deletions src/hotspot/share/gc/parallel/psYoungGen.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -123,10 +123,6 @@ class PSYoungGen : public CHeapObj<mtGC> {
size_t min_gen_size() const { return _min_gen_size; }
size_t max_gen_size() const { return _max_gen_size; }

bool is_maximal_no_gc() const {
return true; // Never expands except at a GC
}

// Allocation
HeapWord* allocate(size_t word_size) {
HeapWord* result = eden_space()->cas_allocate(word_size);
Expand Down

0 comments on commit 357c912

Please sign in to comment.