--- a/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp Tue Mar 15 20:37:35 2016 +0000
+++ b/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp Sat Mar 12 08:35:05 2016 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, 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
@@ -29,6 +29,7 @@
#include "oops/oop.inline.hpp"
#include "os_bsd.inline.hpp"
#include "runtime/handles.inline.hpp"
+#include "runtime/os.hpp"
#include "runtime/perfMemory.hpp"
#include "services/memTracker.hpp"
#include "utilities/exceptions.hpp"
@@ -100,7 +101,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;
@@ -111,7 +112,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;
}
@@ -123,7 +124,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));
}
}
}
@@ -309,7 +310,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;
@@ -420,7 +421,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;
}
@@ -459,7 +460,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
@@ -473,7 +474,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",
@@ -509,7 +510,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));
}
}
@@ -652,7 +653,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));
}
}
}
@@ -762,7 +763,7 @@
//
if (PrintMiscellaneous && Verbose) {
warning("could not create directory %s: %s\n",
- dirname, strerror(errno));
+ dirname, os::strerror(errno));
}
return false;
}
@@ -804,7 +805,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
@@ -828,7 +829,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;
@@ -837,7 +838,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;
@@ -887,7 +888,7 @@
"Permission denied", OS_ERR);
}
else {
- THROW_MSG_(vmSymbols::java_io_IOException(), strerror(errno), OS_ERR);
+ THROW_MSG_(vmSymbols::java_io_IOException(), os::strerror(errno), OS_ERR);
}
}
int fd = result;
@@ -961,7 +962,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);
@@ -1025,7 +1026,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");
@@ -1136,7 +1137,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");