Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
c329d9fe
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看板
提交
c329d9fe
编写于
10月 17, 2013
作者:
J
jmasa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8025635: SoftReferences are not cleared before metaspace OOME are thrown
Reviewed-by: jcoomes, tamao, tschatzl, stefank
上级
cffd1194
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
13 addition
and
6 deletion
+13
-6
src/share/vm/gc_implementation/shared/vmGCOperations.cpp
src/share/vm/gc_implementation/shared/vmGCOperations.cpp
+13
-6
未找到文件。
src/share/vm/gc_implementation/shared/vmGCOperations.cpp
浏览文件 @
c329d9fe
...
@@ -223,9 +223,7 @@ void VM_CollectForMetadataAllocation::doit() {
...
@@ -223,9 +223,7 @@ void VM_CollectForMetadataAllocation::doit() {
_loader_data
->
metaspace_non_null
()
->
expand_and_allocate
(
_size
,
_mdtype
);
_loader_data
->
metaspace_non_null
()
->
expand_and_allocate
(
_size
,
_mdtype
);
}
}
if
(
_result
==
NULL
)
{
if
(
_result
==
NULL
)
{
// Don't clear the soft refs. This GC is for reclaiming metadata
// Don't clear the soft refs yet.
// and is unrelated to the fullness of the Java heap which should
// be the criteria for clearing SoftReferences.
if
(
Verbose
&&
PrintGCDetails
&&
UseConcMarkSweepGC
)
{
if
(
Verbose
&&
PrintGCDetails
&&
UseConcMarkSweepGC
)
{
gclog_or_tty
->
print_cr
(
"
\n
CMS full GC for Metaspace"
);
gclog_or_tty
->
print_cr
(
"
\n
CMS full GC for Metaspace"
);
}
}
...
@@ -235,7 +233,7 @@ void VM_CollectForMetadataAllocation::doit() {
...
@@ -235,7 +233,7 @@ void VM_CollectForMetadataAllocation::doit() {
_result
=
_result
=
_loader_data
->
metaspace_non_null
()
->
allocate
(
_size
,
_mdtype
);
_loader_data
->
metaspace_non_null
()
->
allocate
(
_size
,
_mdtype
);
}
}
if
(
_result
==
NULL
&&
!
UseConcMarkSweepGC
/* CMS already tried */
)
{
if
(
_result
==
NULL
)
{
// If still failing, allow the Metaspace to expand.
// If still failing, allow the Metaspace to expand.
// See delta_capacity_until_GC() for explanation of the
// See delta_capacity_until_GC() for explanation of the
// amount of the expansion.
// amount of the expansion.
...
@@ -243,7 +241,16 @@ void VM_CollectForMetadataAllocation::doit() {
...
@@ -243,7 +241,16 @@ void VM_CollectForMetadataAllocation::doit() {
// or a MaxMetaspaceSize has been specified on the command line.
// or a MaxMetaspaceSize has been specified on the command line.
_result
=
_result
=
_loader_data
->
metaspace_non_null
()
->
expand_and_allocate
(
_size
,
_mdtype
);
_loader_data
->
metaspace_non_null
()
->
expand_and_allocate
(
_size
,
_mdtype
);
if
(
_result
==
NULL
)
{
// If expansion failed, do a last-ditch collection and try allocating
// again. A last-ditch collection will clear softrefs. This
// behavior is similar to the last-ditch collection done for perm
// gen when it was full and a collection for failed allocation
// did not free perm gen space.
heap
->
collect_as_vm_thread
(
GCCause
::
_last_ditch_collection
);
_result
=
_loader_data
->
metaspace_non_null
()
->
allocate
(
_size
,
_mdtype
);
}
}
}
if
(
Verbose
&&
PrintGCDetails
&&
_result
==
NULL
)
{
if
(
Verbose
&&
PrintGCDetails
&&
_result
==
NULL
)
{
gclog_or_tty
->
print_cr
(
"
\n
After Metaspace GC failed to allocate size "
gclog_or_tty
->
print_cr
(
"
\n
After Metaspace GC failed to allocate size "
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录