Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
9e2766b8
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看板
提交
9e2766b8
编写于
10月 03, 2012
作者:
J
jmasa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7199349: NPG: PS: Crash seen in jprt
Reviewed-by: johnc
上级
b6008891
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
39 addition
and
151 deletion
+39
-151
src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp
...gc_implementation/parallelScavenge/cardTableExtension.cpp
+19
-99
src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.hpp
...gc_implementation/parallelScavenge/cardTableExtension.hpp
+0
-5
src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp
...ementation/parallelScavenge/psPromotionManager.inline.hpp
+7
-0
src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp
...hare/vm/gc_implementation/parallelScavenge/psScavenge.cpp
+7
-3
src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp
src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp
+3
-25
src/share/vm/gc_implementation/parallelScavenge/psTasks.hpp
src/share/vm/gc_implementation/parallelScavenge/psTasks.hpp
+0
-19
src/share/vm/runtime/globals.hpp
src/share/vm/runtime/globals.hpp
+3
-0
未找到文件。
src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp
浏览文件 @
9e2766b8
...
...
@@ -121,103 +121,12 @@ class CheckForPreciseMarks : public OopClosure {
// We get passed the space_top value to prevent us from traversing into
// the old_gen promotion labs, which cannot be safely parsed.
void
CardTableExtension
::
scavenge_contents
(
ObjectStartArray
*
start_array
,
MutableSpace
*
sp
,
HeapWord
*
space_top
,
PSPromotionManager
*
pm
)
{
assert
(
start_array
!=
NULL
&&
sp
!=
NULL
&&
pm
!=
NULL
,
"Sanity"
);
assert
(
start_array
->
covered_region
().
contains
(
sp
->
used_region
()),
"ObjectStartArray does not cover space"
);
if
(
sp
->
not_empty
())
{
oop
*
sp_top
=
(
oop
*
)
space_top
;
oop
*
prev_top
=
NULL
;
jbyte
*
current_card
=
byte_for
(
sp
->
bottom
());
jbyte
*
end_card
=
byte_for
(
sp_top
-
1
);
// sp_top is exclusive
// scan card marking array
while
(
current_card
<=
end_card
)
{
jbyte
value
=
*
current_card
;
// skip clean cards
if
(
card_is_clean
(
value
))
{
current_card
++
;
}
else
{
// we found a non-clean card
jbyte
*
first_nonclean_card
=
current_card
++
;
oop
*
bottom
=
(
oop
*
)
addr_for
(
first_nonclean_card
);
// find object starting on card
oop
*
bottom_obj
=
(
oop
*
)
start_array
->
object_start
((
HeapWord
*
)
bottom
);
// bottom_obj = (oop*)start_array->object_start((HeapWord*)bottom);
assert
(
bottom_obj
<=
bottom
,
"just checking"
);
// make sure we don't scan oops we already looked at
if
(
bottom
<
prev_top
)
bottom
=
prev_top
;
// figure out when to stop scanning
jbyte
*
first_clean_card
;
oop
*
top
;
bool
restart_scanning
;
do
{
restart_scanning
=
false
;
// find a clean card
while
(
current_card
<=
end_card
)
{
value
=
*
current_card
;
if
(
card_is_clean
(
value
))
break
;
current_card
++
;
}
// check if we reached the end, if so we are done
if
(
current_card
>=
end_card
)
{
first_clean_card
=
end_card
+
1
;
current_card
++
;
top
=
sp_top
;
}
else
{
// we have a clean card, find object starting on that card
first_clean_card
=
current_card
++
;
top
=
(
oop
*
)
addr_for
(
first_clean_card
);
oop
*
top_obj
=
(
oop
*
)
start_array
->
object_start
((
HeapWord
*
)
top
);
// top_obj = (oop*)start_array->object_start((HeapWord*)top);
assert
(
top_obj
<=
top
,
"just checking"
);
if
(
oop
(
top_obj
)
->
is_objArray
()
||
oop
(
top_obj
)
->
is_typeArray
())
{
// an arrayOop is starting on the clean card - since we do exact store
// checks for objArrays we are done
}
else
{
// otherwise, it is possible that the object starting on the clean card
// spans the entire card, and that the store happened on a later card.
// figure out where the object ends
top
=
top_obj
+
oop
(
top_obj
)
->
size
();
jbyte
*
top_card
=
CardTableModRefBS
::
byte_for
(
top
-
1
);
// top is exclusive
if
(
top_card
>
first_clean_card
)
{
// object ends a different card
current_card
=
top_card
+
1
;
if
(
card_is_clean
(
*
top_card
))
{
// the ending card is clean, we are done
first_clean_card
=
top_card
;
}
else
{
// the ending card is not clean, continue scanning at start of do-while
restart_scanning
=
true
;
}
}
else
{
// object ends on the clean card, we are done.
assert
(
first_clean_card
==
top_card
,
"just checking"
);
}
}
}
}
while
(
restart_scanning
);
// we know which cards to scan, now clear them
while
(
first_nonclean_card
<
first_clean_card
)
{
*
first_nonclean_card
++
=
clean_card
;
}
// scan oops in objects
do
{
oop
(
bottom_obj
)
->
push_contents
(
pm
);
bottom_obj
+=
oop
(
bottom_obj
)
->
size
();
assert
(
bottom_obj
<=
sp_top
,
"just checking"
);
}
while
(
bottom_obj
<
top
);
pm
->
drain_stacks_cond_depth
();
// remember top oop* scanned
prev_top
=
top
;
}
}
}
}
// Do not call this method if the space is empty.
// It is a waste to start tasks and get here only to
// do no work. If this method needs to be called
// when the space is empty, fix the calculation of
// end_card to allow sp_top == sp->bottom().
void
CardTableExtension
::
scavenge_contents_parallel
(
ObjectStartArray
*
start_array
,
MutableSpace
*
sp
,
...
...
@@ -228,10 +137,11 @@ void CardTableExtension::scavenge_contents_parallel(ObjectStartArray* start_arra
int
ssize
=
128
;
// Naked constant! Work unit = 64k.
int
dirty_card_count
=
0
;
// It is a waste to get here if empty.
assert
(
sp
->
bottom
()
<
sp
->
top
(),
"Should not be called if empty"
);
oop
*
sp_top
=
(
oop
*
)
space_top
;
oop
*
sp_last
=
sp
->
bottom
()
==
space_top
?
sp_top
:
sp_top
-
1
;
jbyte
*
start_card
=
byte_for
(
sp
->
bottom
());
jbyte
*
end_card
=
byte_for
(
sp_
last
)
+
1
;
jbyte
*
end_card
=
byte_for
(
sp_
top
-
1
)
+
1
;
oop
*
last_scanned
=
NULL
;
// Prevent scanning objects more than once
// The width of the stripe ssize*stripe_total must be
// consistent with the number of stripes so that the complete slice
...
...
@@ -255,6 +165,16 @@ void CardTableExtension::scavenge_contents_parallel(ObjectStartArray* start_arra
HeapWord
*
slice_start
=
addr_for
(
worker_start_card
);
HeapWord
*
slice_end
=
MIN2
((
HeapWord
*
)
sp_top
,
addr_for
(
worker_end_card
));
#ifdef ASSERT
if
(
GCWorkerDelayMillis
>
0
)
{
// Delay 1 worker so that it proceeds after all the work
// has been completed.
if
(
stripe_number
<
2
)
{
os
::
sleep
(
Thread
::
current
(),
GCWorkerDelayMillis
,
false
);
}
}
#endif
// If there are not objects starting within the chunk, skip it.
if
(
!
start_array
->
object_starts_in_range
(
slice_start
,
slice_end
))
{
continue
;
...
...
src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.hpp
浏览文件 @
9e2766b8
...
...
@@ -60,11 +60,6 @@ class CardTableExtension : public CardTableModRefBS {
// BarrierSet::Name kind() { return BarrierSet::CardTableExtension; }
// Scavenge support
void
scavenge_contents
(
ObjectStartArray
*
start_array
,
MutableSpace
*
sp
,
HeapWord
*
space_top
,
PSPromotionManager
*
pm
);
void
scavenge_contents_parallel
(
ObjectStartArray
*
start_array
,
MutableSpace
*
sp
,
HeapWord
*
space_top
,
...
...
src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp
浏览文件 @
9e2766b8
...
...
@@ -136,6 +136,13 @@ oop PSPromotionManager::copy_to_survivor_space(oop o) {
HeapWord
*
lab_base
=
old_gen
()
->
cas_allocate
(
OldPLABSize
);
if
(
lab_base
!=
NULL
)
{
#ifdef ASSERT
// Delay the initialization of the promotion lab (plab).
// This exposes uninitialized plabs to card table processing.
if
(
GCWorkerDelayMillis
>
0
)
{
os
::
sleep
(
Thread
::
current
(),
GCWorkerDelayMillis
,
false
);
}
#endif
_old_lab
.
initialize
(
MemRegion
(
lab_base
,
OldPLABSize
));
// Try the old lab allocation again.
new_obj
=
(
oop
)
_old_lab
.
allocate
(
new_obj_size
);
...
...
src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp
浏览文件 @
9e2766b8
...
...
@@ -395,10 +395,14 @@ bool PSScavenge::invoke_no_policy() {
GCTaskQueue
*
q
=
GCTaskQueue
::
create
();
if
(
!
old_gen
->
object_space
()
->
is_empty
())
{
// There are only old-to-young pointers if there are objects
// in the old gen.
uint
stripe_total
=
active_workers
;
for
(
uint
i
=
0
;
i
<
stripe_total
;
i
++
)
{
q
->
enqueue
(
new
OldToYoungRootsTask
(
old_gen
,
old_top
,
i
,
stripe_total
));
}
}
q
->
enqueue
(
new
ScavengeRootsTask
(
ScavengeRootsTask
::
universe
));
q
->
enqueue
(
new
ScavengeRootsTask
(
ScavengeRootsTask
::
jni_handles
));
...
...
src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp
浏览文件 @
9e2766b8
...
...
@@ -164,36 +164,14 @@ void StealTask::do_it(GCTaskManager* manager, uint which) {
guarantee
(
pm
->
stacks_empty
(),
"stacks should be empty at this point"
);
}
//
// SerialOldToYoungRootsTask
//
void
SerialOldToYoungRootsTask
::
do_it
(
GCTaskManager
*
manager
,
uint
which
)
{
assert
(
_gen
!=
NULL
,
"Sanity"
);
assert
(
_gen
->
object_space
()
->
contains
(
_gen_top
)
||
_gen_top
==
_gen
->
object_space
()
->
top
(),
"Sanity"
);
{
PSPromotionManager
*
pm
=
PSPromotionManager
::
gc_thread_promotion_manager
(
which
);
assert
(
Universe
::
heap
()
->
kind
()
==
CollectedHeap
::
ParallelScavengeHeap
,
"Sanity"
);
CardTableExtension
*
card_table
=
(
CardTableExtension
*
)
Universe
::
heap
()
->
barrier_set
();
// FIX ME! Assert that card_table is the type we believe it to be.
card_table
->
scavenge_contents
(
_gen
->
start_array
(),
_gen
->
object_space
(),
_gen_top
,
pm
);
// Do the real work
pm
->
drain_stacks
(
false
);
}
}
//
// OldToYoungRootsTask
//
void
OldToYoungRootsTask
::
do_it
(
GCTaskManager
*
manager
,
uint
which
)
{
// There are not old-to-young pointers if the old gen is empty.
assert
(
!
_gen
->
object_space
()
->
is_empty
(),
"Should not be called is there is no work"
);
assert
(
_gen
!=
NULL
,
"Sanity"
);
assert
(
_gen
->
object_space
()
->
contains
(
_gen_top
)
||
_gen_top
==
_gen
->
object_space
()
->
top
(),
"Sanity"
);
assert
(
_stripe_number
<
ParallelGCThreads
,
"Sanity"
);
...
...
src/share/vm/gc_implementation/parallelScavenge/psTasks.hpp
浏览文件 @
9e2766b8
...
...
@@ -112,25 +112,6 @@ class StealTask : public GCTask {
virtual
void
do_it
(
GCTaskManager
*
manager
,
uint
which
);
};
//
// SerialOldToYoungRootsTask
//
// This task is used to scan for roots in the perm gen
class
SerialOldToYoungRootsTask
:
public
GCTask
{
private:
PSOldGen
*
_gen
;
HeapWord
*
_gen_top
;
public:
SerialOldToYoungRootsTask
(
PSOldGen
*
gen
,
HeapWord
*
gen_top
)
:
_gen
(
gen
),
_gen_top
(
gen_top
)
{
}
char
*
name
()
{
return
(
char
*
)
"serial-old-to-young-roots-task"
;
}
virtual
void
do_it
(
GCTaskManager
*
manager
,
uint
which
);
};
//
// OldToYoungRootsTask
//
...
...
src/share/vm/runtime/globals.hpp
浏览文件 @
9e2766b8
...
...
@@ -3065,6 +3065,9 @@ class CommandLineFlags {
develop(uintx, GCExpandToAllocateDelayMillis, 0, \
"Delay in ms between expansion and allocation") \
\
develop(uintx, GCWorkerDelayMillis, 0, \
"Delay in ms in scheduling GC workers") \
\
product(intx, DeferThrSuspendLoopCount, 4000, \
"(Unstable) Number of times to iterate in safepoint loop " \
" before blocking VM threads ") \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录