Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
24329dbb
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看板
提交
24329dbb
编写于
12月 21, 2017
作者:
A
asaha
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
67a475b1
0a304144
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
85 addition
and
1 deletion
+85
-1
.hgtags
.hgtags
+19
-0
src/share/vm/memory/metaspace.cpp
src/share/vm/memory/metaspace.cpp
+19
-1
test/runtime/Metaspace/MaxMetaspaceSizeTest.java
test/runtime/Metaspace/MaxMetaspaceSizeTest.java
+47
-0
未找到文件。
.hgtags
浏览文件 @
24329dbb
...
...
@@ -1035,6 +1035,11 @@ cdfe7ec6f29293d7c2f64239518e8947733ad85c jdk8u152-b12
0a9d8db98fc5f0302da6520ba329f41baa092ae0 jdk8u152-b14
c1bf165d3b27e864a9f8eec5bb0c1e746a972ad5 jdk8u152-b15
98b4b0661837817cc39047000e1a7efa6015af7c jdk8u152-b16
91894ffc746c1681172aaa37e2cf5bff69560f20 jdk8u152-b31
d278f122e65dfb5d239ed420a534df75f527a504 jdk8u152-b32
c066fe30d0a141b14ab7788cbbd35eba11196e72 jdk8u152-b33
12a0cebfae93a638dc69a34f8276e1ef43b11b7a jdk8u152-b34
f6719c3d02787da6e232703f61efc931ead7683b jdk8u152-b35
2d5100bddeb80cf767485b787fc3051311e3d7b9 jdk8u151-b00
596b584c68b73ec635347807571463580deb955f jdk8u151-b01
1f6f436360d5cd375b806aec1c78abb8fcb4e5f6 jdk8u151-b02
...
...
@@ -1105,10 +1110,24 @@ a17bab9405474602b18cd62e060a09b17d6413ac jdk8u161-b02
4cf0fd9f1fe53e3140413623d72f6a00e587830d jdk8u161-b03
4022d56fc6b83eab7213c92e1277e7ce9753a21f jdk8u161-b04
37e8b74faccc8e795be1a171033487e2270dc605 jdk8u161-b05
a769f683df5daa694fd5124c4825a9c6ad9d72d2 jdk8u161-b06
3eb5127534005ac1f6f50db95adcff7b19a7e636 jdk8u161-b07
796d399766f27aa0724a7951ee319c5e490a32cb jdk8u161-b08
6e5cabb7995ef8357c5c61c16af659bf7cc1d2ff jdk8u161-b09
b9a9aa038ad84a3fe6c91e27e359b95da8eb8629 jdk8u161-b10
b1606443958a9a64020b596327ff586ca5c8ae1d jdk8u161-b11
210f7ef62595c608d69fc8bf442a4f5b0bceddb5 jdk8u161-b12
7b96cfeed22242bb68a387d1680e602e37e48050 jdk8u162-b00
92693f9dd704467ddd5fbae5a5908c1713a08ee0 jdk8u162-b01
741b7a6743c0e02eae7e4a864f378fa1df0da112 jdk8u162-b02
e0c000e8eb7588501637873c6dcd255306c9c5cc jdk8u162-b03
18366fa39fe0839291b672ce4f8f12605d88b0d0 jdk8u162-b04
e34428c12886692f9d562263a10bc72c8d222613 jdk8u162-b05
cd7f8ee4553d0f884ddc150ceefcb5b48b12ca21 jdk8u162-b06
7be95092ed8b37b7b55ae341c8d62d377d7310df jdk8u162-b07
080cfab193208aeb198f5b98841782fbf51ab851 jdk8u162-b08
02f9409295f9ea7350cc2d25eeabf3c2b13b1df6 jdk8u162-b09
c3618e1cdefdda6c262f082791bfd988e0e9d9c9 jdk8u162-b10
39e2895b795aded8b584626fb019d35f12e9d1e7 jdk8u162-b11
69aec2ca5d905dde1d0f29a89076d02a531808a3 jdk8u162-b12
a17bab9405474602b18cd62e060a09b17d6413ac jdk8u171-b00
src/share/vm/memory/metaspace.cpp
浏览文件 @
24329dbb
/*
* Copyright (c) 2011, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 201
7
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -3135,6 +3135,24 @@ void Metaspace::ergo_initialize() {
CompressedClassSpaceSize
=
align_size_down_bounded
(
CompressedClassSpaceSize
,
_reserve_alignment
);
set_compressed_class_space_size
(
CompressedClassSpaceSize
);
// Initial virtual space size will be calculated at global_initialize()
uintx
min_metaspace_sz
=
VIRTUALSPACEMULTIPLIER
*
InitialBootClassLoaderMetaspaceSize
;
if
(
UseCompressedClassPointers
)
{
if
((
min_metaspace_sz
+
CompressedClassSpaceSize
)
>
MaxMetaspaceSize
)
{
if
(
min_metaspace_sz
>=
MaxMetaspaceSize
)
{
vm_exit_during_initialization
(
"MaxMetaspaceSize is too small."
);
}
else
{
FLAG_SET_ERGO
(
uintx
,
CompressedClassSpaceSize
,
MaxMetaspaceSize
-
min_metaspace_sz
);
}
}
}
else
if
(
min_metaspace_sz
>=
MaxMetaspaceSize
)
{
FLAG_SET_ERGO
(
uintx
,
InitialBootClassLoaderMetaspaceSize
,
min_metaspace_sz
);
}
}
void
Metaspace
::
global_initialize
()
{
...
...
test/runtime/Metaspace/MaxMetaspaceSizeTest.java
0 → 100644
浏览文件 @
24329dbb
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import
com.oracle.java.testlibrary.ProcessTools
;
import
com.oracle.java.testlibrary.OutputAnalyzer
;
/*
* @test MaxMetaspaceSizeTest
* @requires vm.bits == "64"
* @bug 8087291
* @library /testlibrary
* @run main/othervm MaxMetaspaceSizeTest
*/
public
class
MaxMetaspaceSizeTest
{
public
static
void
main
(
String
...
args
)
throws
Exception
{
ProcessBuilder
pb
=
ProcessTools
.
createJavaProcessBuilder
(
"-Xmx1g"
,
"-XX:InitialBootClassLoaderMetaspaceSize=4195328"
,
"-XX:MaxMetaspaceSize=4195328"
,
"-XX:+UseCompressedClassPointers"
,
"-XX:CompressedClassSpaceSize=1g"
,
"-version"
);
OutputAnalyzer
output
=
new
OutputAnalyzer
(
pb
.
start
());
output
.
shouldContain
(
"MaxMetaspaceSize is too small."
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录