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