mirror of
https://github.com/openjdk/jdk.git
synced 2026-06-06 10:42:45 +00:00
8384862: CompilationLog::log_failure() does not produce report message
Reviewed-by: shade, vlivanov, mhaessig
This commit is contained in:
parent
a1d709f93d
commit
34d9e38afc
@ -51,25 +51,24 @@ void CompilationLog::log_nmethod(JavaThread* thread, nmethod* nm) {
|
||||
|
||||
void CompilationLog::log_failure(JavaThread* thread, CompileTask* task, const char* reason, const char* retry_message) {
|
||||
StringLogMessage lm;
|
||||
stringStream sstr(lm.buffer(), lm.size());
|
||||
if (task == nullptr) {
|
||||
lm.print("Id not known, task was 0; COMPILE SKIPPED: %s", reason);
|
||||
sstr.print("Id not known, task was 0; COMPILE SKIPPED: %s", reason);
|
||||
} else {
|
||||
lm.print("%4d COMPILE SKIPPED: %s", task->compile_id(), reason);
|
||||
sstr.print("%4d COMPILE SKIPPED: %s", task->compile_id(), reason);
|
||||
}
|
||||
if (retry_message != nullptr) {
|
||||
lm.append(" (%s)", retry_message);
|
||||
sstr.print(" (%s)", retry_message);
|
||||
}
|
||||
lm.print("\n");
|
||||
log(thread, "%s", (const char*)lm);
|
||||
}
|
||||
|
||||
void CompilationLog::log_metaspace_failure(const char* reason) {
|
||||
// Note: This method can be called from non-Java/compiler threads to
|
||||
// log the global metaspace failure that might affect profiling.
|
||||
ResourceMark rm;
|
||||
StringLogMessage lm;
|
||||
lm.print("%4d COMPILE PROFILING SKIPPED: %s", -1, reason);
|
||||
lm.print("\n");
|
||||
stringStream sstr(lm.buffer(), lm.size());
|
||||
sstr.print("%4d COMPILE PROFILING SKIPPED: %s", -1, reason);
|
||||
log(Thread::current(), "%s", (const char*)lm);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user