< prev index next >
src/os/linux/vm/perfMemory_linux.cpp
Print this page
rev 11747 : 8162869: Small fixes for AIX perf memory and attach listener
@@ -889,18 +889,19 @@
int result;
RESTARTABLE(::open(filename, oflags), result);
if (result == OS_ERR) {
if (errno == ENOENT) {
THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(),
- "Process not found", OS_ERR);
+ "Process not found", OS_ERR);
}
else if (errno == EACCES) {
THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(),
- "Permission denied", OS_ERR);
+ "Permission denied", OS_ERR);
}
else {
- THROW_MSG_(vmSymbols::java_io_IOException(), os::strerror(errno), OS_ERR);
+ THROW_MSG_(vmSymbols::java_io_IOException(),
+ os::strerror(errno), OS_ERR);
}
}
int fd = result;
// check to see if the file is secure
@@ -914,11 +915,11 @@
// create a named shared memory region. returns the address of the
// memory region on success or NULL on failure. A return value of
// NULL will ultimately disable the shared memory feature.
//
-// On Solaris and Linux, the name space for shared memory objects
+// On Linux, the name space for shared memory objects
// is the file system name space.
//
// A monitoring application attaching to a JVM does not need to know
// the file system name of the shared memory object. However, it may
// be convenient for applications to discover the existence of newly
@@ -938,10 +939,11 @@
if (user_name == NULL)
return NULL;
char* dirname = get_user_tmp_dir(user_name);
char* filename = get_sharedmem_filename(dirname, vmid);
+
// get the short filename
char* short_filename = strrchr(filename, '/');
if (short_filename == NULL) {
short_filename = filename;
} else {
< prev index next >