Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
89810581
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看板
提交
89810581
编写于
12月 16, 2010
作者:
Y
ysr
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
6525ddb7
49b4b500
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
25 addition
and
17 deletion
+25
-17
src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp
src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp
+3
-1
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
+13
-7
src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
+9
-9
未找到文件。
src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp
浏览文件 @
89810581
...
...
@@ -277,7 +277,9 @@ void ConcurrentMarkThread::run() {
// completed. This will also notify the FullGCCount_lock in case a
// Java thread is waiting for a full GC to happen (e.g., it
// called System.gc() with +ExplicitGCInvokesConcurrent).
g1
->
increment_full_collections_completed
(
true
/* outer */
);
_sts
.
join
();
g1
->
increment_full_collections_completed
(
true
/* concurrent */
);
_sts
.
leave
();
}
assert
(
_should_terminate
,
"just checking"
);
...
...
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
浏览文件 @
89810581
...
...
@@ -1389,7 +1389,7 @@ bool G1CollectedHeap::do_collection(bool explicit_gc,
}
// Update the number of full collections that have been completed.
increment_full_collections_completed
(
false
/*
outer
*/
);
increment_full_collections_completed
(
false
/*
concurrent
*/
);
if
(
PrintHeapAtGC
)
{
Universe
::
print_heap_after_gc
();
...
...
@@ -2176,9 +2176,14 @@ bool G1CollectedHeap::should_do_concurrent_full_gc(GCCause::Cause cause) {
(
cause
==
GCCause
::
_java_lang_system_gc
&&
ExplicitGCInvokesConcurrent
));
}
void
G1CollectedHeap
::
increment_full_collections_completed
(
bool
outer
)
{
void
G1CollectedHeap
::
increment_full_collections_completed
(
bool
concurrent
)
{
MonitorLockerEx
x
(
FullGCCount_lock
,
Mutex
::
_no_safepoint_check_flag
);
// We assume that if concurrent == true, then the caller is a
// concurrent thread that was joined the Suspendible Thread
// Set. If there's ever a cheap way to check this, we should add an
// assert here.
// We have already incremented _total_full_collections at the start
// of the GC, so total_full_collections() represents how many full
// collections have been started.
...
...
@@ -2192,17 +2197,18 @@ void G1CollectedHeap::increment_full_collections_completed(bool outer) {
// behind the number of full collections started.
// This is the case for the inner caller, i.e. a Full GC.
assert
(
outer
||
assert
(
concurrent
||
(
full_collections_started
==
_full_collections_completed
+
1
)
||
(
full_collections_started
==
_full_collections_completed
+
2
),
err_msg
(
"for inner caller: full_collections_started = %u "
err_msg
(
"for inner caller
(Full GC)
: full_collections_started = %u "
"is inconsistent with _full_collections_completed = %u"
,
full_collections_started
,
_full_collections_completed
));
// This is the case for the outer caller, i.e. the concurrent cycle.
assert
(
!
outer
||
assert
(
!
concurrent
||
(
full_collections_started
==
_full_collections_completed
+
1
),
err_msg
(
"for outer caller: full_collections_started = %u "
err_msg
(
"for outer caller (concurrent cycle): "
"full_collections_started = %u "
"is inconsistent with _full_collections_completed = %u"
,
full_collections_started
,
_full_collections_completed
));
...
...
@@ -2212,7 +2218,7 @@ void G1CollectedHeap::increment_full_collections_completed(bool outer) {
// we wake up any waiters (especially when ExplicitInvokesConcurrent
// is set) so that if a waiter requests another System.gc() it doesn't
// incorrectly see that a marking cyle is still in progress.
if
(
outer
)
{
if
(
concurrent
)
{
_cmThread
->
clear_in_progress
();
}
...
...
src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
浏览文件 @
89810581
...
...
@@ -643,16 +643,16 @@ public:
// can happen in a nested fashion, i.e., we start a concurrent
// cycle, a Full GC happens half-way through it which ends first,
// and then the cycle notices that a Full GC happened and ends
// too. The
outer parameter is a boolean to help us do a bit tighter
//
consistency checking in the method. If outer is false, the caller
//
is the inner caller in the nesting (i.e., the Full GC). If outer
//
is true, the caller is the outer caller in this nesting (i.e.,
//
the concurrent cycle). Further nesting is not currently
//
supported. The end of the this call also notifies the
//
FullGCCount_lock in case a Java thread is waiting for a full GC
// to happen (e.g., it called System.gc() with
// too. The
concurrent parameter is a boolean to help us do a bit
//
tighter consistency checking in the method. If concurrent is
//
false, the caller is the inner caller in the nesting (i.e., the
//
Full GC). If concurrent is true, the caller is the outer caller
//
in this nesting (i.e., the concurrent cycle). Further nesting is
//
not currently supported. The end of the this call also notifies
//
the FullGCCount_lock in case a Java thread is waiting for a full
//
GC
to happen (e.g., it called System.gc() with
// +ExplicitGCInvokesConcurrent).
void
increment_full_collections_completed
(
bool
outer
);
void
increment_full_collections_completed
(
bool
concurrent
);
unsigned
int
full_collections_completed
()
{
return
_full_collections_completed
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录