< prev index next >

src/share/vm/runtime/arguments.cpp

Print this page
rev 11938 : imported patch 8165226


  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/logTag.hpp"
  37 #include "logging/logConfiguration.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"
  50 #include "runtime/os.hpp"
  51 #include "runtime/vm_version.hpp"
  52 #include "services/management.hpp"
  53 #include "services/memTracker.hpp"
  54 #include "utilities/defaultStream.hpp"
  55 #include "utilities/macros.hpp"
  56 #include "utilities/stringUtils.hpp"
  57 #if INCLUDE_JVMCI


4159   const char* tail;
4160   for (int index = 0; index < args->nOptions; index++) {
4161     const JavaVMOption *option = args->options + index;
4162     if (match_option(option, "-XX:", &tail)) {
4163       logOption(tail);
4164     }
4165   }
4166 }
4167 
4168 bool Arguments::handle_deprecated_print_gc_flags() {
4169   if (PrintGC) {
4170     log_warning(gc)("-XX:+PrintGC is deprecated. Will use -Xlog:gc instead.");
4171   }
4172   if (PrintGCDetails) {
4173     log_warning(gc)("-XX:+PrintGCDetails is deprecated. Will use -Xlog:gc* instead.");
4174   }
4175 
4176   if (_gc_log_filename != NULL) {
4177     // -Xloggc was used to specify a filename
4178     const char* gc_conf = PrintGCDetails ? "gc*" : "gc";
4179     return  LogConfiguration::parse_log_arguments(_gc_log_filename, gc_conf, NULL, NULL, NULL);



4180   } else if (PrintGC || PrintGCDetails) {
4181     LogConfiguration::configure_stdout(LogLevel::Info, !PrintGCDetails, LOG_TAGS(gc));
4182   }
4183   return true;
4184 }
4185 
4186 // Parse entry point called from JNI_CreateJavaVM
4187 
4188 jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) {
4189   assert(verify_special_jvm_flags(), "deprecated and obsolete flag table inconsistent");
4190 
4191   // Initialize ranges, constraints and writeables
4192   CommandLineFlagRangeList::init();
4193   CommandLineFlagConstraintList::init();
4194   CommandLineFlagWriteableList::init();
4195 
4196   // If flag "-XX:Flags=flags-file" is used it will be the first option to be processed.
4197   const char* hotspotrc = ".hotspotrc";
4198   bool settings_file_specified = false;
4199   bool needs_hotspotrc_warning = false;




  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"
  51 #include "runtime/os.hpp"
  52 #include "runtime/vm_version.hpp"
  53 #include "services/management.hpp"
  54 #include "services/memTracker.hpp"
  55 #include "utilities/defaultStream.hpp"
  56 #include "utilities/macros.hpp"
  57 #include "utilities/stringUtils.hpp"
  58 #if INCLUDE_JVMCI


4160   const char* tail;
4161   for (int index = 0; index < args->nOptions; index++) {
4162     const JavaVMOption *option = args->options + index;
4163     if (match_option(option, "-XX:", &tail)) {
4164       logOption(tail);
4165     }
4166   }
4167 }
4168 
4169 bool Arguments::handle_deprecated_print_gc_flags() {
4170   if (PrintGC) {
4171     log_warning(gc)("-XX:+PrintGC is deprecated. Will use -Xlog:gc instead.");
4172   }
4173   if (PrintGCDetails) {
4174     log_warning(gc)("-XX:+PrintGCDetails is deprecated. Will use -Xlog:gc* instead.");
4175   }
4176 
4177   if (_gc_log_filename != NULL) {
4178     // -Xloggc was used to specify a filename
4179     const char* gc_conf = PrintGCDetails ? "gc*" : "gc";
4180 
4181     LogTarget(Error, logging) target;
4182     LogStreamCHeap errstream(target);
4183     return LogConfiguration::parse_log_arguments(_gc_log_filename, gc_conf, NULL, NULL, &errstream);
4184   } else if (PrintGC || PrintGCDetails) {
4185     LogConfiguration::configure_stdout(LogLevel::Info, !PrintGCDetails, LOG_TAGS(gc));
4186   }
4187   return true;
4188 }
4189 
4190 // Parse entry point called from JNI_CreateJavaVM
4191 
4192 jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) {
4193   assert(verify_special_jvm_flags(), "deprecated and obsolete flag table inconsistent");
4194 
4195   // Initialize ranges, constraints and writeables
4196   CommandLineFlagRangeList::init();
4197   CommandLineFlagConstraintList::init();
4198   CommandLineFlagWriteableList::init();
4199 
4200   // If flag "-XX:Flags=flags-file" is used it will be the first option to be processed.
4201   const char* hotspotrc = ".hotspotrc";
4202   bool settings_file_specified = false;
4203   bool needs_hotspotrc_warning = false;


< prev index next >