Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
d3403e4d
D
dragonwell8_hotspot
项目概览
openanolis
/
dragonwell8_hotspot
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_hotspot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d3403e4d
编写于
6月 14, 2013
作者:
D
dcubed
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
5a9f1dbc
26797cee
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
36 addition
and
56 deletion
+36
-56
src/os/bsd/dtrace/jvm_dtrace.c
src/os/bsd/dtrace/jvm_dtrace.c
+1
-3
src/os/bsd/vm/attachListener_bsd.cpp
src/os/bsd/vm/attachListener_bsd.cpp
+6
-9
src/os/bsd/vm/os_bsd.inline.hpp
src/os/bsd/vm/os_bsd.inline.hpp
+2
-2
src/os/bsd/vm/perfMemory_bsd.cpp
src/os/bsd/vm/perfMemory_bsd.cpp
+5
-7
src/os/linux/vm/attachListener_linux.cpp
src/os/linux/vm/attachListener_linux.cpp
+6
-9
src/os/linux/vm/perfMemory_linux.cpp
src/os/linux/vm/perfMemory_linux.cpp
+5
-9
src/os/solaris/dtrace/jvm_dtrace.c
src/os/solaris/dtrace/jvm_dtrace.c
+1
-3
src/os/solaris/vm/attachListener_solaris.cpp
src/os/solaris/vm/attachListener_solaris.cpp
+3
-3
src/os/solaris/vm/os_solaris.cpp
src/os/solaris/vm/os_solaris.cpp
+2
-2
src/os/solaris/vm/perfMemory_solaris.cpp
src/os/solaris/vm/perfMemory_solaris.cpp
+5
-9
未找到文件。
src/os/bsd/dtrace/jvm_dtrace.c
浏览文件 @
d3403e4d
...
...
@@ -122,9 +122,7 @@ static int file_open(const char* path, int flag) {
}
static
int
file_close
(
int
fd
)
{
int
ret
;
RESTARTABLE
(
close
(
fd
),
ret
);
return
ret
;
return
close
(
fd
);
}
static
int
file_read
(
int
fd
,
char
*
buf
,
int
len
)
{
...
...
src/os/bsd/vm/attachListener_bsd.cpp
浏览文件 @
d3403e4d
...
...
@@ -199,7 +199,7 @@ int BsdAttachListener::init() {
::
unlink
(
initial_path
);
int
res
=
::
bind
(
listener
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
));
if
(
res
==
-
1
)
{
RESTARTABLE
(
::
close
(
listener
),
res
);
::
close
(
listener
);
return
-
1
;
}
...
...
@@ -217,7 +217,7 @@ int BsdAttachListener::init() {
}
}
if
(
res
==
-
1
)
{
RESTARTABLE
(
::
close
(
listener
),
res
);
::
close
(
listener
);
::
unlink
(
initial_path
);
return
-
1
;
}
...
...
@@ -345,24 +345,21 @@ BsdAttachOperation* BsdAttachListener::dequeue() {
uid_t
puid
;
gid_t
pgid
;
if
(
::
getpeereid
(
s
,
&
puid
,
&
pgid
)
!=
0
)
{
int
res
;
RESTARTABLE
(
::
close
(
s
),
res
);
::
close
(
s
);
continue
;
}
uid_t
euid
=
geteuid
();
gid_t
egid
=
getegid
();
if
(
puid
!=
euid
||
pgid
!=
egid
)
{
int
res
;
RESTARTABLE
(
::
close
(
s
),
res
);
::
close
(
s
);
continue
;
}
// peer credential look okay so we read the request
BsdAttachOperation
*
op
=
read_request
(
s
);
if
(
op
==
NULL
)
{
int
res
;
RESTARTABLE
(
::
close
(
s
),
res
);
::
close
(
s
);
continue
;
}
else
{
return
op
;
...
...
@@ -413,7 +410,7 @@ void BsdAttachOperation::complete(jint result, bufferedStream* st) {
}
// done
RESTARTABLE
(
::
close
(
this
->
socket
()),
rc
);
::
close
(
this
->
socket
()
);
// were we externally suspended while we were waiting?
thread
->
check_and_wait_while_suspended
();
...
...
src/os/bsd/vm/os_bsd.inline.hpp
浏览文件 @
d3403e4d
...
...
@@ -178,11 +178,11 @@ inline size_t os::write(int fd, const void *buf, unsigned int nBytes) {
}
inline
int
os
::
close
(
int
fd
)
{
RESTARTABLE_RETURN_INT
(
::
close
(
fd
)
);
return
::
close
(
fd
);
}
inline
int
os
::
socket_close
(
int
fd
)
{
RESTARTABLE_RETURN_INT
(
::
close
(
fd
)
);
return
::
close
(
fd
);
}
inline
int
os
::
socket
(
int
domain
,
int
type
,
int
protocol
)
{
...
...
src/os/bsd/vm/perfMemory_bsd.cpp
浏览文件 @
d3403e4d
...
...
@@ -120,7 +120,7 @@ static void save_memory_to_file(char* addr, size_t size) {
addr
+=
result
;
}
RESTARTABLE
(
::
close
(
fd
),
result
);
result
=
::
close
(
fd
);
if
(
PrintMiscellaneous
&&
Verbose
)
{
if
(
result
==
OS_ERR
)
{
warning
(
"Could not close %s: %s
\n
"
,
destfile
,
strerror
(
errno
));
...
...
@@ -632,7 +632,7 @@ static int create_sharedmem_resources(const char* dirname, const char* filename,
if
(
PrintMiscellaneous
&&
Verbose
)
{
warning
(
"could not set shared memory file size: %s
\n
"
,
strerror
(
errno
));
}
RESTARTABLE
(
::
close
(
fd
),
result
);
::
close
(
fd
);
return
-
1
;
}
...
...
@@ -656,7 +656,7 @@ static int create_sharedmem_resources(const char* dirname, const char* filename,
if
(
result
!=
-
1
)
{
return
fd
;
}
else
{
RESTARTABLE
(
::
close
(
fd
),
result
);
::
close
(
fd
);
return
-
1
;
}
}
...
...
@@ -734,9 +734,7 @@ static char* mmap_create_shared(size_t size) {
mapAddress
=
(
char
*
)
::
mmap
((
char
*
)
0
,
size
,
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
fd
,
0
);
// attempt to close the file - restart it if it was interrupted,
// but ignore other failures
RESTARTABLE
(
::
close
(
fd
),
result
);
result
=
::
close
(
fd
);
assert
(
result
!=
OS_ERR
,
"could not close file"
);
if
(
mapAddress
==
MAP_FAILED
)
{
...
...
@@ -909,7 +907,7 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
// attempt to close the file - restart if it gets interrupted,
// but ignore other failures
RESTARTABLE
(
::
close
(
fd
),
result
);
result
=
::
close
(
fd
);
assert
(
result
!=
OS_ERR
,
"could not close file"
);
if
(
mapAddress
==
MAP_FAILED
)
{
...
...
src/os/linux/vm/attachListener_linux.cpp
浏览文件 @
d3403e4d
...
...
@@ -199,7 +199,7 @@ int LinuxAttachListener::init() {
::
unlink
(
initial_path
);
int
res
=
::
bind
(
listener
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
));
if
(
res
==
-
1
)
{
RESTARTABLE
(
::
close
(
listener
),
res
);
::
close
(
listener
);
return
-
1
;
}
...
...
@@ -212,7 +212,7 @@ int LinuxAttachListener::init() {
}
}
if
(
res
==
-
1
)
{
RESTARTABLE
(
::
close
(
listener
),
res
);
::
close
(
listener
);
::
unlink
(
initial_path
);
return
-
1
;
}
...
...
@@ -340,24 +340,21 @@ LinuxAttachOperation* LinuxAttachListener::dequeue() {
struct
ucred
cred_info
;
socklen_t
optlen
=
sizeof
(
cred_info
);
if
(
::
getsockopt
(
s
,
SOL_SOCKET
,
SO_PEERCRED
,
(
void
*
)
&
cred_info
,
&
optlen
)
==
-
1
)
{
int
res
;
RESTARTABLE
(
::
close
(
s
),
res
);
::
close
(
s
);
continue
;
}
uid_t
euid
=
geteuid
();
gid_t
egid
=
getegid
();
if
(
cred_info
.
uid
!=
euid
||
cred_info
.
gid
!=
egid
)
{
int
res
;
RESTARTABLE
(
::
close
(
s
),
res
);
::
close
(
s
);
continue
;
}
// peer credential look okay so we read the request
LinuxAttachOperation
*
op
=
read_request
(
s
);
if
(
op
==
NULL
)
{
int
res
;
RESTARTABLE
(
::
close
(
s
),
res
);
::
close
(
s
);
continue
;
}
else
{
return
op
;
...
...
@@ -408,7 +405,7 @@ void LinuxAttachOperation::complete(jint result, bufferedStream* st) {
}
// done
RESTARTABLE
(
::
close
(
this
->
socket
()),
rc
);
::
close
(
this
->
socket
()
);
// were we externally suspended while we were waiting?
thread
->
check_and_wait_while_suspended
();
...
...
src/os/linux/vm/perfMemory_linux.cpp
浏览文件 @
d3403e4d
...
...
@@ -120,7 +120,7 @@ static void save_memory_to_file(char* addr, size_t size) {
addr
+=
result
;
}
RESTARTABLE
(
::
close
(
fd
),
result
);
result
=
::
close
(
fd
);
if
(
PrintMiscellaneous
&&
Verbose
)
{
if
(
result
==
OS_ERR
)
{
warning
(
"Could not close %s: %s
\n
"
,
destfile
,
strerror
(
errno
));
...
...
@@ -632,7 +632,7 @@ static int create_sharedmem_resources(const char* dirname, const char* filename,
if
(
PrintMiscellaneous
&&
Verbose
)
{
warning
(
"could not set shared memory file size: %s
\n
"
,
strerror
(
errno
));
}
RESTARTABLE
(
::
close
(
fd
),
result
);
::
close
(
fd
);
return
-
1
;
}
...
...
@@ -656,7 +656,7 @@ static int create_sharedmem_resources(const char* dirname, const char* filename,
if
(
result
!=
-
1
)
{
return
fd
;
}
else
{
RESTARTABLE
(
::
close
(
fd
),
result
);
::
close
(
fd
);
return
-
1
;
}
}
...
...
@@ -734,9 +734,7 @@ static char* mmap_create_shared(size_t size) {
mapAddress
=
(
char
*
)
::
mmap
((
char
*
)
0
,
size
,
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
fd
,
0
);
// attempt to close the file - restart it if it was interrupted,
// but ignore other failures
RESTARTABLE
(
::
close
(
fd
),
result
);
result
=
::
close
(
fd
);
assert
(
result
!=
OS_ERR
,
"could not close file"
);
if
(
mapAddress
==
MAP_FAILED
)
{
...
...
@@ -907,9 +905,7 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
mapAddress
=
(
char
*
)
::
mmap
((
char
*
)
0
,
size
,
mmap_prot
,
MAP_SHARED
,
fd
,
0
);
// attempt to close the file - restart if it gets interrupted,
// but ignore other failures
RESTARTABLE
(
::
close
(
fd
),
result
);
result
=
::
close
(
fd
);
assert
(
result
!=
OS_ERR
,
"could not close file"
);
if
(
mapAddress
==
MAP_FAILED
)
{
...
...
src/os/solaris/dtrace/jvm_dtrace.c
浏览文件 @
d3403e4d
...
...
@@ -122,9 +122,7 @@ static int file_open(const char* path, int flag) {
}
static
int
file_close
(
int
fd
)
{
int
ret
;
RESTARTABLE
(
close
(
fd
),
ret
);
return
ret
;
return
close
(
fd
);
}
static
int
file_read
(
int
fd
,
char
*
buf
,
int
len
)
{
...
...
src/os/solaris/vm/attachListener_solaris.cpp
浏览文件 @
d3403e4d
...
...
@@ -392,7 +392,7 @@ int SolarisAttachListener::create_door() {
return
-
1
;
}
assert
(
fd
>=
0
,
"bad file descriptor"
);
RESTARTABLE
(
::
close
(
fd
),
res
);
::
close
(
fd
);
// attach the door descriptor to the file
if
((
res
=
::
fattach
(
dd
,
initial_path
))
==
-
1
)
{
...
...
@@ -410,7 +410,7 @@ int SolarisAttachListener::create_door() {
// rename file so that clients can attach
if
(
dd
>=
0
)
{
if
(
::
rename
(
initial_path
,
door_path
)
==
-
1
)
{
RESTARTABLE
(
::
close
(
dd
),
res
);
::
close
(
dd
);
::
fdetach
(
initial_path
);
dd
=
-
1
;
}
...
...
@@ -549,7 +549,7 @@ void SolarisAttachOperation::complete(jint res, bufferedStream* st) {
}
// close socket and we're done
RESTARTABLE
(
::
close
(
this
->
socket
()),
rc
);
::
close
(
this
->
socket
()
);
// were we externally suspended while we were waiting?
thread
->
check_and_wait_while_suspended
();
...
...
src/os/solaris/vm/os_solaris.cpp
浏览文件 @
d3403e4d
...
...
@@ -6679,11 +6679,11 @@ size_t os::write(int fd, const void *buf, unsigned int nBytes) {
}
int
os
::
close
(
int
fd
)
{
RESTARTABLE_RETURN_INT
(
::
close
(
fd
)
);
return
::
close
(
fd
);
}
int
os
::
socket_close
(
int
fd
)
{
RESTARTABLE_RETURN_INT
(
::
close
(
fd
)
);
return
::
close
(
fd
);
}
int
os
::
recv
(
int
fd
,
char
*
buf
,
size_t
nBytes
,
uint
flags
)
{
...
...
src/os/solaris/vm/perfMemory_solaris.cpp
浏览文件 @
d3403e4d
...
...
@@ -122,7 +122,7 @@ static void save_memory_to_file(char* addr, size_t size) {
addr
+=
result
;
}
RESTARTABLE
(
::
close
(
fd
),
result
);
result
=
::
close
(
fd
);
if
(
PrintMiscellaneous
&&
Verbose
)
{
if
(
result
==
OS_ERR
)
{
warning
(
"Could not close %s: %s
\n
"
,
destfile
,
strerror
(
errno
));
...
...
@@ -437,7 +437,7 @@ static char* get_user_name(int vmid, TRAPS) {
addr
+=
result
;
}
RESTARTABLE
(
::
close
(
fd
),
result
);
::
close
(
fd
);
// get the user name for the effective user id of the process
char
*
user_name
=
get_user_name
(
psinfo
.
pr_euid
);
...
...
@@ -669,7 +669,7 @@ static int create_sharedmem_resources(const char* dirname, const char* filename,
if
(
PrintMiscellaneous
&&
Verbose
)
{
warning
(
"could not set shared memory file size: %s
\n
"
,
strerror
(
errno
));
}
RESTARTABLE
(
::
close
(
fd
),
result
);
::
close
(
fd
);
return
-
1
;
}
...
...
@@ -749,9 +749,7 @@ static char* mmap_create_shared(size_t size) {
mapAddress
=
(
char
*
)
::
mmap
((
char
*
)
0
,
size
,
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
fd
,
0
);
// attempt to close the file - restart it if it was interrupted,
// but ignore other failures
RESTARTABLE
(
::
close
(
fd
),
result
);
result
=
::
close
(
fd
);
assert
(
result
!=
OS_ERR
,
"could not close file"
);
if
(
mapAddress
==
MAP_FAILED
)
{
...
...
@@ -922,9 +920,7 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
mapAddress
=
(
char
*
)
::
mmap
((
char
*
)
0
,
size
,
mmap_prot
,
MAP_SHARED
,
fd
,
0
);
// attempt to close the file - restart if it gets interrupted,
// but ignore other failures
RESTARTABLE
(
::
close
(
fd
),
result
);
result
=
::
close
(
fd
);
assert
(
result
!=
OS_ERR
,
"could not close file"
);
if
(
mapAddress
==
MAP_FAILED
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录