Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
4e055d6b
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看板
提交
4e055d6b
编写于
3月 22, 2013
作者:
S
stefank
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
611d22ce
309e945e
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
222 addition
and
125 deletion
+222
-125
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
...ion/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
+4
-0
src/share/vm/gc_implementation/g1/concurrentMark.cpp
src/share/vm/gc_implementation/g1/concurrentMark.cpp
+195
-105
src/share/vm/gc_implementation/g1/concurrentMark.hpp
src/share/vm/gc_implementation/g1/concurrentMark.hpp
+8
-3
src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp
..._implementation/parallelScavenge/parallelScavengeHeap.cpp
+1
-1
src/share/vm/memory/genCollectedHeap.cpp
src/share/vm/memory/genCollectedHeap.cpp
+2
-5
src/share/vm/memory/metaspace.cpp
src/share/vm/memory/metaspace.cpp
+12
-11
未找到文件。
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
浏览文件 @
4e055d6b
...
@@ -6068,6 +6068,10 @@ void CMSCollector::sweep(bool asynch) {
...
@@ -6068,6 +6068,10 @@ void CMSCollector::sweep(bool asynch) {
verify_work_stacks_empty
();
verify_work_stacks_empty
();
verify_overflow_empty
();
verify_overflow_empty
();
if
(
should_unload_classes
())
{
ClassLoaderDataGraph
::
purge
();
}
_intra_sweep_timer
.
stop
();
_intra_sweep_timer
.
stop
();
_intra_sweep_estimate
.
sample
(
_intra_sweep_timer
.
seconds
());
_intra_sweep_estimate
.
sample
(
_intra_sweep_timer
.
seconds
());
...
...
src/share/vm/gc_implementation/g1/concurrentMark.cpp
浏览文件 @
4e055d6b
此差异已折叠。
点击以展开。
src/share/vm/gc_implementation/g1/concurrentMark.hpp
浏览文件 @
4e055d6b
...
@@ -166,7 +166,7 @@ class CMBitMap : public CMBitMapRO {
...
@@ -166,7 +166,7 @@ class CMBitMap : public CMBitMapRO {
class
CMMarkStack
VALUE_OBJ_CLASS_SPEC
{
class
CMMarkStack
VALUE_OBJ_CLASS_SPEC
{
VirtualSpace
_virtual_space
;
// Underlying backing store for actual stack
VirtualSpace
_virtual_space
;
// Underlying backing store for actual stack
ConcurrentMark
*
_cm
;
ConcurrentMark
*
_cm
;
oop
*
_base
;
// bottom of stack
oop
*
_base
;
// bottom of stack
jint
_index
;
// one more than last occupied index
jint
_index
;
// one more than last occupied index
jint
_capacity
;
// max #elements
jint
_capacity
;
// max #elements
jint
_saved_index
;
// value of _index saved at start of GC
jint
_saved_index
;
// value of _index saved at start of GC
...
@@ -491,9 +491,12 @@ protected:
...
@@ -491,9 +491,12 @@ protected:
// structures are initialised to a sensible and predictable state.
// structures are initialised to a sensible and predictable state.
void
set_non_marking_state
();
void
set_non_marking_state
();
// Called to indicate how many threads are currently active.
void
set_concurrency
(
uint
active_tasks
);
// It should be called to indicate which phase we're in (concurrent
// It should be called to indicate which phase we're in (concurrent
// mark or remark) and how many threads are currently active.
// mark or remark) and how many threads are currently active.
void
set_phase
(
uint
active_tasks
,
bool
concurrent
);
void
set_
concurrency_and_
phase
(
uint
active_tasks
,
bool
concurrent
);
// prints all gathered CM-related statistics
// prints all gathered CM-related statistics
void
print_stats
();
void
print_stats
();
...
@@ -1146,7 +1149,9 @@ public:
...
@@ -1146,7 +1149,9 @@ public:
// trying not to exceed the given duration. However, it might exit
// trying not to exceed the given duration. However, it might exit
// prematurely, according to some conditions (i.e. SATB buffers are
// prematurely, according to some conditions (i.e. SATB buffers are
// available for processing).
// available for processing).
void
do_marking_step
(
double
target_ms
,
bool
do_stealing
,
bool
do_termination
);
void
do_marking_step
(
double
target_ms
,
bool
do_termination
,
bool
is_serial
);
// These two calls start and stop the timer
// These two calls start and stop the timer
void
record_start_time
()
{
void
record_start_time
()
{
...
...
src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp
浏览文件 @
4e055d6b
...
@@ -656,7 +656,7 @@ void ParallelScavengeHeap::print_tracing_info() const {
...
@@ -656,7 +656,7 @@ void ParallelScavengeHeap::print_tracing_info() const {
tty
->
print_cr
(
"[Accumulated GC generation 0 time %3.7f secs]"
,
time
);
tty
->
print_cr
(
"[Accumulated GC generation 0 time %3.7f secs]"
,
time
);
}
}
if
(
TraceGen1Time
)
{
if
(
TraceGen1Time
)
{
double
time
=
PSMarkSweep
::
accumulated_time
()
->
seconds
();
double
time
=
UseParallelOldGC
?
PSParallelCompact
::
accumulated_time
()
->
seconds
()
:
PSMarkSweep
::
accumulated_time
()
->
seconds
();
tty
->
print_cr
(
"[Accumulated GC generation 1 time %3.7f secs]"
,
time
);
tty
->
print_cr
(
"[Accumulated GC generation 1 time %3.7f secs]"
,
time
);
}
}
}
}
...
...
src/share/vm/memory/genCollectedHeap.cpp
浏览文件 @
4e055d6b
...
@@ -554,6 +554,8 @@ void GenCollectedHeap::do_collection(bool full,
...
@@ -554,6 +554,8 @@ void GenCollectedHeap::do_collection(bool full,
}
}
if
(
complete
)
{
if
(
complete
)
{
// Delete metaspaces for unloaded class loaders and clean up loader_data graph
ClassLoaderDataGraph
::
purge
();
// Resize the metaspace capacity after full collections
// Resize the metaspace capacity after full collections
MetaspaceGC
::
compute_new_size
();
MetaspaceGC
::
compute_new_size
();
update_full_collections_completed
();
update_full_collections_completed
();
...
@@ -564,11 +566,6 @@ void GenCollectedHeap::do_collection(bool full,
...
@@ -564,11 +566,6 @@ void GenCollectedHeap::do_collection(bool full,
gc_epilogue
(
complete
);
gc_epilogue
(
complete
);
// Delete metaspaces for unloaded class loaders and clean up loader_data graph
if
(
complete
)
{
ClassLoaderDataGraph
::
purge
();
}
if
(
must_restore_marks_for_biased_locking
)
{
if
(
must_restore_marks_for_biased_locking
)
{
BiasedLocking
::
restore_marks
();
BiasedLocking
::
restore_marks
();
}
}
...
...
src/share/vm/memory/metaspace.cpp
浏览文件 @
4e055d6b
...
@@ -1103,25 +1103,24 @@ size_t MetaspaceGC::delta_capacity_until_GC(size_t word_size) {
...
@@ -1103,25 +1103,24 @@ size_t MetaspaceGC::delta_capacity_until_GC(size_t word_size) {
}
}
bool
MetaspaceGC
::
should_expand
(
VirtualSpaceList
*
vsl
,
size_t
word_size
)
{
bool
MetaspaceGC
::
should_expand
(
VirtualSpaceList
*
vsl
,
size_t
word_size
)
{
// Class virtual space should always be expanded. Call GC for the other
// metadata virtual space.
if
(
vsl
==
Metaspace
::
class_space_list
())
return
true
;
// If the user wants a limit, impose one.
// If the user wants a limit, impose one.
size_t
max_metaspace_size_words
=
MaxMetaspaceSize
/
BytesPerWord
;
size_t
metaspace_size_words
=
MetaspaceSize
/
BytesPerWord
;
if
(
!
FLAG_IS_DEFAULT
(
MaxMetaspaceSize
)
&&
if
(
!
FLAG_IS_DEFAULT
(
MaxMetaspaceSize
)
&&
vsl
->
capacity_words_sum
()
>=
max_metaspace_size_words
)
{
MetaspaceAux
::
reserved_in_bytes
()
>=
MaxMetaspaceSize
)
{
return
false
;
return
false
;
}
}
// Class virtual space should always be expanded. Call GC for the other
// metadata virtual space.
if
(
vsl
==
Metaspace
::
class_space_list
())
return
true
;
// If this is part of an allocation after a GC, expand
// If this is part of an allocation after a GC, expand
// unconditionally.
// unconditionally.
if
(
MetaspaceGC
::
expand_after_GC
())
{
if
(
MetaspaceGC
::
expand_after_GC
())
{
return
true
;
return
true
;
}
}
size_t
metaspace_size_words
=
MetaspaceSize
/
BytesPerWord
;
// If the capacity is below the minimum capacity, allow the
// If the capacity is below the minimum capacity, allow the
// expansion. Also set the high-water-mark (capacity_until_GC)
// expansion. Also set the high-water-mark (capacity_until_GC)
// to that minimum capacity so that a GC will not be induced
// to that minimum capacity so that a GC will not be induced
...
@@ -1311,8 +1310,7 @@ void MetaspaceGC::compute_new_size() {
...
@@ -1311,8 +1310,7 @@ void MetaspaceGC::compute_new_size() {
gclog_or_tty
->
print_cr
(
" metaspace HWM: %.1fK"
,
new_capacity_until_GC
/
(
double
)
K
);
gclog_or_tty
->
print_cr
(
" metaspace HWM: %.1fK"
,
new_capacity_until_GC
/
(
double
)
K
);
}
}
}
}
assert
(
vsl
->
used_bytes_sum
()
==
used_after_gc
&&
assert
(
used_after_gc
<=
vsl
->
capacity_bytes_sum
(),
used_after_gc
<=
vsl
->
capacity_bytes_sum
(),
"sanity check"
);
"sanity check"
);
}
}
...
@@ -1972,6 +1970,9 @@ void SpaceManager::initialize() {
...
@@ -1972,6 +1970,9 @@ void SpaceManager::initialize() {
}
}
SpaceManager
::~
SpaceManager
()
{
SpaceManager
::~
SpaceManager
()
{
// This call this->_lock which can't be done while holding expand_lock()
const
size_t
in_use_before
=
sum_capacity_in_chunks_in_use
();
MutexLockerEx
fcl
(
SpaceManager
::
expand_lock
(),
MutexLockerEx
fcl
(
SpaceManager
::
expand_lock
(),
Mutex
::
_no_safepoint_check_flag
);
Mutex
::
_no_safepoint_check_flag
);
...
@@ -1989,7 +1990,7 @@ SpaceManager::~SpaceManager() {
...
@@ -1989,7 +1990,7 @@ SpaceManager::~SpaceManager() {
// Have to update before the chunks_in_use lists are emptied
// Have to update before the chunks_in_use lists are emptied
// below.
// below.
chunk_manager
->
inc_free_chunks_total
(
sum_capacity_in_chunks_in_use
()
,
chunk_manager
->
inc_free_chunks_total
(
in_use_before
,
sum_count_in_chunks_in_use
());
sum_count_in_chunks_in_use
());
// Add all the chunks in use by this space manager
// Add all the chunks in use by this space manager
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录