Skip to content

Commit

Permalink
8282172: CompileBroker::log_metaspace_failure is called from non-Java…
Browse files Browse the repository at this point in the history
…/compiler threads

Backport-of: 4e7fb41dafaf03baabe18ee1dabefed50d69e16d
  • Loading branch information
TheRealMDoerr committed Mar 31, 2022
1 parent e2f6bb8 commit 3127e4c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hotspot/share/compiler/compileBroker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,13 @@ class CompilationLog : public StringEventLog {
}

void 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");
log(JavaThread::current(), "%s", (const char*)lm);
log(Thread::current(), "%s", (const char*)lm);
}
};

Expand Down

1 comment on commit 3127e4c

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.