Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell11
提交
f0175cbe
D
dragonwell11
项目概览
openanolis
/
dragonwell11
通知
7
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell11
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f0175cbe
编写于
3月 05, 2014
作者:
J
jmasa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7098155: Resize young gen at full collections for UseParallelGC
Reviewed-by: tschatzl
上级
a0aec57b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
25 addition
and
12 deletion
+25
-12
hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp
...are/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp
+12
-6
hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
.../gc_implementation/parallelScavenge/psParallelCompact.cpp
+13
-6
未找到文件。
hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp
浏览文件 @
f0175cbe
...
...
@@ -280,6 +280,16 @@ bool PSMarkSweep::invoke_no_policy(bool clear_all_softrefs) {
if
(
UseAdaptiveGenerationSizePolicyAtMajorCollection
&&
((
gc_cause
!=
GCCause
::
_java_lang_system_gc
)
||
UseAdaptiveSizePolicyWithSystemGC
))
{
// Swap the survivor spaces if from_space is empty. The
// resize_young_gen() called below is normally used after
// a successful young GC and swapping of survivor spaces;
// otherwise, it will fail to resize the young gen with
// the current implementation.
if
(
young_gen
->
from_space
()
->
is_empty
())
{
young_gen
->
from_space
()
->
clear
(
SpaceDecorator
::
Mangle
);
young_gen
->
swap_spaces
();
}
// Calculate optimal free space amounts
assert
(
young_gen
->
max_size
()
>
young_gen
->
from_space
()
->
capacity_in_bytes
()
+
...
...
@@ -318,12 +328,8 @@ bool PSMarkSweep::invoke_no_policy(bool clear_all_softrefs) {
heap
->
resize_old_gen
(
size_policy
->
calculated_old_free_size_in_bytes
());
// Don't resize the young generation at an major collection. A
// desired young generation size may have been calculated but
// resizing the young generation complicates the code because the
// resizing of the old generation may have moved the boundary
// between the young generation and the old generation. Let the
// young generation resizing happen at the minor collections.
heap
->
resize_young_gen
(
size_policy
->
calculated_eden_size_in_bytes
(),
size_policy
->
calculated_survivor_size_in_bytes
());
}
if
(
PrintAdaptiveSizePolicy
)
{
gclog_or_tty
->
print_cr
(
"AdaptiveSizeStop: collection: %d "
,
...
...
hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
浏览文件 @
f0175cbe
...
...
@@ -43,6 +43,7 @@
#include "gc_implementation/shared/gcTrace.hpp"
#include "gc_implementation/shared/gcTraceTime.hpp"
#include "gc_implementation/shared/isGCActiveMark.hpp"
#include "gc_implementation/shared/spaceDecorator.hpp"
#include "gc_interface/gcCause.hpp"
#include "memory/gcLocker.inline.hpp"
#include "memory/referencePolicy.hpp"
...
...
@@ -2115,6 +2116,16 @@ bool PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
if
(
UseAdaptiveGenerationSizePolicyAtMajorCollection
&&
((
gc_cause
!=
GCCause
::
_java_lang_system_gc
)
||
UseAdaptiveSizePolicyWithSystemGC
))
{
// Swap the survivor spaces if from_space is empty. The
// resize_young_gen() called below is normally used after
// a successful young GC and swapping of survivor spaces;
// otherwise, it will fail to resize the young gen with
// the current implementation.
if
(
young_gen
->
from_space
()
->
is_empty
())
{
young_gen
->
from_space
()
->
clear
(
SpaceDecorator
::
Mangle
);
young_gen
->
swap_spaces
();
}
// Calculate optimal free space amounts
assert
(
young_gen
->
max_size
()
>
young_gen
->
from_space
()
->
capacity_in_bytes
()
+
...
...
@@ -2154,12 +2165,8 @@ bool PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
heap
->
resize_old_gen
(
size_policy
->
calculated_old_free_size_in_bytes
());
// Don't resize the young generation at an major collection. A
// desired young generation size may have been calculated but
// resizing the young generation complicates the code because the
// resizing of the old generation may have moved the boundary
// between the young generation and the old generation. Let the
// young generation resizing happen at the minor collections.
heap
->
resize_young_gen
(
size_policy
->
calculated_eden_size_in_bytes
(),
size_policy
->
calculated_survivor_size_in_bytes
());
}
if
(
PrintAdaptiveSizePolicy
)
{
gclog_or_tty
->
print_cr
(
"AdaptiveSizeStop: collection: %d "
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录