1883 reasonable_initial = limit_by_allocatable_memory(reasonable_initial);
1884
1885 if (PrintGCDetails && Verbose) {
1886 // Cannot use gclog_or_tty yet.
1887 tty->print_cr(" Initial heap size " SIZE_FORMAT, (uintx)reasonable_initial);
1888 }
1889 FLAG_SET_ERGO(uintx, InitialHeapSize, (uintx)reasonable_initial);
1890 }
1891 // If the minimum heap size has not been set (via -Xms),
1892 // synchronize with InitialHeapSize to avoid errors with the default value.
1893 if (min_heap_size() == 0) {
1894 set_min_heap_size(MIN2((uintx)reasonable_minimum, InitialHeapSize));
1895 if (PrintGCDetails && Verbose) {
1896 // Cannot use gclog_or_tty yet.
1897 tty->print_cr(" Minimum heap size " SIZE_FORMAT, min_heap_size());
1898 }
1899 }
1900 }
1901 }
1902
1903 // This must be called after ergonomics because we want bytecode rewriting
1904 // if the server compiler is used, or if UseSharedSpaces is disabled.
1905 void Arguments::set_bytecode_flags() {
1906 // Better not attempt to store into a read-only space.
1907 if (UseSharedSpaces) {
1908 FLAG_SET_DEFAULT(RewriteBytecodes, false);
1909 FLAG_SET_DEFAULT(RewriteFrequentPairs, false);
1910 }
1911
1912 if (!RewriteBytecodes) {
1913 FLAG_SET_DEFAULT(RewriteFrequentPairs, false);
1914 }
1915 }
1916
1917 // Aggressive optimization flags -XX:+AggressiveOpts
1918 void Arguments::set_aggressive_opts_flags() {
1919 #ifdef COMPILER2
1920 if (AggressiveUnboxing) {
1921 if (FLAG_IS_DEFAULT(EliminateAutoBox)) {
1922 FLAG_SET_DEFAULT(EliminateAutoBox, true);
1923 } else if (!EliminateAutoBox) {
1924 // warning("AggressiveUnboxing is disabled because EliminateAutoBox is disabled");
1925 AggressiveUnboxing = false;
1926 }
1927 if (FLAG_IS_DEFAULT(DoEscapeAnalysis)) {
1928 FLAG_SET_DEFAULT(DoEscapeAnalysis, true);
1929 } else if (!DoEscapeAnalysis) {
1930 // warning("AggressiveUnboxing is disabled because DoEscapeAnalysis is disabled");
1931 AggressiveUnboxing = false;
|
1883 reasonable_initial = limit_by_allocatable_memory(reasonable_initial);
1884
1885 if (PrintGCDetails && Verbose) {
1886 // Cannot use gclog_or_tty yet.
1887 tty->print_cr(" Initial heap size " SIZE_FORMAT, (uintx)reasonable_initial);
1888 }
1889 FLAG_SET_ERGO(uintx, InitialHeapSize, (uintx)reasonable_initial);
1890 }
1891 // If the minimum heap size has not been set (via -Xms),
1892 // synchronize with InitialHeapSize to avoid errors with the default value.
1893 if (min_heap_size() == 0) {
1894 set_min_heap_size(MIN2((uintx)reasonable_minimum, InitialHeapSize));
1895 if (PrintGCDetails && Verbose) {
1896 // Cannot use gclog_or_tty yet.
1897 tty->print_cr(" Minimum heap size " SIZE_FORMAT, min_heap_size());
1898 }
1899 }
1900 }
1901 }
1902
1903 // This must be called after ergonomics.
1904 void Arguments::set_bytecode_flags() {
1905 if (!RewriteBytecodes) {
1906 FLAG_SET_DEFAULT(RewriteFrequentPairs, false);
1907 }
1908 }
1909
1910 // Aggressive optimization flags -XX:+AggressiveOpts
1911 void Arguments::set_aggressive_opts_flags() {
1912 #ifdef COMPILER2
1913 if (AggressiveUnboxing) {
1914 if (FLAG_IS_DEFAULT(EliminateAutoBox)) {
1915 FLAG_SET_DEFAULT(EliminateAutoBox, true);
1916 } else if (!EliminateAutoBox) {
1917 // warning("AggressiveUnboxing is disabled because EliminateAutoBox is disabled");
1918 AggressiveUnboxing = false;
1919 }
1920 if (FLAG_IS_DEFAULT(DoEscapeAnalysis)) {
1921 FLAG_SET_DEFAULT(DoEscapeAnalysis, true);
1922 } else if (!DoEscapeAnalysis) {
1923 // warning("AggressiveUnboxing is disabled because DoEscapeAnalysis is disabled");
1924 AggressiveUnboxing = false;
|