8277316: ciReplay: dump_replay_data is not thread-safe
Reviewed-by: chagedorn, thartmann
This commit is contained in:
parent
007ad7c77c
commit
d8c0280273
@ -1681,8 +1681,8 @@ void ciEnv::dump_replay_data(outputStream* out) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ciEnv::dump_replay_data(int compile_id) {
|
void ciEnv::dump_replay_data(int compile_id) {
|
||||||
static char buffer[O_BUFLEN];
|
char buffer[64];
|
||||||
int ret = jio_snprintf(buffer, O_BUFLEN, "replay_pid%p_compid%d.log", os::current_process_id(), compile_id);
|
int ret = jio_snprintf(buffer, sizeof(buffer), "replay_pid%d_compid%d.log", os::current_process_id(), compile_id);
|
||||||
if (ret > 0) {
|
if (ret > 0) {
|
||||||
int fd = os::open(buffer, O_RDWR | O_CREAT | O_TRUNC, 0666);
|
int fd = os::open(buffer, O_RDWR | O_CREAT | O_TRUNC, 0666);
|
||||||
if (fd != -1) {
|
if (fd != -1) {
|
||||||
@ -1699,8 +1699,8 @@ void ciEnv::dump_replay_data(int compile_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ciEnv::dump_inline_data(int compile_id) {
|
void ciEnv::dump_inline_data(int compile_id) {
|
||||||
static char buffer[O_BUFLEN];
|
char buffer[64];
|
||||||
int ret = jio_snprintf(buffer, O_BUFLEN, "inline_pid%p_compid%d.log", os::current_process_id(), compile_id);
|
int ret = jio_snprintf(buffer, sizeof(buffer), "inline_pid%d_compid%d.log", os::current_process_id(), compile_id);
|
||||||
if (ret > 0) {
|
if (ret > 0) {
|
||||||
int fd = os::open(buffer, O_RDWR | O_CREAT | O_TRUNC, 0666);
|
int fd = os::open(buffer, O_RDWR | O_CREAT | O_TRUNC, 0666);
|
||||||
if (fd != -1) {
|
if (fd != -1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user