Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
b683c26f
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看板
提交
b683c26f
编写于
10月 04, 2012
作者:
J
jmasa
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
8f84548f
f9ad731c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
20 addition
and
28 deletion
+20
-28
src/share/vm/gc_implementation/shared/vmGCOperations.cpp
src/share/vm/gc_implementation/shared/vmGCOperations.cpp
+20
-28
未找到文件。
src/share/vm/gc_implementation/shared/vmGCOperations.cpp
浏览文件 @
b683c26f
...
...
@@ -198,8 +198,6 @@ void VM_CollectForMetadataAllocation::doit() {
CollectedHeap
*
heap
=
Universe
::
heap
();
GCCauseSetter
gccs
(
heap
,
_gc_cause
);
bool
do_cms_concurrent
=
false
;
// Check again if the space is available. Another thread
// may have similarly failed a metadata allocation and induced
// a GC that freed space for the allocation.
...
...
@@ -208,23 +206,25 @@ void VM_CollectForMetadataAllocation::doit() {
}
if
(
_result
==
NULL
)
{
if
(
!
UseConcMarkSweepGC
)
{
// Don't clear the soft refs the first time.
if
(
UseConcMarkSweepGC
)
{
if
(
CMSClassUnloadingEnabled
)
{
MetaspaceGC
::
set_should_concurrent_collect
(
true
);
}
// For CMS expand since the collection is going to be concurrent.
_result
=
_loader_data
->
metaspace_non_null
()
->
expand_and_allocate
(
_size
,
_mdtype
);
}
if
(
_result
==
NULL
)
{
// Don't clear the soft refs. This GC is for reclaiming metadata
// and is unrelated to the fullness of the Java heap which should
// be the criteria for clearing SoftReferences.
if
(
Verbose
&&
PrintGCDetails
&&
UseConcMarkSweepGC
)
{
gclog_or_tty
->
print_cr
(
"
\n
CMS full GC for Metaspace"
);
}
heap
->
collect_as_vm_thread
(
GCCause
::
_metadata_GC_threshold
);
_result
=
_loader_data
->
metaspace_non_null
()
->
allocate
(
_size
,
_mdtype
);
// Don't do this for now
// This seems too costly to do a second full GC
// Let the metaspace grow instead
// if (_result == NULL) {
// // If allocation fails again, clear soft refs
// heap->collect_as_vm_thread(GCCause::_last_ditch_collection);
// _result = _loader_data->metaspace_non_null()->allocate(_size, _mdtype);
// }
}
else
{
MetaspaceGC
::
set_should_concurrent_collect
(
true
);
do_cms_concurrent
=
true
;
}
if
(
_result
==
NULL
)
{
if
(
_result
==
NULL
&&
!
UseConcMarkSweepGC
/* CMS already tried */
)
{
// If still failing, allow the Metaspace to expand.
// See delta_capacity_until_GC() for explanation of the
// amount of the expansion.
...
...
@@ -233,18 +233,10 @@ void VM_CollectForMetadataAllocation::doit() {
_result
=
_loader_data
->
metaspace_non_null
()
->
expand_and_allocate
(
_size
,
_mdtype
);
if
(
do_cms_concurrent
&&
_result
==
NULL
)
{
// Rather than fail with a metaspace out-of-memory, do a full
// GC for CMS.
heap
->
collect_as_vm_thread
(
GCCause
::
_metadata_GC_threshold
);
_result
=
_loader_data
->
metaspace_non_null
()
->
allocate
(
_size
,
_mdtype
);
}
if
(
_result
==
NULL
)
{
if
(
PrintGCDetails
)
{
gclog_or_tty
->
print_cr
(
"
\n
After Metaspace GC failed to allocate size "
SIZE_FORMAT
,
_size
);
}
}
}
if
(
Verbose
&&
PrintGCDetails
&&
_result
==
NULL
)
{
gclog_or_tty
->
print_cr
(
"
\n
After Metaspace GC failed to allocate size "
SIZE_FORMAT
,
_size
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录