Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
90017957
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看板
提交
90017957
编写于
10月 13, 2011
作者:
T
tonyp
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7098085: G1: partially-young GCs not initiated under certain circumstances
Reviewed-by: ysr, brutisso
上级
06be9d67
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
41 addition
and
11 deletion
+41
-11
src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp
src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp
+41
-11
未找到文件。
src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp
浏览文件 @
90017957
...
@@ -215,20 +215,20 @@ void ConcurrentMarkThread::run() {
...
@@ -215,20 +215,20 @@ void ConcurrentMarkThread::run() {
gclog_or_tty
->
print_cr
(
"[GC concurrent-cleanup-start]"
);
gclog_or_tty
->
print_cr
(
"[GC concurrent-cleanup-start]"
);
}
}
// Now do the
remainder of the
cleanup operation.
// Now do the
concurrent
cleanup operation.
_cm
->
completeCleanup
();
_cm
->
completeCleanup
();
// Notify anyone who's waiting that there are no more free
// Notify anyone who's waiting that there are no more free
// regions coming. We have to do this before we join the STS,
// regions coming. We have to do this before we join the STS
// otherwise we might deadlock: a GC worker could be blocked
// (in fact, we should not attempt to join the STS in the
// waiting for the notification whereas this thread will be
// interval between finishing the cleanup pause and clearing
// blocked for the pause to finish while it's trying to join
// the free_regions_coming flag) otherwise we might deadlock:
// the STS, which is conditional on the GC workers finishing.
// a GC worker could be blocked waiting for the notification
// whereas this thread will be blocked for the pause to finish
// while it's trying to join the STS, which is conditional on
// the GC workers finishing.
g1h
->
reset_free_regions_coming
();
g1h
->
reset_free_regions_coming
();
_sts
.
join
();
g1_policy
->
record_concurrent_mark_cleanup_completed
();
_sts
.
leave
();
double
cleanup_end_sec
=
os
::
elapsedTime
();
double
cleanup_end_sec
=
os
::
elapsedTime
();
if
(
PrintGC
)
{
if
(
PrintGC
)
{
gclog_or_tty
->
date_stamp
(
PrintGCDateStamps
);
gclog_or_tty
->
date_stamp
(
PrintGCDateStamps
);
...
@@ -240,6 +240,36 @@ void ConcurrentMarkThread::run() {
...
@@ -240,6 +240,36 @@ void ConcurrentMarkThread::run() {
guarantee
(
cm
()
->
cleanup_list_is_empty
(),
guarantee
(
cm
()
->
cleanup_list_is_empty
(),
"at this point there should be no regions on the cleanup list"
);
"at this point there should be no regions on the cleanup list"
);
// There is a tricky race before recording that the concurrent
// cleanup has completed and a potential Full GC starting around
// the same time. We want to make sure that the Full GC calls
// abort() on concurrent mark after
// record_concurrent_mark_cleanup_completed(), since abort() is
// the method that will reset the concurrent mark state. If we
// end up calling record_concurrent_mark_cleanup_completed()
// after abort() then we might incorrectly undo some of the work
// abort() did. Checking the has_aborted() flag after joining
// the STS allows the correct ordering of the two methods. There
// are two scenarios:
//
// a) If we reach here before the Full GC, the fact that we have
// joined the STS means that the Full GC cannot start until we
// leave the STS, so record_concurrent_mark_cleanup_completed()
// will complete before abort() is called.
//
// b) If we reach here during the Full GC, we'll be held up from
// joining the STS until the Full GC is done, which means that
// abort() will have completed and has_aborted() will return
// true to prevent us from calling
// record_concurrent_mark_cleanup_completed() (and, in fact, it's
// not needed any more as the concurrent mark state has been
// already reset).
_sts
.
join
();
if
(
!
cm
()
->
has_aborted
())
{
g1_policy
->
record_concurrent_mark_cleanup_completed
();
}
_sts
.
leave
();
if
(
cm
()
->
has_aborted
())
{
if
(
cm
()
->
has_aborted
())
{
if
(
PrintGC
)
{
if
(
PrintGC
)
{
gclog_or_tty
->
date_stamp
(
PrintGCDateStamps
);
gclog_or_tty
->
date_stamp
(
PrintGCDateStamps
);
...
@@ -248,7 +278,7 @@ void ConcurrentMarkThread::run() {
...
@@ -248,7 +278,7 @@ void ConcurrentMarkThread::run() {
}
}
}
}
//
w
e now want to allow clearing of the marking bitmap to be
//
W
e now want to allow clearing of the marking bitmap to be
// suspended by a collection pause.
// suspended by a collection pause.
_sts
.
join
();
_sts
.
join
();
_cm
->
clearNextBitmap
();
_cm
->
clearNextBitmap
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录