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

hotspot/src/share/vm/runtime/arguments.cpp

Print this page




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  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/stringTable.hpp"
  29 #include "classfile/symbolTable.hpp"
  30 #include "code/codeCacheExtensions.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"


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




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  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/stringTable.hpp"
  29 #include "classfile/symbolTable.hpp"

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


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

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


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