Skip to content

Commit 96247ae

Browse files
committed
8270187: G1: Remove ConcGCThreads constraint
Reviewed-by: kbarrett, iwalulya
1 parent 9b27df6 commit 96247ae

File tree

5 files changed

+2
-19
lines changed

5 files changed

+2
-19
lines changed

src/hotspot/share/gc/g1/g1ConcurrentMark.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ G1ConcurrentMark::G1ConcurrentMark(G1CollectedHeap* g1h,
377377
// _finger set in set_non_marking_state
378378

379379
_worker_id_offset(G1DirtyCardQueueSet::num_par_ids() + G1ConcRefinementThreads),
380-
_max_num_tasks(ParallelGCThreads),
380+
_max_num_tasks(MAX2(ConcGCThreads, ParallelGCThreads)),
381381
// _num_active_tasks set in set_non_marking_state()
382382
// _tasks set inside the constructor
383383

src/hotspot/share/gc/shared/gc_globals.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@
148148
\
149149
product(uint, ConcGCThreads, 0, \
150150
"Number of threads concurrent gc will use") \
151-
constraint(ConcGCThreadsConstraintFunc,AfterErgo) \
152151
\
153152
product(bool, AlwaysTenure, false, \
154153
"Always tenure objects in eden (ParallelGC only)") \

src/hotspot/share/gc/shared/jvmFlagConstraintsGC.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,6 @@ JVMFlag::Error ParallelGCThreadsConstraintFunc(uint value, bool verbose) {
6767
return status;
6868
}
6969

70-
// As ConcGCThreads should be smaller than ParallelGCThreads,
71-
// we need constraint function.
72-
JVMFlag::Error ConcGCThreadsConstraintFunc(uint value, bool verbose) {
73-
// G1 GC use ConcGCThreads.
74-
if (GCConfig::is_gc_selected(CollectedHeap::G1) && (value > ParallelGCThreads)) {
75-
JVMFlag::printError(verbose,
76-
"ConcGCThreads (" UINT32_FORMAT ") must be "
77-
"less than or equal to ParallelGCThreads (" UINT32_FORMAT ")\n",
78-
value, ParallelGCThreads);
79-
return JVMFlag::VIOLATES_CONSTRAINT;
80-
}
81-
82-
return JVMFlag::SUCCESS;
83-
}
84-
8570
static JVMFlag::Error MinPLABSizeBounds(const char* name, size_t value, bool verbose) {
8671
if ((GCConfig::is_gc_selected(CollectedHeap::G1) || GCConfig::is_gc_selected(CollectedHeap::Parallel)) &&
8772
(value < PLAB::min_size())) {

src/hotspot/share/gc/shared/jvmFlagConstraintsGC.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
*/
4343
#define SHARED_GC_CONSTRAINTS(f) \
4444
f(uint, ParallelGCThreadsConstraintFunc) \
45-
f(uint, ConcGCThreadsConstraintFunc) \
4645
f(size_t, YoungPLABSizeConstraintFunc) \
4746
f(size_t, OldPLABSizeConstraintFunc) \
4847
f(uintx, MinHeapFreeRatioConstraintFunc) \

test/hotspot/jtreg/gc/g1/TestMarkStackSizes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public static void main(String[] args) throws Exception {
8181

8282
runTest(true, "-XX:ConcGCThreads=3", "-XX:ParallelGCThreads=3");
8383
runTest(true, "-XX:ConcGCThreads=0", "-XX:ParallelGCThreads=3");
84-
runTest(false, "-XX:ConcGCThreads=4", "-XX:ParallelGCThreads=3");
84+
runTest(true, "-XX:ConcGCThreads=4", "-XX:ParallelGCThreads=3");
8585

8686
// With that high ParallelGCThreads the default ergonomics would calculate
8787
// a mark stack size higher than maximum mark stack size.

0 commit comments

Comments
 (0)