1991 // Then, if the interval parameter was not set, set it according to
1992 // the pause time target (this will also deal with the case when the
1993 // pause time target is the default value).
1994 if (FLAG_IS_DEFAULT(GCPauseIntervalMillis)) {
1995 FLAG_SET_DEFAULT(GCPauseIntervalMillis, MaxGCPauseMillis + 1);
1996 }
1997
1998 log_trace(gc)("MarkStackSize: %uk MarkStackSizeMax: %uk", (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));
1999 }
2000
2001 void Arguments::set_gc_specific_flags() {
2002 #if INCLUDE_ALL_GCS
2003 // Set per-collector flags
2004 if (UseParallelGC || UseParallelOldGC) {
2005 set_parallel_gc_flags();
2006 } else if (UseConcMarkSweepGC) {
2007 set_cms_and_parnew_gc_flags();
2008 } else if (UseG1GC) {
2009 set_g1_gc_flags();
2010 }
2011 if (AssumeMP && !UseSerialGC) {
2012 if (FLAG_IS_DEFAULT(ParallelGCThreads) && ParallelGCThreads == 1) {
2013 warning("If the number of processors is expected to increase from one, then"
2014 " you should configure the number of parallel GC threads appropriately"
2015 " using -XX:ParallelGCThreads=N");
2016 }
2017 }
2018 if (MinHeapFreeRatio == 100) {
2019 // Keeping the heap 100% free is hard ;-) so limit it to 99%.
2020 FLAG_SET_ERGO(uintx, MinHeapFreeRatio, 99);
2021 }
2022
2023 // If class unloading is disabled, also disable concurrent class unloading.
2024 if (!ClassUnloading) {
2025 FLAG_SET_CMDLINE(bool, CMSClassUnloadingEnabled, false);
2026 FLAG_SET_CMDLINE(bool, ClassUnloadingWithConcurrentMark, false);
2027 }
2028 #endif // INCLUDE_ALL_GCS
2029 }
2030
2031 julong Arguments::limit_by_allocatable_memory(julong limit) {
2032 julong max_allocatable;
2033 julong result = limit;
2034 if (os::has_allocatable_memory_limit(&max_allocatable)) {
2035 result = MIN2(result, max_allocatable / MaxVirtMemFraction);
2036 }
2037 return result;
|
1991 // Then, if the interval parameter was not set, set it according to
1992 // the pause time target (this will also deal with the case when the
1993 // pause time target is the default value).
1994 if (FLAG_IS_DEFAULT(GCPauseIntervalMillis)) {
1995 FLAG_SET_DEFAULT(GCPauseIntervalMillis, MaxGCPauseMillis + 1);
1996 }
1997
1998 log_trace(gc)("MarkStackSize: %uk MarkStackSizeMax: %uk", (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));
1999 }
2000
2001 void Arguments::set_gc_specific_flags() {
2002 #if INCLUDE_ALL_GCS
2003 // Set per-collector flags
2004 if (UseParallelGC || UseParallelOldGC) {
2005 set_parallel_gc_flags();
2006 } else if (UseConcMarkSweepGC) {
2007 set_cms_and_parnew_gc_flags();
2008 } else if (UseG1GC) {
2009 set_g1_gc_flags();
2010 }
2011 if (MinHeapFreeRatio == 100) {
2012 // Keeping the heap 100% free is hard ;-) so limit it to 99%.
2013 FLAG_SET_ERGO(uintx, MinHeapFreeRatio, 99);
2014 }
2015
2016 // If class unloading is disabled, also disable concurrent class unloading.
2017 if (!ClassUnloading) {
2018 FLAG_SET_CMDLINE(bool, CMSClassUnloadingEnabled, false);
2019 FLAG_SET_CMDLINE(bool, ClassUnloadingWithConcurrentMark, false);
2020 }
2021 #endif // INCLUDE_ALL_GCS
2022 }
2023
2024 julong Arguments::limit_by_allocatable_memory(julong limit) {
2025 julong max_allocatable;
2026 julong result = limit;
2027 if (os::has_allocatable_memory_limit(&max_allocatable)) {
2028 result = MIN2(result, max_allocatable / MaxVirtMemFraction);
2029 }
2030 return result;
|