src/share/vm/runtime/arguments.cpp

changeset 5725
01b268b3080a
parent 5597
4a1efab850f4
child 5727
ae3e68933caf
     1.1 --- a/src/share/vm/runtime/arguments.cpp	Thu Sep 12 18:13:28 2013 -0700
     1.2 +++ b/src/share/vm/runtime/arguments.cpp	Fri Sep 13 04:16:54 2013 -0700
     1.3 @@ -3337,6 +3337,33 @@
     1.4    return shared_archive_path;
     1.5  }
     1.6  
     1.7 +#ifndef PRODUCT
     1.8 +// Determine whether LogVMOutput should be implicitly turned on.
     1.9 +static bool use_vm_log() {
    1.10 +  if (LogCompilation || !FLAG_IS_DEFAULT(LogFile) ||
    1.11 +      PrintCompilation || PrintInlining || PrintDependencies || PrintNativeNMethods ||
    1.12 +      PrintDebugInfo || PrintRelocations || PrintNMethods || PrintExceptionHandlers ||
    1.13 +      PrintAssembly || TraceDeoptimization || TraceDependencies ||
    1.14 +      (VerifyDependencies && FLAG_IS_CMDLINE(VerifyDependencies))) {
    1.15 +    return true;
    1.16 +  }
    1.17 +
    1.18 +#ifdef COMPILER1
    1.19 +  if (PrintC1Statistics) {
    1.20 +    return true;
    1.21 +  }
    1.22 +#endif // COMPILER1
    1.23 +
    1.24 +#ifdef COMPILER2
    1.25 +  if (PrintOptoAssembly || PrintOptoStatistics) {
    1.26 +    return true;
    1.27 +  }
    1.28 +#endif // COMPILER2
    1.29 +
    1.30 +  return false;
    1.31 +}
    1.32 +#endif // PRODUCT
    1.33 +
    1.34  // Parse entry point called from JNI_CreateJavaVM
    1.35  
    1.36  jint Arguments::parse(const JavaVMInitArgs* args) {
    1.37 @@ -3630,7 +3657,13 @@
    1.38        NmethodSweepFraction = 1;
    1.39      }
    1.40    }
    1.41 -#endif
    1.42 +
    1.43 +  if (!LogVMOutput && FLAG_IS_DEFAULT(LogVMOutput)) {
    1.44 +    if (use_vm_log()) {
    1.45 +      LogVMOutput = true;
    1.46 +    }
    1.47 +  }
    1.48 +#endif // PRODUCT
    1.49  
    1.50    if (PrintCommandLineFlags) {
    1.51      CommandLineFlags::printSetFlags(tty);

mercurial