Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
c11ea7e7
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看板
提交
c11ea7e7
编写于
2月 25, 2019
作者:
P
phh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8027434: "-XX:OnOutOfMemoryError" uses fork instead of vfork
Summary: On Linux, use vfork in case of an OOM. Reviewed-by: dholmes, iklam
上级
5df367bd
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
21 addition
and
15 deletion
+21
-15
src/os/aix/vm/os_aix.cpp
src/os/aix/vm/os_aix.cpp
+2
-2
src/os/bsd/vm/os_bsd.cpp
src/os/bsd/vm/os_bsd.cpp
+2
-2
src/os/linux/vm/os_linux.cpp
src/os/linux/vm/os_linux.cpp
+9
-3
src/os/solaris/vm/os_solaris.cpp
src/os/solaris/vm/os_solaris.cpp
+2
-2
src/os/windows/vm/os_windows.cpp
src/os/windows/vm/os_windows.cpp
+2
-2
src/share/vm/runtime/os.hpp
src/share/vm/runtime/os.hpp
+2
-2
src/share/vm/utilities/vmError.cpp
src/share/vm/utilities/vmError.cpp
+2
-2
未找到文件。
src/os/aix/vm/os_aix.cpp
浏览文件 @
c11ea7e7
/*
/*
* Copyright (c) 1999, 201
8
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
9
, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 2014 SAP AG. All rights reserved.
* Copyright 2012, 2014 SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
...
@@ -5142,7 +5142,7 @@ extern char** environ;
...
@@ -5142,7 +5142,7 @@ extern char** environ;
// or -1 on failure (e.g. can't fork a new process).
// or -1 on failure (e.g. can't fork a new process).
// Unlike system(), this function can be called from signal handler. It
// Unlike system(), this function can be called from signal handler. It
// doesn't block SIGINT et al.
// doesn't block SIGINT et al.
int
os
::
fork_and_exec
(
char
*
cmd
)
{
int
os
::
fork_and_exec
(
char
*
cmd
,
bool
use_vfork_if_available
)
{
char
*
argv
[
4
]
=
{
"sh"
,
"-c"
,
cmd
,
NULL
};
char
*
argv
[
4
]
=
{
"sh"
,
"-c"
,
cmd
,
NULL
};
pid_t
pid
=
fork
();
pid_t
pid
=
fork
();
...
...
src/os/bsd/vm/os_bsd.cpp
浏览文件 @
c11ea7e7
/*
/*
* Copyright (c) 1999, 201
8
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
9
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -4716,7 +4716,7 @@ extern char** environ;
...
@@ -4716,7 +4716,7 @@ extern char** environ;
// or -1 on failure (e.g. can't fork a new process).
// or -1 on failure (e.g. can't fork a new process).
// Unlike system(), this function can be called from signal handler. It
// Unlike system(), this function can be called from signal handler. It
// doesn't block SIGINT et al.
// doesn't block SIGINT et al.
int
os
::
fork_and_exec
(
char
*
cmd
)
{
int
os
::
fork_and_exec
(
char
*
cmd
,
bool
use_vfork_if_available
)
{
const
char
*
argv
[
4
]
=
{
"sh"
,
"-c"
,
cmd
,
NULL
};
const
char
*
argv
[
4
]
=
{
"sh"
,
"-c"
,
cmd
,
NULL
};
// fork() in BsdThreads/NPTL is not async-safe. It needs to run
// fork() in BsdThreads/NPTL is not async-safe. It needs to run
...
...
src/os/linux/vm/os_linux.cpp
浏览文件 @
c11ea7e7
/*
/*
* Copyright (c) 1999, 201
8
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
9
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -6337,10 +6337,16 @@ extern char** environ;
...
@@ -6337,10 +6337,16 @@ extern char** environ;
// or -1 on failure (e.g. can't fork a new process).
// or -1 on failure (e.g. can't fork a new process).
// Unlike system(), this function can be called from signal handler. It
// Unlike system(), this function can be called from signal handler. It
// doesn't block SIGINT et al.
// doesn't block SIGINT et al.
int
os
::
fork_and_exec
(
char
*
cmd
)
{
int
os
::
fork_and_exec
(
char
*
cmd
,
bool
use_vfork_if_available
)
{
const
char
*
argv
[
4
]
=
{
"sh"
,
"-c"
,
cmd
,
NULL
};
const
char
*
argv
[
4
]
=
{
"sh"
,
"-c"
,
cmd
,
NULL
};
pid_t
pid
=
fork
();
pid_t
pid
;
if
(
use_vfork_if_available
)
{
pid
=
vfork
();
}
else
{
pid
=
fork
();
}
if
(
pid
<
0
)
{
if
(
pid
<
0
)
{
// fork failed
// fork failed
...
...
src/os/solaris/vm/os_solaris.cpp
浏览文件 @
c11ea7e7
/*
/*
* Copyright (c) 1997, 201
8
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
9
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -6153,7 +6153,7 @@ extern char** environ;
...
@@ -6153,7 +6153,7 @@ extern char** environ;
// or -1 on failure (e.g. can't fork a new process).
// or -1 on failure (e.g. can't fork a new process).
// Unlike system(), this function can be called from signal handler. It
// Unlike system(), this function can be called from signal handler. It
// doesn't block SIGINT et al.
// doesn't block SIGINT et al.
int
os
::
fork_and_exec
(
char
*
cmd
)
{
int
os
::
fork_and_exec
(
char
*
cmd
,
bool
use_vfork_if_available
)
{
char
*
argv
[
4
];
char
*
argv
[
4
];
argv
[
0
]
=
(
char
*
)
"sh"
;
argv
[
0
]
=
(
char
*
)
"sh"
;
argv
[
1
]
=
(
char
*
)
"-c"
;
argv
[
1
]
=
(
char
*
)
"-c"
;
...
...
src/os/windows/vm/os_windows.cpp
浏览文件 @
c11ea7e7
/*
/*
* Copyright (c) 1997, 201
8
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
9
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -5034,7 +5034,7 @@ void Parker::unpark() {
...
@@ -5034,7 +5034,7 @@ void Parker::unpark() {
// Run the specified command in a separate process. Return its exit value,
// Run the specified command in a separate process. Return its exit value,
// or -1 on failure (e.g. can't create a new process).
// or -1 on failure (e.g. can't create a new process).
int
os
::
fork_and_exec
(
char
*
cmd
)
{
int
os
::
fork_and_exec
(
char
*
cmd
,
bool
use_vfork_if_available
)
{
STARTUPINFO
si
;
STARTUPINFO
si
;
PROCESS_INFORMATION
pi
;
PROCESS_INFORMATION
pi
;
...
...
src/share/vm/runtime/os.hpp
浏览文件 @
c11ea7e7
/*
/*
* Copyright (c) 1997, 201
8
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
9
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -527,7 +527,7 @@ class os: AllStatic {
...
@@ -527,7 +527,7 @@ class os: AllStatic {
static
char
*
do_you_want_to_debug
(
const
char
*
message
);
static
char
*
do_you_want_to_debug
(
const
char
*
message
);
// run cmd in a separate process and return its exit code; or -1 on failures
// run cmd in a separate process and return its exit code; or -1 on failures
static
int
fork_and_exec
(
char
*
cmd
);
static
int
fork_and_exec
(
char
*
cmd
,
bool
use_vfork_if_available
=
false
);
// os::exit() is merged with vm_exit()
// os::exit() is merged with vm_exit()
// static void exit(int num);
// static void exit(int num);
...
...
src/share/vm/utilities/vmError.cpp
浏览文件 @
c11ea7e7
/*
/*
* Copyright (c) 2003, 201
8
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
9
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -1060,7 +1060,7 @@ void VMError::report_and_die() {
...
@@ -1060,7 +1060,7 @@ void VMError::report_and_die() {
out
.
print_raw
(
cmd
);
out
.
print_raw
(
cmd
);
out
.
print_raw_cr
(
"
\"
..."
);
out
.
print_raw_cr
(
"
\"
..."
);
if
(
os
::
fork_and_exec
(
cmd
)
<
0
)
{
if
(
os
::
fork_and_exec
(
cmd
,
true
)
<
0
)
{
out
.
print_cr
(
"os::fork_and_exec failed: %s (%d)"
,
strerror
(
errno
),
errno
);
out
.
print_cr
(
"os::fork_and_exec failed: %s (%d)"
,
strerror
(
errno
),
errno
);
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录