comparison src/share/vm/runtime/arguments.cpp @ 20388:7430aa5718a5

Merge
author amurillo
date Wed, 03 Sep 2014 08:52:08 -0700
parents 6e0cb14ce59b a178c2e6f85f
children f5164941749c
comparison
equal deleted inserted replaced
20386:edb5f3b38aab 20388:7430aa5718a5
98 SystemProperty* Arguments::_system_properties = NULL; 98 SystemProperty* Arguments::_system_properties = NULL;
99 const char* Arguments::_gc_log_filename = NULL; 99 const char* Arguments::_gc_log_filename = NULL;
100 bool Arguments::_has_profile = false; 100 bool Arguments::_has_profile = false;
101 size_t Arguments::_conservative_max_heap_alignment = 0; 101 size_t Arguments::_conservative_max_heap_alignment = 0;
102 uintx Arguments::_min_heap_size = 0; 102 uintx Arguments::_min_heap_size = 0;
103 uintx Arguments::_min_heap_free_ratio = 0;
104 uintx Arguments::_max_heap_free_ratio = 0;
103 Arguments::Mode Arguments::_mode = _mixed; 105 Arguments::Mode Arguments::_mode = _mixed;
104 bool Arguments::_java_compiler = false; 106 bool Arguments::_java_compiler = false;
105 bool Arguments::_xdebug_mode = false; 107 bool Arguments::_xdebug_mode = false;
106 const char* Arguments::_java_vendor_url_bug = DEFAULT_VENDOR_URL_BUG; 108 const char* Arguments::_java_vendor_url_bug = DEFAULT_VENDOR_URL_BUG;
107 const char* Arguments::_sun_java_launcher = DEFAULT_JAVA_LAUNCHER; 109 const char* Arguments::_sun_java_launcher = DEFAULT_JAVA_LAUNCHER;
1597 if (UseAdaptiveSizePolicy) { 1599 if (UseAdaptiveSizePolicy) {
1598 // We don't want to limit adaptive heap sizing's freedom to adjust the heap 1600 // We don't want to limit adaptive heap sizing's freedom to adjust the heap
1599 // unless the user actually sets these flags. 1601 // unless the user actually sets these flags.
1600 if (FLAG_IS_DEFAULT(MinHeapFreeRatio)) { 1602 if (FLAG_IS_DEFAULT(MinHeapFreeRatio)) {
1601 FLAG_SET_DEFAULT(MinHeapFreeRatio, 0); 1603 FLAG_SET_DEFAULT(MinHeapFreeRatio, 0);
1604 _min_heap_free_ratio = MinHeapFreeRatio;
1602 } 1605 }
1603 if (FLAG_IS_DEFAULT(MaxHeapFreeRatio)) { 1606 if (FLAG_IS_DEFAULT(MaxHeapFreeRatio)) {
1604 FLAG_SET_DEFAULT(MaxHeapFreeRatio, 100); 1607 FLAG_SET_DEFAULT(MaxHeapFreeRatio, 100);
1608 _max_heap_free_ratio = MaxHeapFreeRatio;
1605 } 1609 }
1606 } 1610 }
1607 1611
1608 // If InitialSurvivorRatio or MinSurvivorRatio were not specified, but the 1612 // If InitialSurvivorRatio or MinSurvivorRatio were not specified, but the
1609 // SurvivorRatio has been set, reset their default values to SurvivorRatio + 1613 // SurvivorRatio has been set, reset their default values to SurvivorRatio +
1974 err_msg.print("MinHeapFreeRatio (" UINTX_FORMAT ") must be less than or " 1978 err_msg.print("MinHeapFreeRatio (" UINTX_FORMAT ") must be less than or "
1975 "equal to MaxHeapFreeRatio (" UINTX_FORMAT ")", min_heap_free_ratio, 1979 "equal to MaxHeapFreeRatio (" UINTX_FORMAT ")", min_heap_free_ratio,
1976 MaxHeapFreeRatio); 1980 MaxHeapFreeRatio);
1977 return false; 1981 return false;
1978 } 1982 }
1983 // This does not set the flag itself, but stores the value in a safe place for later usage.
1984 _min_heap_free_ratio = min_heap_free_ratio;
1979 return true; 1985 return true;
1980 } 1986 }
1981 1987
1982 bool Arguments::verify_MaxHeapFreeRatio(FormatBuffer<80>& err_msg, uintx max_heap_free_ratio) { 1988 bool Arguments::verify_MaxHeapFreeRatio(FormatBuffer<80>& err_msg, uintx max_heap_free_ratio) {
1983 if (!is_percentage(max_heap_free_ratio)) { 1989 if (!is_percentage(max_heap_free_ratio)) {
1988 err_msg.print("MaxHeapFreeRatio (" UINTX_FORMAT ") must be greater than or " 1994 err_msg.print("MaxHeapFreeRatio (" UINTX_FORMAT ") must be greater than or "
1989 "equal to MinHeapFreeRatio (" UINTX_FORMAT ")", max_heap_free_ratio, 1995 "equal to MinHeapFreeRatio (" UINTX_FORMAT ")", max_heap_free_ratio,
1990 MinHeapFreeRatio); 1996 MinHeapFreeRatio);
1991 return false; 1997 return false;
1992 } 1998 }
1999 // This does not set the flag itself, but stores the value in a safe place for later usage.
2000 _max_heap_free_ratio = max_heap_free_ratio;
1993 return true; 2001 return true;
1994 } 2002 }
1995 2003
1996 // Check consistency of GC selection 2004 // Check consistency of GC selection
1997 bool Arguments::check_gc_consistency() { 2005 bool Arguments::check_gc_consistency() {