Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
00c51f7a
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
00c51f7a
编写于
3月 06, 2011
作者:
J
jcoomes
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7018056: large pages not always enabled by default
Reviewed-by: phh, kvn
上级
76f2e04b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
34 addition
and
61 deletion
+34
-61
src/share/vm/runtime/arguments.cpp
src/share/vm/runtime/arguments.cpp
+33
-56
src/share/vm/runtime/arguments.hpp
src/share/vm/runtime/arguments.hpp
+1
-2
src/share/vm/runtime/globals.hpp
src/share/vm/runtime/globals.hpp
+0
-3
未找到文件。
src/share/vm/runtime/arguments.cpp
浏览文件 @
00c51f7a
...
...
@@ -242,6 +242,7 @@ static ObsoleteFlag obsolete_jvm_flags[] = {
JDK_Version
::
jdk_update
(
6
,
24
),
JDK_Version
::
jdk
(
8
)
},
{
"MaxLiveObjectEvacuationRatio"
,
JDK_Version
::
jdk_update
(
6
,
24
),
JDK_Version
::
jdk
(
8
)
},
{
"ForceSharedSpaces"
,
JDK_Version
::
jdk_update
(
6
,
25
),
JDK_Version
::
jdk
(
8
)
},
{
NULL
,
JDK_Version
(
0
),
JDK_Version
(
0
)
}
};
...
...
@@ -1003,28 +1004,6 @@ static void no_shared_spaces() {
}
}
void
Arguments
::
check_compressed_oops_compat
()
{
#ifdef _LP64
assert
(
UseCompressedOops
,
"Precondition"
);
// Is it on by default or set on ergonomically
bool
is_on_by_default
=
FLAG_IS_DEFAULT
(
UseCompressedOops
)
||
FLAG_IS_ERGO
(
UseCompressedOops
);
// If dumping an archive or forcing its use, disable compressed oops if possible
if
(
DumpSharedSpaces
||
RequireSharedSpaces
)
{
if
(
is_on_by_default
)
{
FLAG_SET_DEFAULT
(
UseCompressedOops
,
false
);
return
;
}
else
{
vm_exit_during_initialization
(
"Class Data Sharing is not supported with compressed oops yet"
,
NULL
);
}
}
else
if
(
UseSharedSpaces
)
{
// UseSharedSpaces is on by default. With compressed oops, we turn it off.
FLAG_SET_DEFAULT
(
UseSharedSpaces
,
false
);
}
#endif
}
void
Arguments
::
set_tiered_flags
()
{
if
(
FLAG_IS_DEFAULT
(
CompilationPolicyChoice
))
{
FLAG_SET_DEFAULT
(
CompilationPolicyChoice
,
2
);
...
...
@@ -1382,7 +1361,7 @@ bool Arguments::should_auto_select_low_pause_collector() {
void
Arguments
::
set_ergonomics_flags
()
{
// Parallel GC is not compatible with sharing. If one specifies
// that they want sharing explicitly, do not set ergonomics flags.
if
(
DumpSharedSpaces
||
Forc
eSharedSpaces
)
{
if
(
DumpSharedSpaces
||
Requir
eSharedSpaces
)
{
return
;
}
...
...
@@ -1845,33 +1824,6 @@ bool Arguments::check_vm_args_consistency() {
status
=
status
&&
verify_percentage
(
GCHeapFreeLimit
,
"GCHeapFreeLimit"
);
// Check whether user-specified sharing option conflicts with GC or page size.
// Both sharing and large pages are enabled by default on some platforms;
// large pages override sharing only if explicitly set on the command line.
const
bool
cannot_share
=
UseConcMarkSweepGC
||
CMSIncrementalMode
||
UseG1GC
||
UseParNewGC
||
UseParallelGC
||
UseParallelOldGC
||
UseLargePages
&&
FLAG_IS_CMDLINE
(
UseLargePages
);
if
(
cannot_share
)
{
// Either force sharing on by forcing the other options off, or
// force sharing off.
if
(
DumpSharedSpaces
||
ForceSharedSpaces
)
{
jio_fprintf
(
defaultStream
::
error_stream
(),
"Using Serial GC and default page size because of %s
\n
"
,
ForceSharedSpaces
?
"-Xshare:on"
:
"-Xshare:dump"
);
force_serial_gc
();
FLAG_SET_DEFAULT
(
UseLargePages
,
false
);
}
else
{
if
(
UseSharedSpaces
&&
Verbose
)
{
jio_fprintf
(
defaultStream
::
error_stream
(),
"Turning off use of shared archive because of "
"choice of garbage collector or large pages
\n
"
);
}
no_shared_spaces
();
}
}
else
if
(
UseLargePages
&&
(
UseSharedSpaces
||
DumpSharedSpaces
))
{
FLAG_SET_DEFAULT
(
UseLargePages
,
false
);
}
status
=
status
&&
check_gc_consistency
();
status
=
status
&&
check_stack_pages
();
...
...
@@ -2412,9 +2364,6 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args,
}
else
if
(
match_option
(
option
,
"-Xshare:on"
,
&
tail
))
{
FLAG_SET_CMDLINE
(
bool
,
UseSharedSpaces
,
true
);
FLAG_SET_CMDLINE
(
bool
,
RequireSharedSpaces
,
true
);
#ifdef TIERED
FLAG_SET_CMDLINE
(
bool
,
ForceSharedSpaces
,
true
);
#endif // TIERED
// -Xshare:auto
}
else
if
(
match_option
(
option
,
"-Xshare:auto"
,
&
tail
))
{
FLAG_SET_CMDLINE
(
bool
,
UseSharedSpaces
,
true
);
...
...
@@ -2915,6 +2864,36 @@ jint Arguments::parse_options_environment_variable(const char* name, SysClassPat
return
JNI_OK
;
}
void
Arguments
::
set_shared_spaces_flags
()
{
// Check whether class data sharing settings conflict with GC, compressed oops
// or page size, and fix them up. Explicit sharing options override other
// settings.
const
bool
cannot_share
=
UseConcMarkSweepGC
||
CMSIncrementalMode
||
UseG1GC
||
UseParNewGC
||
UseParallelGC
||
UseParallelOldGC
||
UseCompressedOops
||
UseLargePages
&&
FLAG_IS_CMDLINE
(
UseLargePages
);
const
bool
must_share
=
DumpSharedSpaces
||
RequireSharedSpaces
;
const
bool
might_share
=
must_share
||
UseSharedSpaces
;
if
(
cannot_share
)
{
if
(
must_share
)
{
warning
(
"selecting serial gc and disabling large pages %s"
"because of %s"
,
""
LP64_ONLY
(
"and compressed oops "
),
DumpSharedSpaces
?
"-Xshare:dump"
:
"-Xshare:on"
);
force_serial_gc
();
FLAG_SET_CMDLINE
(
bool
,
UseLargePages
,
false
);
LP64_ONLY
(
FLAG_SET_CMDLINE
(
bool
,
UseCompressedOops
,
false
));
}
else
{
if
(
UseSharedSpaces
&&
Verbose
)
{
warning
(
"turning off use of shared archive because of "
"choice of garbage collector or large pages"
);
}
no_shared_spaces
();
}
}
else
if
(
UseLargePages
&&
might_share
)
{
// Disable large pages to allow shared spaces. This is sub-optimal, since
// there may not even be a shared archive to use.
FLAG_SET_DEFAULT
(
UseLargePages
,
false
);
}
}
// Parse entry point called from JNI_CreateJavaVM
...
...
@@ -3062,9 +3041,7 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
// Set flags based on ergonomics.
set_ergonomics_flags
();
if
(
UseCompressedOops
)
{
check_compressed_oops_compat
();
}
set_shared_spaces_flags
();
// Check the GC selections again.
if
(
!
check_gc_consistency
())
{
...
...
src/share/vm/runtime/arguments.hpp
浏览文件 @
00c51f7a
...
...
@@ -301,8 +301,6 @@ class Arguments : AllStatic {
// Tiered
static
void
set_tiered_flags
();
// Check compressed oops compatibility with other flags
static
void
check_compressed_oops_compat
();
// CMS/ParNew garbage collectors
static
void
set_parnew_gc_flags
();
static
void
set_cms_and_parnew_gc_flags
();
...
...
@@ -312,6 +310,7 @@ class Arguments : AllStatic {
static
void
set_g1_gc_flags
();
// GC ergonomics
static
void
set_ergonomics_flags
();
static
void
set_shared_spaces_flags
();
// Setup heap size
static
void
set_heap_size
();
// Based on automatic selection criteria, should the
...
...
src/share/vm/runtime/globals.hpp
浏览文件 @
00c51f7a
...
...
@@ -3656,9 +3656,6 @@ class CommandLineFlags {
product(bool, RequireSharedSpaces, false, \
"Require shared spaces in the permanent generation") \
\
product(bool, ForceSharedSpaces, false, \
"Require shared spaces in the permanent generation") \
\
product(bool, DumpSharedSpaces, false, \
"Special mode: JVM reads a class list, loads classes, builds " \
"shared spaces, and dumps the shared spaces to a file to be " \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录