--- a/hotspot/src/os/aix/vm/perfMemory_aix.cpp Tue Mar 15 20:37:35 2016 +0000
+++ b/hotspot/src/os/aix/vm/perfMemory_aix.cpp Sat Mar 12 08:35:05 2016 +0100
@@ -30,6 +30,7 @@
#include "oops/oop.inline.hpp"
#include "os_aix.inline.hpp"
#include "runtime/handles.inline.hpp"
+#include "runtime/os.hpp"
#include "runtime/perfMemory.hpp"
#include "services/memTracker.hpp"
#include "utilities/exceptions.hpp"
@@ -101,7 +102,7 @@
if (result == OS_ERR) {
if (PrintMiscellaneous && Verbose) {
warning("Could not create Perfdata save file: %s: %s\n",
- destfile, strerror(errno));
+ destfile, os::strerror(errno));
}
} else {
int fd = result;
@@ -112,7 +113,7 @@
if (result == OS_ERR) {
if (PrintMiscellaneous && Verbose) {
warning("Could not write Perfdata save file: %s: %s\n",
- destfile, strerror(errno));
+ destfile, os::strerror(errno));
}
break;
}
@@ -124,7 +125,7 @@
result = ::close(fd);
if (PrintMiscellaneous && Verbose) {
if (result == OS_ERR) {
- warning("Could not close %s: %s\n", destfile, strerror(errno));
+ warning("Could not close %s: %s\n", destfile, os::strerror(errno));
}
}
}
@@ -397,7 +398,7 @@
if (errno == ELOOP) {
warning("directory %s is a symlink and is not secure\n", dirname);
} else {
- warning("could not open directory %s: %s\n", dirname, strerror(errno));
+ warning("could not open directory %s: %s\n", dirname, os::strerror(errno));
}
}
return dirp;
@@ -507,7 +508,7 @@
RESTARTABLE(::fstat(fd, &statbuf), result);
if (result == OS_ERR) {
if (PrintMiscellaneous && Verbose) {
- warning("fstat failed on %s: %s\n", filename, strerror(errno));
+ warning("fstat failed on %s: %s\n", filename, os::strerror(errno));
}
return false;
}
@@ -543,7 +544,7 @@
if (PrintMiscellaneous && Verbose) {
if (result != 0) {
warning("Could not retrieve passwd entry: %s\n",
- strerror(result));
+ os::strerror(result));
}
else if (p == NULL) {
// this check is added to protect against an observed problem
@@ -557,7 +558,7 @@
// Bug Id 89052 was opened with RedHat.
//
warning("Could not retrieve passwd entry: %s\n",
- strerror(errno));
+ os::strerror(errno));
}
else {
warning("Could not determine user name: %s\n",
@@ -593,7 +594,7 @@
"Process not found");
}
else /* EPERM */ {
- THROW_MSG_0(vmSymbols::java_io_IOException(), strerror(errno));
+ THROW_MSG_0(vmSymbols::java_io_IOException(), os::strerror(errno));
}
}
@@ -746,7 +747,7 @@
if (PrintMiscellaneous && Verbose && result == OS_ERR) {
if (errno != ENOENT) {
warning("Could not unlink shared memory backing"
- " store file %s : %s\n", path, strerror(errno));
+ " store file %s : %s\n", path, os::strerror(errno));
}
}
}
@@ -849,7 +850,7 @@
//
if (PrintMiscellaneous && Verbose) {
warning("could not create directory %s: %s\n",
- dirname, strerror(errno));
+ dirname, os::strerror(errno));
}
return false;
}
@@ -900,7 +901,7 @@
if (errno == ELOOP) {
warning("file %s is a symlink and is not secure\n", filename);
} else {
- warning("could not create file %s: %s\n", filename, strerror(errno));
+ warning("could not create file %s: %s\n", filename, os::strerror(errno));
}
}
// Close the directory and reset the current working directory.
@@ -924,7 +925,7 @@
RESTARTABLE(::ftruncate(fd, (off_t)0), result);
if (result == OS_ERR) {
if (PrintMiscellaneous && Verbose) {
- warning("could not truncate shared memory file: %s\n", strerror(errno));
+ warning("could not truncate shared memory file: %s\n", os::strerror(errno));
}
::close(fd);
return -1;
@@ -933,7 +934,7 @@
RESTARTABLE(::ftruncate(fd, (off_t)size), result);
if (result == OS_ERR) {
if (PrintMiscellaneous && Verbose) {
- warning("could not set shared memory file size: %s\n", strerror(errno));
+ warning("could not set shared memory file size: %s\n", os::strerror(errno));
}
::close(fd);
return -1;
@@ -968,7 +969,7 @@
"Permission denied");
}
else {
- THROW_MSG_0(vmSymbols::java_io_IOException(), strerror(errno));
+ THROW_MSG_0(vmSymbols::java_io_IOException(), os::strerror(errno));
}
}
int fd = result;
@@ -1041,7 +1042,7 @@
if (mapAddress == MAP_FAILED) {
if (PrintMiscellaneous && Verbose) {
- warning("mmap failed - %s\n", strerror(errno));
+ warning("mmap failed - %s\n", os::strerror(errno));
}
remove_file(filename);
FREE_C_HEAP_ARRAY(char, filename);
@@ -1109,7 +1110,7 @@
RESTARTABLE(::fstat(fd, &statbuf), result);
if (result == OS_ERR) {
if (PrintMiscellaneous && Verbose) {
- warning("fstat failed: %s\n", strerror(errno));
+ warning("fstat failed: %s\n", os::strerror(errno));
}
THROW_MSG_0(vmSymbols::java_io_IOException(),
"Could not determine PerfMemory size");
@@ -1231,7 +1232,7 @@
if (mapAddress == MAP_FAILED) {
if (PrintMiscellaneous && Verbose) {
- warning("mmap failed: %s\n", strerror(errno));
+ warning("mmap failed: %s\n", os::strerror(errno));
}
THROW_MSG(vmSymbols::java_lang_OutOfMemoryError(),
"Could not map PerfMemory");