Skip to content

Commit d97475d

Browse files
committed
8227435: Perf::attach() should not throw a java.lang.Exception
Reviewed-by: sspitsyn, clanger, dholmes
1 parent 27b4d31 commit d97475d

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/hotspot/os/aix/perfMemory_aix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ static size_t sharedmem_filesize(int fd, TRAPS) {
11111111

11121112
if ((statbuf.st_size == 0) ||
11131113
((size_t)statbuf.st_size % os::vm_page_size() != 0)) {
1114-
THROW_MSG_0(vmSymbols::java_lang_Exception(),
1114+
THROW_MSG_0(vmSymbols::java_io_IOException(),
11151115
"Invalid PerfMemory size");
11161116
}
11171117

src/hotspot/os/bsd/perfMemory_bsd.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ static size_t sharedmem_filesize(int fd, TRAPS) {
10281028

10291029
if ((statbuf.st_size == 0) ||
10301030
((size_t)statbuf.st_size % os::vm_page_size() != 0)) {
1031-
THROW_MSG_0(vmSymbols::java_lang_Exception(),
1031+
THROW_MSG_0(vmSymbols::java_io_IOException(),
10321032
"Invalid PerfMemory size");
10331033
}
10341034

src/hotspot/os/linux/perfMemory_linux.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ static size_t sharedmem_filesize(int fd, TRAPS) {
11071107

11081108
if ((statbuf.st_size == 0) ||
11091109
((size_t)statbuf.st_size % os::vm_page_size() != 0)) {
1110-
THROW_MSG_0(vmSymbols::java_lang_Exception(),
1110+
THROW_MSG_0(vmSymbols::java_io_IOException(),
11111111
"Invalid PerfMemory size");
11121112
}
11131113

src/hotspot/os/solaris/perfMemory_solaris.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ static size_t sharedmem_filesize(int fd, TRAPS) {
10551055

10561056
if ((statbuf.st_size == 0) ||
10571057
((size_t)statbuf.st_size % os::vm_page_size() != 0)) {
1058-
THROW_MSG_0(vmSymbols::java_lang_Exception(),
1058+
THROW_MSG_0(vmSymbols::java_io_IOException(),
10591059
"Invalid PerfMemory size");
10601060
}
10611061

src/hotspot/os/windows/perfMemory_windows.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1561,7 +1561,7 @@ static size_t sharedmem_filesize(const char* filename, TRAPS) {
15611561
warning("unexpected file size: size = " SIZE_FORMAT "\n",
15621562
statbuf.st_size);
15631563
}
1564-
THROW_MSG_0(vmSymbols::java_lang_Exception(),
1564+
THROW_MSG_0(vmSymbols::java_io_IOException(),
15651565
"Invalid PerfMemory size");
15661566
}
15671567

0 commit comments

Comments
 (0)