Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
c20d5472
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看板
提交
c20d5472
编写于
2月 24, 2010
作者:
T
tonyp
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6928065: G1: use existing command line parameters to set the young generation size
Summary: see synopsis Reviewed-by: johnc, jmasa
上级
4ca31d19
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
33 addition
and
6 deletion
+33
-6
src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
+33
-3
src/share/vm/gc_implementation/g1/g1_globals.hpp
src/share/vm/gc_implementation/g1/g1_globals.hpp
+0
-3
未找到文件。
src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
浏览文件 @
c20d5472
...
...
@@ -292,10 +292,37 @@ void G1CollectorPolicy::initialize_flags() {
CollectorPolicy
::
initialize_flags
();
}
// The easiest way to deal with the parsing of the NewSize /
// MaxNewSize / etc. parameteres is to re-use the code in the
// TwoGenerationCollectorPolicy class. This is similar to what
// ParallelScavenge does with its GenerationSizer class (see
// ParallelScavengeHeap::initialize()). We might change this in the
// future, but it's a good start.
class
G1YoungGenSizer
:
public
TwoGenerationCollectorPolicy
{
size_t
size_to_region_num
(
size_t
byte_size
)
{
return
MAX2
((
size_t
)
1
,
byte_size
/
HeapRegion
::
GrainBytes
);
}
public:
G1YoungGenSizer
()
{
initialize_flags
();
initialize_size_info
();
}
size_t
min_young_region_num
()
{
return
size_to_region_num
(
_min_gen0_size
);
}
size_t
initial_young_region_num
()
{
return
size_to_region_num
(
_initial_gen0_size
);
}
size_t
max_young_region_num
()
{
return
size_to_region_num
(
_max_gen0_size
);
}
};
void
G1CollectorPolicy
::
init
()
{
// Set aside an initial future to_space.
_g1
=
G1CollectedHeap
::
heap
();
size_t
regions
=
Universe
::
heap
()
->
capacity
()
/
HeapRegion
::
GrainBytes
;
assert
(
Heap_lock
->
owned_by_self
(),
"Locking discipline."
);
...
...
@@ -304,12 +331,15 @@ void G1CollectorPolicy::init() {
if
(
G1Gen
)
{
_in_young_gc_mode
=
true
;
if
(
G1YoungGenSize
==
0
)
{
G1YoungGenSizer
sizer
;
size_t
initial_region_num
=
sizer
.
initial_young_region_num
();
if
(
UseAdaptiveSizePolicy
)
{
set_adaptive_young_list_length
(
true
);
_young_list_fixed_length
=
0
;
}
else
{
set_adaptive_young_list_length
(
false
);
_young_list_fixed_length
=
(
G1YoungGenSize
/
HeapRegion
::
GrainBytes
)
;
_young_list_fixed_length
=
initial_region_num
;
}
_free_regions_at_end_of_collection
=
_g1
->
free_regions
();
_scan_only_regions_at_end_of_collection
=
0
;
...
...
src/share/vm/gc_implementation/g1/g1_globals.hpp
浏览文件 @
c20d5472
...
...
@@ -37,9 +37,6 @@
develop(intx, G1MarkingOverheadPercent, 0, \
"Overhead of concurrent marking") \
\
product(uintx, G1YoungGenSize, 0, \
"Size of the G1 young generation, 0 is the adaptive policy") \
\
develop(bool, G1Gen, true, \
"If true, it will enable the generational G1") \
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录