Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell11
提交
597a8d69
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,发现更多精彩内容 >>
提交
597a8d69
编写于
3月 13, 2013
作者:
B
brutisso
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
92a4f69c
565a5198
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
38 addition
and
24 deletion
+38
-24
hotspot/src/share/vm/memory/universe.cpp
hotspot/src/share/vm/memory/universe.cpp
+2
-0
hotspot/src/share/vm/runtime/arguments.cpp
hotspot/src/share/vm/runtime/arguments.cpp
+35
-24
hotspot/src/share/vm/runtime/arguments.hpp
hotspot/src/share/vm/runtime/arguments.hpp
+1
-0
未找到文件。
hotspot/src/share/vm/memory/universe.cpp
浏览文件 @
597a8d69
...
...
@@ -885,6 +885,8 @@ ReservedSpace Universe::reserve_heap(size_t heap_size, size_t alignment) {
// the actual alignment depends on its size.
Universe
::
set_class_metaspace_size
(
align_size_up
(
ClassMetaspaceSize
,
alignment
));
size_t
total_reserved
=
align_size_up
(
heap_size
+
Universe
::
class_metaspace_size
(),
alignment
);
assert
(
!
UseCompressedOops
||
(
total_reserved
<=
(
OopEncodingHeapMax
-
os
::
vm_page_size
())),
"heap size is too big for compressed oops"
);
char
*
addr
=
Universe
::
preferred_heap_base
(
total_reserved
,
Universe
::
UnscaledNarrowOop
);
ReservedHeapSpace
total_rs
(
total_reserved
,
alignment
,
UseLargePages
,
addr
);
...
...
hotspot/src/share/vm/runtime/arguments.cpp
浏览文件 @
597a8d69
...
...
@@ -1381,6 +1381,40 @@ bool Arguments::should_auto_select_low_pause_collector() {
return
false
;
}
void
Arguments
::
set_use_compressed_oops
()
{
#ifndef ZERO
#ifdef _LP64
// MaxHeapSize is not set up properly at this point, but
// the only value that can override MaxHeapSize if we are
// to use UseCompressedOops is InitialHeapSize.
size_t
max_heap_size
=
MAX2
(
MaxHeapSize
,
InitialHeapSize
);
if
(
max_heap_size
<=
max_heap_for_compressed_oops
())
{
#if !defined(COMPILER1) || defined(TIERED)
if
(
FLAG_IS_DEFAULT
(
UseCompressedOops
))
{
FLAG_SET_ERGO
(
bool
,
UseCompressedOops
,
true
);
}
#endif
#ifdef _WIN64
if
(
UseLargePages
&&
UseCompressedOops
)
{
// Cannot allocate guard pages for implicit checks in indexed addressing
// mode, when large pages are specified on windows.
// This flag could be switched ON if narrow oop base address is set to 0,
// see code in Universe::initialize_heap().
Universe
::
set_narrow_oop_use_implicit_null_checks
(
false
);
}
#endif // _WIN64
}
else
{
if
(
UseCompressedOops
&&
!
FLAG_IS_DEFAULT
(
UseCompressedOops
))
{
warning
(
"Max heap size too large for Compressed Oops"
);
FLAG_SET_DEFAULT
(
UseCompressedOops
,
false
);
FLAG_SET_DEFAULT
(
UseCompressedKlassPointers
,
false
);
}
}
#endif // _LP64
#endif // ZERO
}
void
Arguments
::
set_ergonomics_flags
()
{
if
(
os
::
is_server_class_machine
())
{
...
...
@@ -1410,30 +1444,7 @@ void Arguments::set_ergonomics_flags() {
#ifndef ZERO
#ifdef _LP64
// Check that UseCompressedOops can be set with the max heap size allocated
// by ergonomics.
if
(
MaxHeapSize
<=
max_heap_for_compressed_oops
())
{
#if !defined(COMPILER1) || defined(TIERED)
if
(
FLAG_IS_DEFAULT
(
UseCompressedOops
))
{
FLAG_SET_ERGO
(
bool
,
UseCompressedOops
,
true
);
}
#endif
#ifdef _WIN64
if
(
UseLargePages
&&
UseCompressedOops
)
{
// Cannot allocate guard pages for implicit checks in indexed addressing
// mode, when large pages are specified on windows.
// This flag could be switched ON if narrow oop base address is set to 0,
// see code in Universe::initialize_heap().
Universe
::
set_narrow_oop_use_implicit_null_checks
(
false
);
}
#endif // _WIN64
}
else
{
if
(
UseCompressedOops
&&
!
FLAG_IS_DEFAULT
(
UseCompressedOops
))
{
warning
(
"Max heap size too large for Compressed Oops"
);
FLAG_SET_DEFAULT
(
UseCompressedOops
,
false
);
FLAG_SET_DEFAULT
(
UseCompressedKlassPointers
,
false
);
}
}
set_use_compressed_oops
();
// UseCompressedOops must be on for UseCompressedKlassPointers to be on.
if
(
!
UseCompressedOops
)
{
if
(
UseCompressedKlassPointers
)
{
...
...
hotspot/src/share/vm/runtime/arguments.hpp
浏览文件 @
597a8d69
...
...
@@ -309,6 +309,7 @@ class Arguments : AllStatic {
// Garbage-First (UseG1GC)
static
void
set_g1_gc_flags
();
// GC ergonomics
static
void
set_use_compressed_oops
();
static
void
set_ergonomics_flags
();
static
void
set_shared_spaces_flags
();
// Setup heap size
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录