Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
1bb5c3e4
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看板
提交
1bb5c3e4
编写于
5月 04, 2009
作者:
A
apetrusenko
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
8f40eccf
1ee7cb40
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
29 addition
and
14 deletion
+29
-14
src/share/vm/gc_implementation/g1/g1RemSet.cpp
src/share/vm/gc_implementation/g1/g1RemSet.cpp
+27
-12
src/share/vm/gc_implementation/g1/g1_globals.hpp
src/share/vm/gc_implementation/g1/g1_globals.hpp
+1
-1
src/share/vm/gc_implementation/g1/heapRegion.cpp
src/share/vm/gc_implementation/g1/heapRegion.cpp
+1
-1
未找到文件。
src/share/vm/gc_implementation/g1/g1RemSet.cpp
浏览文件 @
1bb5c3e4
...
@@ -180,6 +180,7 @@ class ScanRSClosure : public HeapRegionClosure {
...
@@ -180,6 +180,7 @@ class ScanRSClosure : public HeapRegionClosure {
CardTableModRefBS
*
_ct_bs
;
CardTableModRefBS
*
_ct_bs
;
int
_worker_i
;
int
_worker_i
;
bool
_try_claimed
;
bool
_try_claimed
;
size_t
_min_skip_distance
,
_max_skip_distance
;
public:
public:
ScanRSClosure
(
OopsInHeapRegionClosure
*
oc
,
int
worker_i
)
:
ScanRSClosure
(
OopsInHeapRegionClosure
*
oc
,
int
worker_i
)
:
_oc
(
oc
),
_oc
(
oc
),
...
@@ -191,6 +192,8 @@ public:
...
@@ -191,6 +192,8 @@ public:
_g1h
=
G1CollectedHeap
::
heap
();
_g1h
=
G1CollectedHeap
::
heap
();
_bot_shared
=
_g1h
->
bot_shared
();
_bot_shared
=
_g1h
->
bot_shared
();
_ct_bs
=
(
CardTableModRefBS
*
)
(
_g1h
->
barrier_set
());
_ct_bs
=
(
CardTableModRefBS
*
)
(
_g1h
->
barrier_set
());
_min_skip_distance
=
16
;
_max_skip_distance
=
2
*
_g1h
->
n_par_threads
()
*
_min_skip_distance
;
}
}
void
set_try_claimed
()
{
_try_claimed
=
true
;
}
void
set_try_claimed
()
{
_try_claimed
=
true
;
}
...
@@ -245,9 +248,13 @@ public:
...
@@ -245,9 +248,13 @@ public:
HeapRegionRemSetIterator
*
iter
=
_g1h
->
rem_set_iterator
(
_worker_i
);
HeapRegionRemSetIterator
*
iter
=
_g1h
->
rem_set_iterator
(
_worker_i
);
hrrs
->
init_iterator
(
iter
);
hrrs
->
init_iterator
(
iter
);
size_t
card_index
;
size_t
card_index
;
size_t
skip_distance
=
0
,
current_card
=
0
,
jump_to_card
=
0
;
while
(
iter
->
has_next
(
card_index
))
{
while
(
iter
->
has_next
(
card_index
))
{
if
(
current_card
<
jump_to_card
)
{
++
current_card
;
continue
;
}
HeapWord
*
card_start
=
_g1h
->
bot_shared
()
->
address_for_index
(
card_index
);
HeapWord
*
card_start
=
_g1h
->
bot_shared
()
->
address_for_index
(
card_index
);
#if 0
#if 0
gclog_or_tty->print("Rem set iteration yielded card [" PTR_FORMAT ", " PTR_FORMAT ").\n",
gclog_or_tty->print("Rem set iteration yielded card [" PTR_FORMAT ", " PTR_FORMAT ").\n",
card_start, card_start + CardTableModRefBS::card_size_in_words);
card_start, card_start + CardTableModRefBS::card_size_in_words);
...
@@ -257,20 +264,28 @@ public:
...
@@ -257,20 +264,28 @@ public:
assert
(
card_region
!=
NULL
,
"Yielding cards not in the heap?"
);
assert
(
card_region
!=
NULL
,
"Yielding cards not in the heap?"
);
_cards
++
;
_cards
++
;
if
(
!
card_region
->
in_collection_set
())
{
// If the card is dirty, then we will scan it during updateRS.
// If the card is dirty, then we will scan it during updateRS.
if
(
!
card_region
->
in_collection_set
()
&&
!
_ct_bs
->
is_card_dirty
(
card_index
))
{
if
(
!
_ct_bs
->
is_card_claimed
(
card_index
)
&&
if
(
!
_ct_bs
->
is_card_claimed
(
card_index
)
&&
_ct_bs
->
claim_card
(
card_index
))
{
!
_ct_bs
->
is_card_dirty
(
card_index
))
{
assert
(
_ct_bs
->
is_card_clean
(
card_index
)
||
_ct_bs
->
is_card_claimed
(
card_index
)
||
_ct_bs
->
is_card_deferred
(
card_index
),
"Card is either clean, claimed or deferred"
);
if
(
_ct_bs
->
claim_card
(
card_index
))
scanCard
(
card_index
,
card_region
);
scanCard
(
card_index
,
card_region
);
}
}
else
if
(
_try_claimed
)
{
if
(
jump_to_card
==
0
||
jump_to_card
!=
current_card
)
{
// We did some useful work in the previous iteration.
// Decrease the distance.
skip_distance
=
MAX2
(
skip_distance
>>
1
,
_min_skip_distance
);
}
else
{
// Previous iteration resulted in a claim failure.
// Increase the distance.
skip_distance
=
MIN2
(
skip_distance
<<
1
,
_max_skip_distance
);
}
jump_to_card
=
current_card
+
skip_distance
;
}
}
}
++
current_card
;
}
if
(
!
_try_claimed
)
{
hrrs
->
set_iter_complete
();
}
}
hrrs
->
set_iter_complete
();
return
false
;
return
false
;
}
}
// Set all cards back to clean.
// Set all cards back to clean.
...
...
src/share/vm/gc_implementation/g1/g1_globals.hpp
浏览文件 @
1bb5c3e4
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
develop(intx, G1MarkingVerboseLevel, 0, \
develop(intx, G1MarkingVerboseLevel, 0, \
"Level (0-4) of verboseness of the marking code") \
"Level (0-4) of verboseness of the marking code") \
\
\
develop(bool, G1VerifyConcMarkPrintReachable,
true,
\
develop(bool, G1VerifyConcMarkPrintReachable,
false,
\
"If conc mark verification fails, print reachable objects") \
"If conc mark verification fails, print reachable objects") \
\
\
develop(bool, G1TraceMarkStackOverflow, false, \
develop(bool, G1TraceMarkStackOverflow, false, \
...
...
src/share/vm/gc_implementation/g1/heapRegion.cpp
浏览文件 @
1bb5c3e4
...
@@ -718,7 +718,7 @@ void HeapRegion::verify(bool allow_dirty) const {
...
@@ -718,7 +718,7 @@ void HeapRegion::verify(bool allow_dirty) const {
vl_cl
.
failures
())
{
vl_cl
.
failures
())
{
g1
->
concurrent_mark
()
->
print_prev_bitmap_reachable
();
g1
->
concurrent_mark
()
->
print_prev_bitmap_reachable
();
}
}
guarantee
(
!
vl_cl
.
failures
(),
"
should not have had any failures
"
);
guarantee
(
!
vl_cl
.
failures
(),
"
region verification failed
"
);
guarantee
(
p
==
top
(),
"end of last object must match end of space"
);
guarantee
(
p
==
top
(),
"end of last object must match end of space"
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录