src/share/vm/runtime/arguments.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/runtime

src/share/vm/runtime/arguments.cpp

Print this page
rev 12400 : 8168503: JEP 297: Unified arm32/arm64 Port
Reviewed-by: kvn, enevill, ihse, dholmes, erik, coleenp, cjplummer


  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/classLoader.hpp"
  27 #include "classfile/javaAssertions.hpp"
  28 #include "classfile/moduleEntry.hpp"
  29 #include "classfile/stringTable.hpp"
  30 #include "classfile/symbolTable.hpp"
  31 #include "code/codeCacheExtensions.hpp"
  32 #include "gc/shared/cardTableRS.hpp"
  33 #include "gc/shared/genCollectedHeap.hpp"
  34 #include "gc/shared/referenceProcessor.hpp"
  35 #include "gc/shared/taskqueue.hpp"
  36 #include "logging/log.hpp"
  37 #include "logging/logConfiguration.hpp"
  38 #include "logging/logStream.hpp"
  39 #include "logging/logTag.hpp"
  40 #include "memory/allocation.inline.hpp"
  41 #include "memory/universe.inline.hpp"
  42 #include "oops/oop.inline.hpp"
  43 #include "prims/jvmtiExport.hpp"
  44 #include "runtime/arguments.hpp"
  45 #include "runtime/arguments_ext.hpp"
  46 #include "runtime/commandLineFlagConstraintList.hpp"
  47 #include "runtime/commandLineFlagWriteableList.hpp"
  48 #include "runtime/commandLineFlagRangeList.hpp"
  49 #include "runtime/globals.hpp"
  50 #include "runtime/globals_extension.hpp"
  51 #include "runtime/java.hpp"


1865       (FLAG_IS_DEFAULT(UseSharedSpaces) || !UseSharedSpaces)) {
1866     no_shared_spaces("COMPILER2 default: -Xshare:auto | off, have to manually setup to on.");
1867   }
1868 #endif
1869 
1870   set_conservative_max_heap_alignment();
1871 
1872 #ifndef ZERO
1873 #ifdef _LP64
1874   set_use_compressed_oops();
1875 
1876   // set_use_compressed_klass_ptrs() must be called after calling
1877   // set_use_compressed_oops().
1878   set_use_compressed_klass_ptrs();
1879 
1880   // Also checks that certain machines are slower with compressed oops
1881   // in vm_version initialization code.
1882 #endif // _LP64
1883 #endif // !ZERO
1884 
1885   CodeCacheExtensions::set_ergonomics_flags();
1886 }
1887 
1888 void Arguments::set_parallel_gc_flags() {
1889   assert(UseParallelGC || UseParallelOldGC, "Error");
1890   // Enable ParallelOld unless it was explicitly disabled (cmd line or rc file).
1891   if (FLAG_IS_DEFAULT(UseParallelOldGC)) {
1892     FLAG_SET_DEFAULT(UseParallelOldGC, true);
1893   }
1894   FLAG_SET_DEFAULT(UseParallelGC, true);
1895 
1896   // If no heap maximum was requested explicitly, use some reasonable fraction
1897   // of the physical memory, up to a maximum of 1GB.
1898   FLAG_SET_DEFAULT(ParallelGCThreads,
1899                    Abstract_VM_Version::parallel_worker_threads());
1900   if (ParallelGCThreads == 0) {
1901     jio_fprintf(defaultStream::error_stream(),
1902         "The Parallel GC can not be combined with -XX:ParallelGCThreads=0\n");
1903     vm_exit(1);
1904   }
1905 




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/classLoader.hpp"
  27 #include "classfile/javaAssertions.hpp"
  28 #include "classfile/moduleEntry.hpp"
  29 #include "classfile/stringTable.hpp"
  30 #include "classfile/symbolTable.hpp"

  31 #include "gc/shared/cardTableRS.hpp"
  32 #include "gc/shared/genCollectedHeap.hpp"
  33 #include "gc/shared/referenceProcessor.hpp"
  34 #include "gc/shared/taskqueue.hpp"
  35 #include "logging/log.hpp"
  36 #include "logging/logConfiguration.hpp"
  37 #include "logging/logStream.hpp"
  38 #include "logging/logTag.hpp"
  39 #include "memory/allocation.inline.hpp"
  40 #include "memory/universe.inline.hpp"
  41 #include "oops/oop.inline.hpp"
  42 #include "prims/jvmtiExport.hpp"
  43 #include "runtime/arguments.hpp"
  44 #include "runtime/arguments_ext.hpp"
  45 #include "runtime/commandLineFlagConstraintList.hpp"
  46 #include "runtime/commandLineFlagWriteableList.hpp"
  47 #include "runtime/commandLineFlagRangeList.hpp"
  48 #include "runtime/globals.hpp"
  49 #include "runtime/globals_extension.hpp"
  50 #include "runtime/java.hpp"


1864       (FLAG_IS_DEFAULT(UseSharedSpaces) || !UseSharedSpaces)) {
1865     no_shared_spaces("COMPILER2 default: -Xshare:auto | off, have to manually setup to on.");
1866   }
1867 #endif
1868 
1869   set_conservative_max_heap_alignment();
1870 
1871 #ifndef ZERO
1872 #ifdef _LP64
1873   set_use_compressed_oops();
1874 
1875   // set_use_compressed_klass_ptrs() must be called after calling
1876   // set_use_compressed_oops().
1877   set_use_compressed_klass_ptrs();
1878 
1879   // Also checks that certain machines are slower with compressed oops
1880   // in vm_version initialization code.
1881 #endif // _LP64
1882 #endif // !ZERO
1883 

1884 }
1885 
1886 void Arguments::set_parallel_gc_flags() {
1887   assert(UseParallelGC || UseParallelOldGC, "Error");
1888   // Enable ParallelOld unless it was explicitly disabled (cmd line or rc file).
1889   if (FLAG_IS_DEFAULT(UseParallelOldGC)) {
1890     FLAG_SET_DEFAULT(UseParallelOldGC, true);
1891   }
1892   FLAG_SET_DEFAULT(UseParallelGC, true);
1893 
1894   // If no heap maximum was requested explicitly, use some reasonable fraction
1895   // of the physical memory, up to a maximum of 1GB.
1896   FLAG_SET_DEFAULT(ParallelGCThreads,
1897                    Abstract_VM_Version::parallel_worker_threads());
1898   if (ParallelGCThreads == 0) {
1899     jio_fprintf(defaultStream::error_stream(),
1900         "The Parallel GC can not be combined with -XX:ParallelGCThreads=0\n");
1901     vm_exit(1);
1902   }
1903 


src/share/vm/runtime/arguments.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File