Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
b4ead34e
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看板
提交
b4ead34e
编写于
2月 13, 2014
作者:
S
stefank
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8034761: Remove the do_code_roots parameter from process_strong_roots
Reviewed-by: tschatzl, mgerdin, jmasa
上级
55d26c6d
变更
14
显示空白变更内容
内联
并排
Showing
14 changed file
with
36 addition
and
90 deletion
+36
-90
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
...ion/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
+0
-12
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp
...ion/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp
+0
-7
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
+8
-14
src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
+0
-5
src/share/vm/gc_implementation/g1/g1MarkSweep.cpp
src/share/vm/gc_implementation/g1/g1MarkSweep.cpp
+2
-4
src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
+0
-1
src/share/vm/gc_implementation/shared/markSweep.cpp
src/share/vm/gc_implementation/shared/markSweep.cpp
+0
-1
src/share/vm/gc_implementation/shared/markSweep.hpp
src/share/vm/gc_implementation/shared/markSweep.hpp
+0
-1
src/share/vm/memory/defNewGeneration.cpp
src/share/vm/memory/defNewGeneration.cpp
+0
-1
src/share/vm/memory/genCollectedHeap.cpp
src/share/vm/memory/genCollectedHeap.cpp
+4
-13
src/share/vm/memory/genCollectedHeap.hpp
src/share/vm/memory/genCollectedHeap.hpp
+4
-6
src/share/vm/memory/genMarkSweep.cpp
src/share/vm/memory/genMarkSweep.cpp
+2
-9
src/share/vm/memory/sharedHeap.cpp
src/share/vm/memory/sharedHeap.cpp
+9
-10
src/share/vm/memory/sharedHeap.hpp
src/share/vm/memory/sharedHeap.hpp
+7
-6
未找到文件。
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
浏览文件 @
b4ead34e
...
...
@@ -3040,7 +3040,6 @@ void CMSCollector::verify_after_remark_work_1() {
true
,
// activate StrongRootsScope
SharedHeap
::
ScanningOption
(
roots_scanning_options
()),
&
notOlder
,
true
,
// walk code active on stacks
NULL
,
NULL
);
// SSS: Provide correct closure
...
...
@@ -3107,7 +3106,6 @@ void CMSCollector::verify_after_remark_work_2() {
true
,
// activate StrongRootsScope
SharedHeap
::
ScanningOption
(
roots_scanning_options
()),
&
notOlder
,
true
,
// walk code active on stacks
NULL
,
&
klass_closure
);
...
...
@@ -3686,12 +3684,6 @@ void CMSCollector::checkpointRootsInitialWork(bool asynch) {
ResourceMark
rm
;
HandleMark
hm
;
FalseClosure
falseClosure
;
// In the case of a synchronous collection, we will elide the
// remark step, so it's important to catch all the nmethod oops
// in this step.
// The final 'true' flag to gen_process_strong_roots will ensure this.
// If 'async' is true, we can relax the nmethod tracing.
MarkRefsIntoClosure
notOlder
(
_span
,
&
_markBitMap
);
GenCollectedHeap
*
gch
=
GenCollectedHeap
::
heap
();
...
...
@@ -3744,7 +3736,6 @@ void CMSCollector::checkpointRootsInitialWork(bool asynch) {
true
,
// activate StrongRootsScope
SharedHeap
::
ScanningOption
(
roots_scanning_options
()),
&
notOlder
,
true
,
// walk all of code cache if (so & SO_AllCodeCache)
NULL
,
&
klass_closure
);
}
...
...
@@ -5243,7 +5234,6 @@ void CMSParInitialMarkTask::work(uint worker_id) {
false
,
// this is parallel code
SharedHeap
::
ScanningOption
(
_collector
->
CMSCollector
::
roots_scanning_options
()),
&
par_mri_cl
,
true
,
// walk all of code cache if (so & SO_AllCodeCache)
NULL
,
&
klass_closure
);
assert
(
_collector
->
should_unload_classes
()
...
...
@@ -5379,7 +5369,6 @@ void CMSParRemarkTask::work(uint worker_id) {
false
,
// this is parallel code
SharedHeap
::
ScanningOption
(
_collector
->
CMSCollector
::
roots_scanning_options
()),
&
par_mrias_cl
,
true
,
// walk all of code cache if (so & SO_AllCodeCache)
NULL
,
NULL
);
// The dirty klasses will be handled below
assert
(
_collector
->
should_unload_classes
()
...
...
@@ -5969,7 +5958,6 @@ void CMSCollector::do_remark_non_parallel() {
false
,
// use the local StrongRootsScope
SharedHeap
::
ScanningOption
(
roots_scanning_options
()),
&
mrias_cl
,
true
,
// walk code active on stacks
NULL
,
NULL
);
// The dirty klasses will be handled below
...
...
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp
浏览文件 @
b4ead34e
...
...
@@ -1383,13 +1383,6 @@ class ASConcurrentMarkSweepGeneration : public ConcurrentMarkSweepGeneration {
// Closures of various sorts used by CMS to accomplish its work
//
// This closure is used to check that a certain set of oops is empty.
class
FalseClosure
:
public
OopClosure
{
public:
void
do_oop
(
oop
*
p
)
{
guarantee
(
false
,
"Should be an empty set"
);
}
void
do_oop
(
narrowOop
*
p
)
{
guarantee
(
false
,
"Should be an empty set"
);
}
};
// This closure is used to do concurrent marking from the roots
// following the first checkpoint.
class
MarkFromRootsClosure
:
public
BitMapClosure
{
...
...
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
浏览文件 @
b4ead34e
...
...
@@ -3390,13 +3390,12 @@ void G1CollectedHeap::verify(bool silent, VerifyOption vo) {
if
(
!
silent
)
{
gclog_or_tty
->
print
(
"Roots "
);
}
VerifyRootsClosure
rootsCl
(
vo
);
G1VerifyCodeRootOopClosure
codeRootsCl
(
this
,
&
rootsCl
,
vo
);
G1VerifyCodeRootBlobClosure
blobsCl
(
&
codeRootsCl
);
VerifyKlassClosure
klassCl
(
this
,
&
rootsCl
);
// We apply the relevant closures to all the oops in the
// system dictionary, the string table and the code cache.
const
int
so
=
SO_AllClasses
|
SO_Strings
|
SO_AllCodeCache
;
// system dictionary, class loader data graph and the string table.
// Don't verify the code cache here, since it's verified below.
const
int
so
=
SO_AllClasses
|
SO_Strings
;
// Need cleared claim bits for the strong roots processing
ClassLoaderDataGraph
::
clear_claimed_marks
();
...
...
@@ -3404,10 +3403,14 @@ void G1CollectedHeap::verify(bool silent, VerifyOption vo) {
process_strong_roots
(
true
,
// activate StrongRootsScope
ScanningOption
(
so
),
// roots scanning options
&
rootsCl
,
&
blobsCl
,
&
klassCl
);
// Verify the nmethods in the code cache.
G1VerifyCodeRootOopClosure
codeRootsCl
(
this
,
&
rootsCl
,
vo
);
G1VerifyCodeRootBlobClosure
blobsCl
(
&
codeRootsCl
);
CodeCache
::
blobs_do
(
&
blobsCl
);
bool
failures
=
rootsCl
.
failures
()
||
codeRootsCl
.
failures
();
if
(
vo
!=
VerifyOption_G1UseMarkWord
)
{
...
...
@@ -4865,12 +4868,9 @@ g1_process_strong_roots(bool is_scavenging,
BufferingOopClosure
buf_scan_non_heap_roots
(
scan_non_heap_roots
);
CodeBlobToOopClosure
scan_code_roots
(
&
buf_scan_non_heap_roots
,
true
/* do_marking */
);
process_strong_roots
(
false
,
// no scoping; this is parallel code
so
,
&
buf_scan_non_heap_roots
,
&
scan_code_roots
,
scan_klasses
);
...
...
@@ -4930,12 +4930,6 @@ g1_process_strong_roots(bool is_scavenging,
_process_strong_tasks
->
all_tasks_completed
();
}
void
G1CollectedHeap
::
g1_process_weak_roots
(
OopClosure
*
root_closure
)
{
CodeBlobToOopClosure
roots_in_blobs
(
root_closure
,
/*do_marking=*/
false
);
SharedHeap
::
process_weak_roots
(
root_closure
,
&
roots_in_blobs
);
}
class
G1StringSymbolTableUnlinkTask
:
public
AbstractGangTask
{
private:
BoolObjectClosure
*
_is_alive
;
...
...
src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
浏览文件 @
b4ead34e
...
...
@@ -834,11 +834,6 @@ protected:
G1KlassScanClosure
*
scan_klasses
,
uint
worker_i
);
// Apply "blk" to all the weak roots of the system. These include
// JNI weak roots, the code cache, system dictionary, symbol table,
// string table, and referents of reachable weak refs.
void
g1_process_weak_roots
(
OopClosure
*
root_closure
);
// Notifies all the necessary spaces that the committed space has
// been updated (either expanded or shrunk). It should be called
// after _g1_storage is updated.
...
...
src/share/vm/gc_implementation/g1/g1MarkSweep.cpp
浏览文件 @
b4ead34e
...
...
@@ -134,7 +134,6 @@ void G1MarkSweep::mark_sweep_phase1(bool& marked_for_unloading,
sh
->
process_strong_roots
(
true
,
// activate StrongRootsScope
SharedHeap
::
SO_SystemClasses
,
&
GenMarkSweep
::
follow_root_closure
,
&
GenMarkSweep
::
follow_code_root_closure
,
&
GenMarkSweep
::
follow_klass_closure
);
// Process reference objects found during marking
...
...
@@ -308,9 +307,8 @@ void G1MarkSweep::mark_sweep_phase3() {
ClassLoaderDataGraph
::
clear_claimed_marks
();
sh
->
process_strong_roots
(
true
,
// activate StrongRootsScope
SharedHeap
::
SO_AllClasses
,
SharedHeap
::
SO_AllClasses
|
SharedHeap
::
SO_AllCodeCache
,
&
GenMarkSweep
::
adjust_pointer_closure
,
NULL
,
// do not touch code cache here
&
GenMarkSweep
::
adjust_klass_closure
);
assert
(
GenMarkSweep
::
ref_processor
()
==
g1h
->
ref_processor_stw
(),
"Sanity"
);
...
...
@@ -318,7 +316,7 @@ void G1MarkSweep::mark_sweep_phase3() {
// Now adjust pointers in remaining weak roots. (All of which should
// have been cleared if they pointed to non-surviving objects.)
g1h
->
g1_
process_weak_roots
(
&
GenMarkSweep
::
adjust_pointer_closure
);
sh
->
process_weak_roots
(
&
GenMarkSweep
::
adjust_pointer_closure
);
if
(
G1StringDedup
::
is_enabled
())
{
G1StringDedup
::
oops_do
(
&
GenMarkSweep
::
adjust_pointer_closure
);
...
...
src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
浏览文件 @
b4ead34e
...
...
@@ -623,7 +623,6 @@ void ParNewGenTask::work(uint worker_id) {
false
,
// no scope; this is parallel code
SharedHeap
::
ScanningOption
(
so
),
&
par_scan_state
.
to_space_root_closure
(),
true
,
// walk *all* scavengable nmethods
&
par_scan_state
.
older_gen_closure
(),
&
klass_scan_closure
);
par_scan_state
.
end_strong_roots
();
...
...
src/share/vm/gc_implementation/shared/markSweep.cpp
浏览文件 @
b4ead34e
...
...
@@ -49,7 +49,6 @@ STWGCTimer* MarkSweep::_gc_timer = NULL;
SerialOldTracer
*
MarkSweep
::
_gc_tracer
=
NULL
;
MarkSweep
::
FollowRootClosure
MarkSweep
::
follow_root_closure
;
CodeBlobToOopClosure
MarkSweep
::
follow_code_root_closure
(
&
MarkSweep
::
follow_root_closure
,
/*do_marking=*/
true
);
void
MarkSweep
::
FollowRootClosure
::
do_oop
(
oop
*
p
)
{
follow_root
(
p
);
}
void
MarkSweep
::
FollowRootClosure
::
do_oop
(
narrowOop
*
p
)
{
follow_root
(
p
);
}
...
...
src/share/vm/gc_implementation/shared/markSweep.hpp
浏览文件 @
b4ead34e
...
...
@@ -143,7 +143,6 @@ class MarkSweep : AllStatic {
// Public closures
static
IsAliveClosure
is_alive
;
static
FollowRootClosure
follow_root_closure
;
static
CodeBlobToOopClosure
follow_code_root_closure
;
// => follow_root_closure
static
MarkAndPushClosure
mark_and_push_closure
;
static
FollowKlassClosure
follow_klass_closure
;
static
FollowStackClosure
follow_stack_closure
;
...
...
src/share/vm/memory/defNewGeneration.cpp
浏览文件 @
b4ead34e
...
...
@@ -630,7 +630,6 @@ void DefNewGeneration::collect(bool full,
true
,
// activate StrongRootsScope
SharedHeap
::
ScanningOption
(
so
),
&
fsc_with_no_gc_barrier
,
true
,
// walk *all* scavengable nmethods
&
fsc_with_gc_barrier
,
&
klass_scan_closure
);
...
...
src/share/vm/memory/genCollectedHeap.cpp
浏览文件 @
b4ead34e
...
...
@@ -599,20 +599,12 @@ gen_process_strong_roots(int level,
bool
activate_scope
,
SharedHeap
::
ScanningOption
so
,
OopsInGenClosure
*
not_older_gens
,
bool
do_code_roots
,
OopsInGenClosure
*
older_gens
,
KlassClosure
*
klass_closure
)
{
// General strong roots.
if
(
!
do_code_roots
)
{
SharedHeap
::
process_strong_roots
(
activate_scope
,
so
,
not_older_gens
,
NULL
,
klass_closure
);
}
else
{
bool
do_code_marking
=
(
activate_scope
||
nmethod
::
oops_do_marking_is_active
());
CodeBlobToOopClosure
code_roots
(
not_older_gens
,
/*do_marking=*/
do_code_marking
);
SharedHeap
::
process_strong_roots
(
activate_scope
,
so
,
not_older_gens
,
&
code_roots
,
klass_closure
);
}
not_older_gens
,
klass_closure
);
if
(
younger_gens_as_roots
)
{
if
(
!
_gen_process_strong_tasks
->
is_task_claimed
(
GCH_PS_younger_gens
))
{
...
...
@@ -634,9 +626,8 @@ gen_process_strong_roots(int level,
_gen_process_strong_tasks
->
all_tasks_completed
();
}
void
GenCollectedHeap
::
gen_process_weak_roots
(
OopClosure
*
root_closure
,
CodeBlobClosure
*
code_roots
)
{
SharedHeap
::
process_weak_roots
(
root_closure
,
code_roots
);
void
GenCollectedHeap
::
gen_process_weak_roots
(
OopClosure
*
root_closure
)
{
SharedHeap
::
process_weak_roots
(
root_closure
);
// "Local" "weak" refs
for
(
int
i
=
0
;
i
<
_n_gens
;
i
++
)
{
_gens
[
i
]
->
ref_processor
()
->
weak_oops_do
(
root_closure
);
...
...
src/share/vm/memory/genCollectedHeap.hpp
浏览文件 @
b4ead34e
...
...
@@ -422,15 +422,13 @@ public:
bool
activate_scope
,
SharedHeap
::
ScanningOption
so
,
OopsInGenClosure
*
not_older_gens
,
bool
do_code_roots
,
OopsInGenClosure
*
older_gens
,
KlassClosure
*
klass_closure
);
// Apply "blk" to all the weak roots of the system. These include
// JNI weak roots, the code cache, system dictionary, symbol table,
// string table, and referents of reachable weak refs.
void
gen_process_weak_roots
(
OopClosure
*
root_closure
,
CodeBlobClosure
*
code_roots
);
// Apply "root_closure" to all the weak roots of the system.
// These include JNI weak roots, string table,
// and referents of reachable weak refs.
void
gen_process_weak_roots
(
OopClosure
*
root_closure
);
// Set the saved marks of generations, if that makes sense.
// In particular, if any generation might iterate over the oops
...
...
src/share/vm/memory/genMarkSweep.cpp
浏览文件 @
b4ead34e
...
...
@@ -212,7 +212,6 @@ void GenMarkSweep::mark_sweep_phase1(int level,
true
,
// activate StrongRootsScope
SharedHeap
::
SO_SystemClasses
,
&
follow_root_closure
,
true
,
// walk code active on stacks
&
follow_root_closure
,
&
follow_klass_closure
);
...
...
@@ -295,18 +294,12 @@ void GenMarkSweep::mark_sweep_phase3(int level) {
gch
->
gen_process_strong_roots
(
level
,
false
,
// Younger gens are not roots.
true
,
// activate StrongRootsScope
SharedHeap
::
SO_AllClasses
,
SharedHeap
::
SO_AllClasses
|
SharedHeap
::
SO_AllCodeCache
,
&
adjust_pointer_closure
,
false
,
// do not walk code
&
adjust_pointer_closure
,
&
adjust_klass_closure
);
// Now adjust pointers in remaining weak roots. (All of which should
// have been cleared if they pointed to non-surviving objects.)
CodeBlobToOopClosure
adjust_code_pointer_closure
(
&
adjust_pointer_closure
,
/*do_marking=*/
false
);
gch
->
gen_process_weak_roots
(
&
adjust_pointer_closure
,
&
adjust_code_pointer_closure
);
gch
->
gen_process_weak_roots
(
&
adjust_pointer_closure
);
adjust_marks
();
GenAdjustPointersClosure
blk
;
...
...
src/share/vm/memory/sharedHeap.cpp
浏览文件 @
b4ead34e
...
...
@@ -141,7 +141,6 @@ SharedHeap::StrongRootsScope::~StrongRootsScope() {
void
SharedHeap
::
process_strong_roots
(
bool
activate_scope
,
ScanningOption
so
,
OopClosure
*
roots
,
CodeBlobClosure
*
code_roots
,
KlassClosure
*
klass_closure
)
{
StrongRootsScope
srs
(
this
,
activate_scope
);
...
...
@@ -158,15 +157,17 @@ void SharedHeap::process_strong_roots(bool activate_scope,
if
(
!
_process_strong_tasks
->
is_task_claimed
(
SH_PS_JNIHandles_oops_do
))
JNIHandles
::
oops_do
(
roots
);
CodeBlobToOopClosure
code_roots
(
roots
,
true
);
CLDToOopClosure
roots_from_clds
(
roots
);
// If we limit class scanning to SO_SystemClasses we need to apply a CLD closure to
// CLDs which are strongly reachable from the thread stacks.
CLDToOopClosure
*
roots_from_clds_p
=
((
so
&
SO_SystemClasses
)
?
&
roots_from_clds
:
NULL
);
// All threads execute this; the individual threads are task groups.
if
(
CollectedHeap
::
use_parallel_gc_threads
())
{
Threads
::
possibly_parallel_oops_do
(
roots
,
roots_from_clds_p
,
code_roots
);
Threads
::
possibly_parallel_oops_do
(
roots
,
roots_from_clds_p
,
&
code_roots
);
}
else
{
Threads
::
oops_do
(
roots
,
roots_from_clds_p
,
code_roots
);
Threads
::
oops_do
(
roots
,
roots_from_clds_p
,
&
code_roots
);
}
if
(
!
_process_strong_tasks
->
is_task_claimed
(
SH_PS_ObjectSynchronizer_oops_do
))
...
...
@@ -208,17 +209,17 @@ void SharedHeap::process_strong_roots(bool activate_scope,
if
(
!
_process_strong_tasks
->
is_task_claimed
(
SH_PS_CodeCache_oops_do
))
{
if
(
so
&
SO_ScavengeCodeCache
)
{
assert
(
code_roots
!=
NULL
,
"must supply closure for code cache"
);
assert
(
&
code_roots
!=
NULL
,
"must supply closure for code cache"
);
// We only visit parts of the CodeCache when scavenging.
CodeCache
::
scavenge_root_nmethods_do
(
code_roots
);
CodeCache
::
scavenge_root_nmethods_do
(
&
code_roots
);
}
if
(
so
&
SO_AllCodeCache
)
{
assert
(
code_roots
!=
NULL
,
"must supply closure for code cache"
);
assert
(
&
code_roots
!=
NULL
,
"must supply closure for code cache"
);
// CMSCollector uses this to do intermediate-strength collections.
// We scan the entire code cache, since CodeCache::do_unloading is not called.
CodeCache
::
blobs_do
(
code_roots
);
CodeCache
::
blobs_do
(
&
code_roots
);
}
// Verify that the code cache contents are not subject to
// movement by a scavenging collection.
...
...
@@ -235,12 +236,10 @@ public:
};
static
AlwaysTrueClosure
always_true
;
void
SharedHeap
::
process_weak_roots
(
OopClosure
*
root_closure
,
CodeBlobClosure
*
code_roots
)
{
void
SharedHeap
::
process_weak_roots
(
OopClosure
*
root_closure
)
{
// Global (weak) JNI handles
JNIHandles
::
weak_oops_do
(
&
always_true
,
root_closure
);
CodeCache
::
blobs_do
(
code_roots
);
StringTable
::
oops_do
(
root_closure
);
}
...
...
src/share/vm/memory/sharedHeap.hpp
浏览文件 @
b4ead34e
...
...
@@ -238,14 +238,11 @@ public:
void
process_strong_roots
(
bool
activate_scope
,
ScanningOption
so
,
OopClosure
*
roots
,
CodeBlobClosure
*
code_roots
,
KlassClosure
*
klass_closure
);
// Apply "blk" to all the weak roots of the system. These include
// JNI weak roots, the code cache, system dictionary, symbol table,
// string table.
void
process_weak_roots
(
OopClosure
*
root_closure
,
CodeBlobClosure
*
code_roots
);
// Apply "root_closure" to all the weak roots of the system.
// These include JNI weak roots and string table.
void
process_weak_roots
(
OopClosure
*
root_closure
);
// The functions below are helper functions that a subclass of
// "SharedHeap" can use in the implementation of its virtual
...
...
@@ -275,4 +272,8 @@ public:
size_t
capacity
);
};
inline
SharedHeap
::
ScanningOption
operator
|
(
SharedHeap
::
ScanningOption
so0
,
SharedHeap
::
ScanningOption
so1
)
{
return
static_cast
<
SharedHeap
::
ScanningOption
>
(
static_cast
<
int
>
(
so0
)
|
static_cast
<
int
>
(
so1
));
}
#endif // SHARE_VM_MEMORY_SHAREDHEAP_HPP
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录