6392697: Additional flag needed to supress Hotspot warning messages
Apply PrintJvmWarnings flag to all warnings Reviewed-by: coleenp, phh
This commit is contained in:
parent
a594a8dea5
commit
da95f5319e
@ -815,6 +815,9 @@ class CommandLineFlags {
|
|||||||
develop(bool, PrintJVMWarnings, false, \
|
develop(bool, PrintJVMWarnings, false, \
|
||||||
"Prints warnings for unimplemented JVM functions") \
|
"Prints warnings for unimplemented JVM functions") \
|
||||||
\
|
\
|
||||||
|
product(bool, PrintWarnings, true, \
|
||||||
|
"Prints JVM warnings to output stream") \
|
||||||
|
\
|
||||||
notproduct(uintx, WarnOnStalledSpinLock, 0, \
|
notproduct(uintx, WarnOnStalledSpinLock, 0, \
|
||||||
"Prints warnings for stalled SpinLocks") \
|
"Prints warnings for stalled SpinLocks") \
|
||||||
\
|
\
|
||||||
|
@ -51,14 +51,16 @@
|
|||||||
|
|
||||||
|
|
||||||
void warning(const char* format, ...) {
|
void warning(const char* format, ...) {
|
||||||
// In case error happens before init or during shutdown
|
if (PrintWarnings) {
|
||||||
if (tty == NULL) ostream_init();
|
// In case error happens before init or during shutdown
|
||||||
|
if (tty == NULL) ostream_init();
|
||||||
|
|
||||||
tty->print("%s warning: ", VM_Version::vm_name());
|
tty->print("%s warning: ", VM_Version::vm_name());
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, format);
|
va_start(ap, format);
|
||||||
tty->vprint_cr(format, ap);
|
tty->vprint_cr(format, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
}
|
||||||
if (BreakAtWarning) BREAKPOINT;
|
if (BreakAtWarning) BREAKPOINT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user