< prev index next >
src/share/vm/jfr/recorder/repository/jfrChunkWriter.cpp
Print this page
rev 9051 : 8217362: Emergency dump does not work when disk=false is set
Reviewed-by: egahlin, ysuenaga
Contributed-by: yasuenag@gmail.com
*** 1,7 ****
/*
! * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 45,61 ****
assert(_chunkstate == NULL, "invariant");
_chunkstate = new JfrChunkState();
return _chunkstate != NULL;
}
- static fio_fd open_existing(const char* path) {
- return os::open(path, O_RDWR, S_IREAD | S_IWRITE);
- }
-
static fio_fd open_chunk(const char* path) {
assert(JfrStream_lock->owned_by_self(), "invariant");
! return path != NULL ? open_existing(path) : invalid_fd;
}
bool JfrChunkWriter::open() {
assert(_chunkstate != NULL, "invariant");
JfrChunkWriterBase::reset(open_chunk(_chunkstate->path()));
--- 45,57 ----
assert(_chunkstate == NULL, "invariant");
_chunkstate = new JfrChunkState();
return _chunkstate != NULL;
}
static fio_fd open_chunk(const char* path) {
assert(JfrStream_lock->owned_by_self(), "invariant");
! return path != NULL ? os::open(path, O_CREAT | O_RDWR, S_IREAD | S_IWRITE) : invalid_fd;
}
bool JfrChunkWriter::open() {
assert(_chunkstate != NULL, "invariant");
JfrChunkWriterBase::reset(open_chunk(_chunkstate->path()));
< prev index next >