8134540: Much nearly duplicated code for PerfMemory support

Reviewed-by: coleenp, dholmes
This commit is contained in:
Harold Seigel 2021-01-19 13:44:07 +00:00
parent a9519c83b8
commit 82adfb3233
9 changed files with 102 additions and 2625 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2021, 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
@ -64,18 +64,6 @@ inline int os::ftruncate(int fd, jlong length) {
return ::ftruncate64(fd, length);
}
// macros for restartable system calls
#define RESTARTABLE(_cmd, _result) do { \
_result = _cmd; \
} while(((int)_result == OS_ERR) && (errno == EINTR))
#define RESTARTABLE_RETURN_INT(_cmd) do { \
int _result; \
RESTARTABLE(_cmd, _result); \
return _result; \
} while(false)
inline bool os::numa_has_static_binding() { return true; }
inline bool os::numa_has_group_homing() { return false; }
@ -85,10 +73,6 @@ inline size_t os::write(int fd, const void *buf, unsigned int nBytes) {
return res;
}
inline int os::close(int fd) {
return ::close(fd);
}
inline int os::socket_close(int fd) {
return ::close(fd);
}