8227435: Perf::attach() should not throw a java.lang.Exception

Reviewed-by: sspitsyn, clanger, dholmes
This commit is contained in:
Ralf Schmelter 2019-07-18 10:25:49 +02:00
parent 27b4d31b65
commit d97475df72
5 changed files with 5 additions and 5 deletions

View File

@ -1111,7 +1111,7 @@ static size_t sharedmem_filesize(int fd, TRAPS) {
if ((statbuf.st_size == 0) ||
((size_t)statbuf.st_size % os::vm_page_size() != 0)) {
THROW_MSG_0(vmSymbols::java_lang_Exception(),
THROW_MSG_0(vmSymbols::java_io_IOException(),
"Invalid PerfMemory size");
}

View File

@ -1028,7 +1028,7 @@ static size_t sharedmem_filesize(int fd, TRAPS) {
if ((statbuf.st_size == 0) ||
((size_t)statbuf.st_size % os::vm_page_size() != 0)) {
THROW_MSG_0(vmSymbols::java_lang_Exception(),
THROW_MSG_0(vmSymbols::java_io_IOException(),
"Invalid PerfMemory size");
}

View File

@ -1107,7 +1107,7 @@ static size_t sharedmem_filesize(int fd, TRAPS) {
if ((statbuf.st_size == 0) ||
((size_t)statbuf.st_size % os::vm_page_size() != 0)) {
THROW_MSG_0(vmSymbols::java_lang_Exception(),
THROW_MSG_0(vmSymbols::java_io_IOException(),
"Invalid PerfMemory size");
}

View File

@ -1055,7 +1055,7 @@ static size_t sharedmem_filesize(int fd, TRAPS) {
if ((statbuf.st_size == 0) ||
((size_t)statbuf.st_size % os::vm_page_size() != 0)) {
THROW_MSG_0(vmSymbols::java_lang_Exception(),
THROW_MSG_0(vmSymbols::java_io_IOException(),
"Invalid PerfMemory size");
}

View File

@ -1561,7 +1561,7 @@ static size_t sharedmem_filesize(const char* filename, TRAPS) {
warning("unexpected file size: size = " SIZE_FORMAT "\n",
statbuf.st_size);
}
THROW_MSG_0(vmSymbols::java_lang_Exception(),
THROW_MSG_0(vmSymbols::java_io_IOException(),
"Invalid PerfMemory size");
}