Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
79988060
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看板
提交
79988060
编写于
12月 28, 2010
作者:
C
coleenp
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
99a34329
9687c581
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
97 addition
and
52 deletion
+97
-52
.hgtags
.hgtags
+2
-0
make/hotspot_version
make/hotspot_version
+1
-1
src/share/vm/gc_implementation/g1/concurrentMark.cpp
src/share/vm/gc_implementation/g1/concurrentMark.cpp
+13
-26
src/share/vm/gc_implementation/g1/concurrentMark.hpp
src/share/vm/gc_implementation/g1/concurrentMark.hpp
+19
-0
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
+11
-6
src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
+7
-1
src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
+4
-3
src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp
...hare/vm/gc_implementation/parallelScavenge/psScavenge.cpp
+2
-0
src/share/vm/gc_implementation/shared/vmGCOperations.hpp
src/share/vm/gc_implementation/shared/vmGCOperations.hpp
+11
-0
src/share/vm/memory/defNewGeneration.cpp
src/share/vm/memory/defNewGeneration.cpp
+11
-6
src/share/vm/memory/defNewGeneration.hpp
src/share/vm/memory/defNewGeneration.hpp
+1
-0
src/share/vm/oops/markOop.inline.hpp
src/share/vm/oops/markOop.inline.hpp
+15
-9
未找到文件。
.hgtags
浏览文件 @
79988060
...
...
@@ -136,3 +136,5 @@ f5603a6e50422046ebc0d2f1671d55cb8f1bf1e9 jdk7-b120
3f3653ab7af8dc1ddb9fa75dad56bf94f89e81a8 jdk7-b121
3a548dc9cb456110ca8fc1514441a8c3bda0014d jdk7-b122
5484e7c53fa7da5e869902437ee08a9ae10c1c69 hs20-b03
9669f9b284108a9ee0a0ccbe215c37a130c9dcf5 jdk7-b123
9669f9b284108a9ee0a0ccbe215c37a130c9dcf5 hs20-b04
make/hotspot_version
浏览文件 @
79988060
...
...
@@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2010
HS_MAJOR_VER=20
HS_MINOR_VER=0
HS_BUILD_NUMBER=0
4
HS_BUILD_NUMBER=0
5
JDK_MAJOR_VER=1
JDK_MINOR_VER=7
...
...
src/share/vm/gc_implementation/g1/concurrentMark.cpp
浏览文件 @
79988060
...
...
@@ -1825,23 +1825,11 @@ void ConcurrentMark::completeCleanup() {
}
}
class
G1CMIsAliveClosure
:
public
BoolObjectClosure
{
G1CollectedHeap
*
_g1
;
public:
G1CMIsAliveClosure
(
G1CollectedHeap
*
g1
)
:
_g1
(
g1
)
{}
void
do_object
(
oop
obj
)
{
assert
(
false
,
"not to be invoked"
);
}
bool
do_object_b
(
oop
obj
)
{
HeapWord
*
addr
=
(
HeapWord
*
)
obj
;
return
addr
!=
NULL
&&
(
!
_g1
->
is_in_g1_reserved
(
addr
)
||
!
_g1
->
is_obj_ill
(
obj
));
}
};
bool
G1CMIsAliveClosure
::
do_object_b
(
oop
obj
)
{
HeapWord
*
addr
=
(
HeapWord
*
)
obj
;
return
addr
!=
NULL
&&
(
!
_g1
->
is_in_g1_reserved
(
addr
)
||
!
_g1
->
is_obj_ill
(
obj
));
}
class
G1CMKeepAliveClosure
:
public
OopClosure
{
G1CollectedHeap
*
_g1
;
...
...
@@ -1896,16 +1884,15 @@ void ConcurrentMark::weakRefsWork(bool clear_all_soft_refs) {
rp
->
setup_policy
(
clear_all_soft_refs
);
assert
(
_markStack
.
isEmpty
(),
"mark stack should be empty"
);
G1CMIsAliveClosure
g1
IsAliveClosure
(
g1h
);
G1CMKeepAliveClosure
g1
KeepAliveClosur
e
(
g1h
,
this
,
nextMarkBitMap
());
G1CMIsAliveClosure
g1
_is_alive
(
g1h
);
G1CMKeepAliveClosure
g1
_keep_aliv
e
(
g1h
,
this
,
nextMarkBitMap
());
G1CMDrainMarkingStackClosure
g1DrainMarkingStackClosure
(
nextMarkBitMap
(),
&
_markStack
,
&
g1KeepAliveClosure
);
g1_drain_mark_stack
(
nextMarkBitMap
(),
&
_markStack
,
&
g1_keep_alive
);
// XXXYYY Also: copy the parallel ref processing code from CMS.
rp
->
process_discovered_references
(
&
g1
IsAliveClosur
e
,
&
g1
KeepAliveClosur
e
,
&
g1
DrainMarkingStackClosure
,
rp
->
process_discovered_references
(
&
g1
_is_aliv
e
,
&
g1
_keep_aliv
e
,
&
g1
_drain_mark_stack
,
NULL
);
assert
(
_markStack
.
overflow
()
||
_markStack
.
isEmpty
(),
"mark stack should be empty (unless it overflowed)"
);
...
...
@@ -1918,8 +1905,8 @@ void ConcurrentMark::weakRefsWork(bool clear_all_soft_refs) {
assert
(
!
rp
->
discovery_enabled
(),
"should have been disabled"
);
// Now clean up stale oops in SymbolTable and StringTable
SymbolTable
::
unlink
(
&
g1
IsAliveClosur
e
);
StringTable
::
unlink
(
&
g1
IsAliveClosur
e
);
SymbolTable
::
unlink
(
&
g1
_is_aliv
e
);
StringTable
::
unlink
(
&
g1
_is_aliv
e
);
}
void
ConcurrentMark
::
swapMarkBitMaps
()
{
...
...
src/share/vm/gc_implementation/g1/concurrentMark.hpp
浏览文件 @
79988060
...
...
@@ -33,6 +33,25 @@ class CMTask;
typedef
GenericTaskQueue
<
oop
>
CMTaskQueue
;
typedef
GenericTaskQueueSet
<
CMTaskQueue
>
CMTaskQueueSet
;
// Closure used by CM during concurrent reference discovery
// and reference processing (during remarking) to determine
// if a particular object is alive. It is primarily used
// to determine if referents of discovered reference objects
// are alive. An instance is also embedded into the
// reference processor as the _is_alive_non_header field
class
G1CMIsAliveClosure
:
public
BoolObjectClosure
{
G1CollectedHeap
*
_g1
;
public:
G1CMIsAliveClosure
(
G1CollectedHeap
*
g1
)
:
_g1
(
g1
)
{}
void
do_object
(
oop
obj
)
{
ShouldNotCallThis
();
}
bool
do_object_b
(
oop
obj
);
};
// A generic CM bit map. This is essentially a wrapper around the BitMap
// class, with one bit per (1<<_shifter) HeapWords.
...
...
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
浏览文件 @
79988060
...
...
@@ -1192,6 +1192,7 @@ bool G1CollectedHeap::do_collection(bool explicit_gc,
return
false
;
}
DTraceGCProbeMarker
gc_probe_marker
(
true
/* full */
);
ResourceMark
rm
;
if
(
PrintHeapAtGC
)
{
...
...
@@ -1768,6 +1769,7 @@ G1CollectedHeap::G1CollectedHeap(G1CollectorPolicy* policy_) :
_g1_policy
(
policy_
),
_dirty_card_queue_set
(
false
),
_into_cset_dirty_card_queue_set
(
false
),
_is_alive_closure
(
this
),
_ref_processor
(
NULL
),
_process_strong_tasks
(
new
SubTasksDone
(
G1H_PS_NumElements
)),
_bot_shared
(
NULL
),
...
...
@@ -2061,7 +2063,8 @@ void G1CollectedHeap::ref_processing_init() {
mr
,
// span
false
,
// Reference discovery is not atomic
true
,
// mt_discovery
NULL
,
// is alive closure: need to fill this in for efficiency
&
_is_alive_closure
,
// is alive closure
// for efficiency
ParallelGCThreads
,
ParallelRefProcEnabled
,
true
);
// Setting next fields of discovered
...
...
@@ -3211,13 +3214,14 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
return
false
;
}
DTraceGCProbeMarker
gc_probe_marker
(
false
/* full */
);
ResourceMark
rm
;
if
(
PrintHeapAtGC
)
{
Universe
::
print_heap_before_gc
();
}
{
ResourceMark
rm
;
// This call will decide whether this pause is an initial-mark
// pause. If it is, during_initial_mark_pause() will return true
// for the duration of this pause.
...
...
@@ -3956,8 +3960,6 @@ void G1CollectedHeap::remove_self_forwarding_pointers() {
// Now restore saved marks, if any.
if
(
_objs_with_preserved_marks
!=
NULL
)
{
assert
(
_preserved_marks_of_objs
!=
NULL
,
"Both or none."
);
assert
(
_objs_with_preserved_marks
->
length
()
==
_preserved_marks_of_objs
->
length
(),
"Both or none."
);
guarantee
(
_objs_with_preserved_marks
->
length
()
==
_preserved_marks_of_objs
->
length
(),
"Both or none."
);
for
(
int
i
=
0
;
i
<
_objs_with_preserved_marks
->
length
();
i
++
)
{
...
...
@@ -4052,7 +4054,10 @@ void G1CollectedHeap::handle_evacuation_failure_common(oop old, markOop m) {
}
void
G1CollectedHeap
::
preserve_mark_if_necessary
(
oop
obj
,
markOop
m
)
{
if
(
m
!=
markOopDesc
::
prototype
())
{
assert
(
evacuation_failed
(),
"Oversaving!"
);
// We want to call the "for_promotion_failure" version only in the
// case of a promotion failure.
if
(
m
->
must_be_preserved_for_promotion_failure
(
obj
))
{
if
(
_objs_with_preserved_marks
==
NULL
)
{
assert
(
_preserved_marks_of_objs
==
NULL
,
"Both or none."
);
_objs_with_preserved_marks
=
...
...
src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
浏览文件 @
79988060
...
...
@@ -849,6 +849,12 @@ protected:
void
print_gc_alloc_regions
();
#endif // !PRODUCT
// Instance of the concurrent mark is_alive closure for embedding
// into the reference processor as the is_alive_non_header. This
// prevents unnecessary additions to the discovered lists during
// concurrent discovery.
G1CMIsAliveClosure
_is_alive_closure
;
// ("Weak") Reference processing support
ReferenceProcessor
*
_ref_processor
;
...
...
@@ -893,7 +899,7 @@ public:
// specified by the policy object.
jint
initialize
();
void
ref_processing_init
();
v
irtual
v
oid
ref_processing_init
();
void
set_par_threads
(
int
t
)
{
SharedHeap
::
set_par_threads
(
t
);
...
...
src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
浏览文件 @
79988060
...
...
@@ -1058,10 +1058,11 @@ bool ParNewGeneration::is_legal_forward_ptr(oop p) {
#endif
void
ParNewGeneration
::
preserve_mark_if_necessary
(
oop
obj
,
markOop
m
)
{
if
((
m
!=
markOopDesc
::
prototype
())
&&
(
!
UseBiasedLocking
||
(
m
!=
markOopDesc
::
biased_locking_prototype
())))
{
if
(
m
->
must_be_preserved_for_promotion_failure
(
obj
))
{
// We should really have separate per-worker stacks, rather
// than use locking of a common pair of stacks.
MutexLocker
ml
(
ParGCRareEvent_lock
);
DefNewGeneration
::
preserve_mark_if_necessary
(
obj
,
m
);
preserve_mark
(
obj
,
m
);
}
}
...
...
src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp
浏览文件 @
79988060
...
...
@@ -694,6 +694,8 @@ void PSScavenge::clean_up_failed_promotion() {
void
PSScavenge
::
oop_promotion_failed
(
oop
obj
,
markOop
obj_mark
)
{
_promotion_failed
=
true
;
if
(
obj_mark
->
must_be_preserved_for_promotion_failure
(
obj
))
{
// Should use per-worker private stakcs hetre rather than
// locking a common pair of stacks.
ThreadCritical
tc
;
_preserved_oop_stack
.
push
(
obj
);
_preserved_mark_stack
.
push
(
obj_mark
);
...
...
src/share/vm/gc_implementation/shared/vmGCOperations.hpp
浏览文件 @
79988060
...
...
@@ -209,4 +209,15 @@ class VM_GenCollectForPermanentAllocation: public VM_GC_Operation {
HeapWord
*
result
()
const
{
return
_res
;
}
};
class
DTraceGCProbeMarker
:
public
StackObj
{
public:
DTraceGCProbeMarker
(
bool
full
)
{
VM_GC_Operation
::
notify_gc_begin
(
full
);
}
~
DTraceGCProbeMarker
()
{
VM_GC_Operation
::
notify_gc_end
();
}
};
#endif // SHARE_VM_GC_IMPLEMENTATION_SHARED_VMGCOPERATIONS_HPP
src/share/vm/memory/defNewGeneration.cpp
浏览文件 @
79988060
...
...
@@ -684,23 +684,28 @@ void DefNewGeneration::remove_forwarding_pointers() {
_preserved_marks_of_objs
.
clear
(
true
);
}
void
DefNewGeneration
::
preserve_mark
(
oop
obj
,
markOop
m
)
{
assert
(
promotion_failed
()
&&
m
->
must_be_preserved_for_promotion_failure
(
obj
),
"Oversaving!"
);
_objs_with_preserved_marks
.
push
(
obj
);
_preserved_marks_of_objs
.
push
(
m
);
}
void
DefNewGeneration
::
preserve_mark_if_necessary
(
oop
obj
,
markOop
m
)
{
if
(
m
->
must_be_preserved_for_promotion_failure
(
obj
))
{
_objs_with_preserved_marks
.
push
(
obj
);
_preserved_marks_of_objs
.
push
(
m
);
preserve_mark
(
obj
,
m
);
}
}
void
DefNewGeneration
::
handle_promotion_failure
(
oop
old
)
{
preserve_mark_if_necessary
(
old
,
old
->
mark
());
if
(
!
_promotion_failed
&&
PrintPromotionFailure
)
{
if
(
PrintPromotionFailure
&&
!
_promotion_failed
)
{
gclog_or_tty
->
print
(
" (promotion failure size = "
SIZE_FORMAT
") "
,
old
->
size
());
}
_promotion_failed
=
true
;
preserve_mark_if_necessary
(
old
,
old
->
mark
());
// forward to self
old
->
forward_to
(
old
);
_promotion_failed
=
true
;
_promo_failure_scan_stack
.
push
(
old
);
...
...
src/share/vm/memory/defNewGeneration.hpp
浏览文件 @
79988060
...
...
@@ -85,6 +85,7 @@ protected:
// Preserve the mark of "obj", if necessary, in preparation for its mark
// word being overwritten with a self-forwarding-pointer.
void
preserve_mark_if_necessary
(
oop
obj
,
markOop
m
);
void
preserve_mark
(
oop
obj
,
markOop
m
);
// work routine used by the above
// Together, these keep <object with a preserved mark, mark value> pairs.
// They should always contain the same number of elements.
...
...
src/share/vm/oops/markOop.inline.hpp
浏览文件 @
79988060
...
...
@@ -30,7 +30,7 @@
#include "oops/markOop.hpp"
#include "runtime/globals.hpp"
// Should this header be preserved during GC?
// Should this header be preserved during GC
(when biased locking is enabled)
?
inline
bool
markOopDesc
::
must_be_preserved_with_bias
(
oop
obj_containing_mark
)
const
{
assert
(
UseBiasedLocking
,
"unexpected"
);
if
(
has_bias_pattern
())
{
...
...
@@ -47,14 +47,15 @@ inline bool markOopDesc::must_be_preserved_with_bias(oop obj_containing_mark) co
return
(
!
is_unlocked
()
||
!
has_no_hash
());
}
// Should this header be preserved during GC?
inline
bool
markOopDesc
::
must_be_preserved
(
oop
obj_containing_mark
)
const
{
if
(
!
UseBiasedLocking
)
return
(
!
is_unlocked
()
||
!
has_no_hash
());
return
must_be_preserved_with_bias
(
obj_containing_mark
);
}
// Should this header
(including its age bits) be preserved in th
e
//
case of a promotion failure during scavenge
?
// Should this header
be preserved in the case of a promotion failur
e
//
during scavenge (when biased locking is enabled)
?
inline
bool
markOopDesc
::
must_be_preserved_with_bias_for_promotion_failure
(
oop
obj_containing_mark
)
const
{
assert
(
UseBiasedLocking
,
"unexpected"
);
// We don't explicitly save off the mark words of biased and
...
...
@@ -70,18 +71,20 @@ inline bool markOopDesc::must_be_preserved_with_bias_for_promotion_failure(oop o
prototype_for_object
(
obj_containing_mark
)
->
has_bias_pattern
())
{
return
true
;
}
return
(
this
!=
prototype
());
return
(
!
is_unlocked
()
||
!
has_no_hash
());
}
// Should this header be preserved in the case of a promotion failure
// during scavenge?
inline
bool
markOopDesc
::
must_be_preserved_for_promotion_failure
(
oop
obj_containing_mark
)
const
{
if
(
!
UseBiasedLocking
)
return
(
this
!=
prototype
());
return
(
!
is_unlocked
()
||
!
has_no_hash
());
return
must_be_preserved_with_bias_for_promotion_failure
(
obj_containing_mark
);
}
// S
hould this header (including its age bits) be preserved in the
//
case of a scavenge in which CMS is the old generation?
// S
ame as must_be_preserved_with_bias_for_promotion_failure() except that
//
it takes a klassOop argument, instead of the object of which this is the mark word.
inline
bool
markOopDesc
::
must_be_preserved_with_bias_for_cms_scavenge
(
klassOop
klass_of_obj_containing_mark
)
const
{
assert
(
UseBiasedLocking
,
"unexpected"
);
// CMS scavenges preserve mark words in similar fashion to promotion failures; see above
...
...
@@ -89,11 +92,14 @@ inline bool markOopDesc::must_be_preserved_with_bias_for_cms_scavenge(klassOop k
klass_of_obj_containing_mark
->
klass_part
()
->
prototype_header
()
->
has_bias_pattern
())
{
return
true
;
}
return
(
this
!=
prototype
());
return
(
!
is_unlocked
()
||
!
has_no_hash
());
}
// Same as must_be_preserved_for_promotion_failure() except that
// it takes a klassOop argument, instead of the object of which this is the mark word.
inline
bool
markOopDesc
::
must_be_preserved_for_cms_scavenge
(
klassOop
klass_of_obj_containing_mark
)
const
{
if
(
!
UseBiasedLocking
)
return
(
this
!=
prototype
());
return
(
!
is_unlocked
()
||
!
has_no_hash
());
return
must_be_preserved_with_bias_for_cms_scavenge
(
klass_of_obj_containing_mark
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录