mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-25 05:45:11 +02:00
7167142: Consider a warning when finding a .hotspotrc or .hotspot_compiler file that isn't used
Send warnings to output stream Reviewed-by: dholmes, fparain
This commit is contained in:
parent
e9301228b4
commit
4d512adc5e
2 changed files with 30 additions and 7 deletions
|
@ -550,10 +550,12 @@ void CompilerOracle::parse_from_line(char* line) {
|
|||
}
|
||||
}
|
||||
|
||||
static const char* default_cc_file = ".hotspot_compiler";
|
||||
|
||||
static const char* cc_file() {
|
||||
#ifdef ASSERT
|
||||
if (CompileCommandFile == NULL)
|
||||
return ".hotspot_compiler";
|
||||
return default_cc_file;
|
||||
#endif
|
||||
return CompileCommandFile;
|
||||
}
|
||||
|
@ -636,10 +638,17 @@ void compilerOracle_init() {
|
|||
CompilerOracle::parse_from_string(CompileOnly, CompilerOracle::parse_compile_only);
|
||||
if (CompilerOracle::has_command_file()) {
|
||||
CompilerOracle::parse_from_file();
|
||||
} else {
|
||||
struct stat buf;
|
||||
if (os::stat(default_cc_file, &buf) == 0) {
|
||||
warning("%s file is present but has been ignored. "
|
||||
"Run with -XX:CompileCommandFile=%s to load the file.",
|
||||
default_cc_file, default_cc_file);
|
||||
}
|
||||
}
|
||||
if (lists[PrintCommand] != NULL) {
|
||||
if (PrintAssembly) {
|
||||
warning("CompileCommand and/or .hotspot_compiler file contains 'print' commands, but PrintAssembly is also enabled");
|
||||
warning("CompileCommand and/or %s file contains 'print' commands, but PrintAssembly is also enabled", default_cc_file);
|
||||
} else if (FLAG_IS_DEFAULT(DebugNonSafepoints)) {
|
||||
warning("printing of assembly code is enabled; turning on DebugNonSafepoints to gain additional output");
|
||||
DebugNonSafepoints = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue