Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
ce3ed306
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看板
提交
ce3ed306
编写于
2月 15, 2012
作者:
I
iveresov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7145345: Code cache sweeper must cooperate with safepoints
Summary: Safepoint in the sweeper loop in necessary Reviewed-by: kvn, never
上级
74d5ddfb
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
11 addition
and
1 deletion
+11
-1
src/share/vm/runtime/globals.hpp
src/share/vm/runtime/globals.hpp
+1
-1
src/share/vm/runtime/sweeper.cpp
src/share/vm/runtime/sweeper.cpp
+10
-0
未找到文件。
src/share/vm/runtime/globals.hpp
浏览文件 @
ce3ed306
...
@@ -3013,7 +3013,7 @@ class CommandLineFlags {
...
@@ -3013,7 +3013,7 @@ class CommandLineFlags {
product(intx, SafepointTimeoutDelay, 10000, \
product(intx, SafepointTimeoutDelay, 10000, \
"Delay in milliseconds for option SafepointTimeout") \
"Delay in milliseconds for option SafepointTimeout") \
\
\
product(intx, NmethodSweepFraction,
4
, \
product(intx, NmethodSweepFraction,
16
, \
"Number of invocations of sweeper to cover all nmethods") \
"Number of invocations of sweeper to cover all nmethods") \
\
\
product(intx, NmethodSweepCheckInterval, 5, \
product(intx, NmethodSweepCheckInterval, 5, \
...
...
src/share/vm/runtime/sweeper.cpp
浏览文件 @
ce3ed306
...
@@ -266,7 +266,17 @@ void NMethodSweeper::sweep_code_cache() {
...
@@ -266,7 +266,17 @@ void NMethodSweeper::sweep_code_cache() {
// The last invocation iterates until there are no more nmethods
// The last invocation iterates until there are no more nmethods
for
(
int
i
=
0
;
(
i
<
todo
||
_invocations
==
1
)
&&
_current
!=
NULL
;
i
++
)
{
for
(
int
i
=
0
;
(
i
<
todo
||
_invocations
==
1
)
&&
_current
!=
NULL
;
i
++
)
{
if
(
SafepointSynchronize
::
is_synchronizing
())
{
// Safepoint request
if
(
PrintMethodFlushing
&&
Verbose
)
{
tty
->
print_cr
(
"### Sweep at %d out of %d, invocation: %d, yielding to safepoint"
,
_seen
,
CodeCache
::
nof_nmethods
(),
_invocations
);
}
MutexUnlockerEx
mu
(
CodeCache_lock
,
Mutex
::
_no_safepoint_check_flag
);
assert
(
Thread
::
current
()
->
is_Java_thread
(),
"should be java thread"
);
JavaThread
*
thread
=
(
JavaThread
*
)
Thread
::
current
();
ThreadBlockInVM
tbivm
(
thread
);
thread
->
java_suspend_self
();
}
// Since we will give up the CodeCache_lock, always skip ahead
// Since we will give up the CodeCache_lock, always skip ahead
// to the next nmethod. Other blobs can be deleted by other
// to the next nmethod. Other blobs can be deleted by other
// threads but nmethods are only reclaimed by the sweeper.
// threads but nmethods are only reclaimed by the sweeper.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录