src/share/vm/compiler/compilerOracle.cpp

changeset 4213
6b5a3d18fe0e
parent 4212
fe4a4ea5bed9
parent 3907
90d5a592ea8f
child 4220
218a94758fe7
     1.1 --- a/src/share/vm/compiler/compilerOracle.cpp	Fri Jun 08 12:49:12 2012 -0400
     1.2 +++ b/src/share/vm/compiler/compilerOracle.cpp	Thu Aug 02 14:29:12 2012 -0700
     1.3 @@ -34,7 +34,7 @@
     1.4  #include "runtime/handles.inline.hpp"
     1.5  #include "runtime/jniHandles.hpp"
     1.6  
     1.7 -class MethodMatcher : public CHeapObj {
     1.8 +class MethodMatcher : public CHeapObj<mtCompiler> {
     1.9   public:
    1.10    enum Mode {
    1.11      Exact,
    1.12 @@ -550,10 +550,12 @@
    1.13    }
    1.14  }
    1.15  
    1.16 +static const char* default_cc_file = ".hotspot_compiler";
    1.17 +
    1.18  static const char* cc_file() {
    1.19  #ifdef ASSERT
    1.20    if (CompileCommandFile == NULL)
    1.21 -    return ".hotspot_compiler";
    1.22 +    return default_cc_file;
    1.23  #endif
    1.24    return CompileCommandFile;
    1.25  }
    1.26 @@ -636,10 +638,17 @@
    1.27    CompilerOracle::parse_from_string(CompileOnly, CompilerOracle::parse_compile_only);
    1.28    if (CompilerOracle::has_command_file()) {
    1.29      CompilerOracle::parse_from_file();
    1.30 +  } else {
    1.31 +    struct stat buf;
    1.32 +    if (os::stat(default_cc_file, &buf) == 0) {
    1.33 +      warning("%s file is present but has been ignored.  "
    1.34 +              "Run with -XX:CompileCommandFile=%s to load the file.",
    1.35 +              default_cc_file, default_cc_file);
    1.36 +    }
    1.37    }
    1.38    if (lists[PrintCommand] != NULL) {
    1.39      if (PrintAssembly) {
    1.40 -      warning("CompileCommand and/or .hotspot_compiler file contains 'print' commands, but PrintAssembly is also enabled");
    1.41 +      warning("CompileCommand and/or %s file contains 'print' commands, but PrintAssembly is also enabled", default_cc_file);
    1.42      } else if (FLAG_IS_DEFAULT(DebugNonSafepoints)) {
    1.43        warning("printing of assembly code is enabled; turning on DebugNonSafepoints to gain additional output");
    1.44        DebugNonSafepoints = true;

mercurial