< prev index next >
src/share/vm/utilities/vmError.cpp
Print this page
rev 9831 : 8146905 - cleanup ostream, staticBufferStream
Summary: get rid of staticBufferStream and implement the use-caller-provided-scratch-buffer feature in a simpler way.
*** 1092,1101 ****
--- 1092,1103 ----
Thread* thread, address pc, void* siginfo, void* context, const char* filename,
int lineno, size_t size)
{
// Don't allocate large buffer on stack
static char buffer[O_BUFLEN];
+ out.set_scratch_buffer(buffer, sizeof(buffer));
+ log.set_scratch_buffer(buffer, sizeof(buffer));
// How many errors occurred in error handler when reporting first_error.
static int recursive_error_count;
// We will first print a brief message to standard out (verbose = false),
*** 1178,1189 ****
}
}
// print to screen
if (!out_done) {
! staticBufferStream sbs(buffer, sizeof(buffer), &out);
! report(&sbs, false);
out_done = true;
_current_step = 0;
_current_step_info = "";
--- 1180,1190 ----
}
}
// print to screen
if (!out_done) {
! report(&out, false);
out_done = true;
_current_step = 0;
_current_step_info = "";
*** 1207,1218 ****
* Maybe implement direct streaming in the future.*/
transmit_report_done = true;
}
}
! staticBufferStream sbs(buffer, O_BUFLEN, &log);
! report(&sbs, true);
_current_step = 0;
_current_step_info = "";
// Run error reporting to determine whether or not to report the crash.
if (!transmit_report_done && should_report_bug(_id)) {
--- 1208,1218 ----
* Maybe implement direct streaming in the future.*/
transmit_report_done = true;
}
}
! report(&log, true);
_current_step = 0;
_current_step_info = "";
// Run error reporting to determine whether or not to report the crash.
if (!transmit_report_done && should_report_bug(_id)) {
< prev index next >