mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 02:24:40 +02:00
8114823: G1 doesn't honor request to disable class unloading
Reviewed-by: tschatzl, mgerdin
This commit is contained in:
parent
be6cc69504
commit
f6a7898995
5 changed files with 191 additions and 19 deletions
|
@ -1665,11 +1665,6 @@ void Arguments::set_cms_and_parnew_gc_flags() {
|
|||
CompactibleFreeListSpaceLAB::modify_initialization(OldPLABSize, OldPLABWeight);
|
||||
}
|
||||
|
||||
if (!ClassUnloading) {
|
||||
FLAG_SET_CMDLINE(bool, CMSClassUnloadingEnabled, false);
|
||||
FLAG_SET_CMDLINE(bool, ExplicitGCInvokesConcurrentAndUnloadsClasses, false);
|
||||
}
|
||||
|
||||
log_trace(gc)("MarkStackSize: %uk MarkStackSizeMax: %uk", (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));
|
||||
}
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
@ -1997,6 +1992,13 @@ void Arguments::set_gc_specific_flags() {
|
|||
// Keeping the heap 100% free is hard ;-) so limit it to 99%.
|
||||
FLAG_SET_ERGO(uintx, MinHeapFreeRatio, 99);
|
||||
}
|
||||
|
||||
// If class unloading is disabled, also disable concurrent class unloading.
|
||||
if (!ClassUnloading) {
|
||||
FLAG_SET_CMDLINE(bool, CMSClassUnloadingEnabled, false);
|
||||
FLAG_SET_CMDLINE(bool, ClassUnloadingWithConcurrentMark, false);
|
||||
FLAG_SET_CMDLINE(bool, ExplicitGCInvokesConcurrentAndUnloadsClasses, false);
|
||||
}
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue