mirror of
https://github.com/openjdk/jdk.git
synced 2026-06-06 10:42:45 +00:00
8383856: Implement JEP 523: Make G1 the Default Garbage Collector in All Environments
Reviewed-by: stefank, phubner, sjohanss
This commit is contained in:
parent
50deb1712c
commit
86637704fd
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, 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
|
||||
@ -95,10 +95,11 @@ void GCConfig::fail_if_non_included_gc_is_selected() {
|
||||
}
|
||||
|
||||
void GCConfig::select_gc_ergonomically() {
|
||||
if (os::is_server_class_machine()) {
|
||||
#if INCLUDE_G1GC
|
||||
FLAG_SET_ERGO_IF_DEFAULT(UseG1GC, true);
|
||||
#elif INCLUDE_PARALLELGC
|
||||
FLAG_SET_ERGO_IF_DEFAULT(UseG1GC, true);
|
||||
#else
|
||||
if (os::is_server_class_machine()) {
|
||||
#if INCLUDE_PARALLELGC
|
||||
FLAG_SET_ERGO_IF_DEFAULT(UseParallelGC, true);
|
||||
#elif INCLUDE_SERIALGC
|
||||
FLAG_SET_ERGO_IF_DEFAULT(UseSerialGC, true);
|
||||
@ -108,6 +109,7 @@ void GCConfig::select_gc_ergonomically() {
|
||||
FLAG_SET_ERGO_IF_DEFAULT(UseSerialGC, true);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool GCConfig::is_no_gc_selected() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user