Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
052b811d
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看板
提交
052b811d
编写于
1月 10, 2014
作者:
P
pliden
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8029162: G1: Shared SATB queue never enabled
Reviewed-by: brutisso, mgerdin, tschatzl
上级
dc6f450b
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
40 addition
and
45 deletion
+40
-45
src/share/vm/gc_implementation/g1/satbQueue.cpp
src/share/vm/gc_implementation/g1/satbQueue.cpp
+36
-42
src/share/vm/gc_implementation/g1/satbQueue.hpp
src/share/vm/gc_implementation/g1/satbQueue.hpp
+4
-3
未找到文件。
src/share/vm/gc_implementation/g1/satbQueue.cpp
浏览文件 @
052b811d
...
...
@@ -219,58 +219,52 @@ void SATBMarkQueueSet::handle_zero_index_for_thread(JavaThread* t) {
}
#ifdef ASSERT
void
SATBMarkQueueSet
::
dump_active_values
(
JavaThread
*
first
,
bool
expected_active
)
{
gclog_or_tty
->
print_cr
(
"SATB queue active values for Java Threads"
);
gclog_or_tty
->
print_cr
(
" SATB queue set: active is %s"
,
(
is_active
())
?
"TRUE"
:
"FALSE"
);
gclog_or_tty
->
print_cr
(
" expected_active is %s"
,
(
expected_active
)
?
"TRUE"
:
"FALSE"
);
for
(
JavaThread
*
t
=
first
;
t
;
t
=
t
->
next
())
{
bool
active
=
t
->
satb_mark_queue
().
is_active
();
gclog_or_tty
->
print_cr
(
" thread %s, active is %s"
,
t
->
name
(),
(
active
)
?
"TRUE"
:
"FALSE"
);
void
SATBMarkQueueSet
::
dump_active_states
(
bool
expected_active
)
{
gclog_or_tty
->
print_cr
(
"Expected SATB active state: %s"
,
expected_active
?
"ACTIVE"
:
"INACTIVE"
);
gclog_or_tty
->
print_cr
(
"Actual SATB active states:"
);
gclog_or_tty
->
print_cr
(
" Queue set: %s"
,
is_active
()
?
"ACTIVE"
:
"INACTIVE"
);
for
(
JavaThread
*
t
=
Threads
::
first
();
t
;
t
=
t
->
next
())
{
gclog_or_tty
->
print_cr
(
" Thread
\"
%s
\"
queue: %s"
,
t
->
name
(),
t
->
satb_mark_queue
().
is_active
()
?
"ACTIVE"
:
"INACTIVE"
);
}
gclog_or_tty
->
print_cr
(
" Shared queue: %s"
,
shared_satb_queue
()
->
is_active
()
?
"ACTIVE"
:
"INACTIVE"
);
}
#endif // ASSERT
void
SATBMarkQueueSet
::
set_active_all_threads
(
bool
b
,
bool
expected_active
)
{
assert
(
SafepointSynchronize
::
is_at_safepoint
(),
"Must be at safepoint."
);
JavaThread
*
first
=
Threads
::
first
();
void
SATBMarkQueueSet
::
verify_active_states
(
bool
expected_active
)
{
// Verify queue set state
if
(
is_active
()
!=
expected_active
)
{
dump_active_states
(
expected_active
);
guarantee
(
false
,
"SATB queue set has an unexpected active state"
);
}
#ifdef ASSERT
if
(
_all_active
!=
expected_active
)
{
dump_active_values
(
first
,
expected_active
);
// I leave this here as a guarantee, instead of an assert, so
// that it will still be compiled in if we choose to uncomment
// the #ifdef ASSERT in a product build. The whole block is
// within an #ifdef ASSERT so the guarantee will not be compiled
// in a product build anyway.
guarantee
(
false
,
"SATB queue set has an unexpected active value"
);
// Verify thread queue states
for
(
JavaThread
*
t
=
Threads
::
first
();
t
;
t
=
t
->
next
())
{
if
(
t
->
satb_mark_queue
().
is_active
()
!=
expected_active
)
{
dump_active_states
(
expected_active
);
guarantee
(
false
,
"Thread SATB queue has an unexpected active state"
);
}
}
// Verify shared queue state
if
(
shared_satb_queue
()
->
is_active
()
!=
expected_active
)
{
dump_active_states
(
expected_active
);
guarantee
(
false
,
"Shared SATB queue has an unexpected active state"
);
}
}
#endif // ASSERT
_all_active
=
b
;
for
(
JavaThread
*
t
=
first
;
t
;
t
=
t
->
next
())
{
void
SATBMarkQueueSet
::
set_active_all_threads
(
bool
active
,
bool
expected_active
)
{
assert
(
SafepointSynchronize
::
is_at_safepoint
(),
"Must be at safepoint."
);
#ifdef ASSERT
bool
active
=
t
->
satb_mark_queue
().
is_active
();
if
(
active
!=
expected_active
)
{
dump_active_values
(
first
,
expected_active
);
// I leave this here as a guarantee, instead of an assert, so
// that it will still be compiled in if we choose to uncomment
// the #ifdef ASSERT in a product build. The whole block is
// within an #ifdef ASSERT so the guarantee will not be compiled
// in a product build anyway.
guarantee
(
false
,
"thread has an unexpected active value in its SATB queue"
);
}
verify_active_states
(
expected_active
);
#endif // ASSERT
t
->
satb_mark_queue
().
set_active
(
b
);
_all_active
=
active
;
for
(
JavaThread
*
t
=
Threads
::
first
();
t
;
t
=
t
->
next
())
{
t
->
satb_mark_queue
().
set_active
(
active
);
}
shared_satb_queue
()
->
set_active
(
active
);
}
void
SATBMarkQueueSet
::
filter_thread_buffers
()
{
...
...
src/share/vm/gc_implementation/g1/satbQueue.hpp
浏览文件 @
052b811d
...
...
@@ -87,7 +87,8 @@ class SATBMarkQueueSet: public PtrQueueSet {
bool
apply_closure_to_completed_buffer_work
(
bool
par
,
int
worker
);
#ifdef ASSERT
void
dump_active_values
(
JavaThread
*
first
,
bool
expected_active
);
void
dump_active_states
(
bool
expected_active
);
void
verify_active_states
(
bool
expected_active
);
#endif // ASSERT
public:
...
...
@@ -99,11 +100,11 @@ public:
static
void
handle_zero_index_for_thread
(
JavaThread
*
t
);
// Apply "set_active(
b)" to all Java threads' SATB queues
. It should be
// Apply "set_active(
active)" to all SATB queues in the set
. It should be
// called only with the world stopped. The method will assert that the
// SATB queues of all threads it visits, as well as the SATB queue
// set itself, has an active value same as expected_active.
void
set_active_all_threads
(
bool
b
,
bool
expected_active
);
void
set_active_all_threads
(
bool
active
,
bool
expected_active
);
// Filter all the currently-active SATB buffers.
void
filter_thread_buffers
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录