mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 12:04:39 +02:00
8146009: "pure virtual method called" with using new GC logging mechanism
Co-authored-by: Michail Chernov <michail.chernov@oracle.com> Reviewed-by: dsamersoff, dholmes, mchernov
This commit is contained in:
parent
8641d21c56
commit
43db68dee4
11 changed files with 171 additions and 57 deletions
|
@ -28,8 +28,20 @@
|
|||
#include "logging/logMessageBuffer.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
|
||||
LogStdoutOutput LogStdoutOutput::_instance;
|
||||
LogStderrOutput LogStderrOutput::_instance;
|
||||
static bool initialized;
|
||||
static char stdoutmem[sizeof(LogStdoutOutput)];
|
||||
static char stderrmem[sizeof(LogStderrOutput)];
|
||||
|
||||
LogStdoutOutput &StdoutLog = reinterpret_cast<LogStdoutOutput&>(stdoutmem);
|
||||
LogStderrOutput &StderrLog = reinterpret_cast<LogStderrOutput&>(stderrmem);
|
||||
|
||||
LogFileStreamInitializer::LogFileStreamInitializer() {
|
||||
if (!initialized) {
|
||||
::new (&StdoutLog) LogStdoutOutput();
|
||||
::new (&StderrLog) LogStderrOutput();
|
||||
initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
int LogFileStreamOutput::write_decorations(const LogDecorations& decorations) {
|
||||
int total_written = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue