Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
259f62c7
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看板
提交
259f62c7
编写于
9月 25, 2013
作者:
B
brutisso
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8025228: assert(new_entry->reserved_words() == vs_word_size) fails in nightly
Reviewed-by: mgerdin, tschatzl, jmasa
上级
c8128861
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
22 addition
and
9 deletion
+22
-9
src/share/vm/memory/metaspace.cpp
src/share/vm/memory/metaspace.cpp
+20
-7
src/share/vm/prims/jni.cpp
src/share/vm/prims/jni.cpp
+2
-2
未找到文件。
src/share/vm/memory/metaspace.cpp
浏览文件 @
259f62c7
...
...
@@ -1095,7 +1095,7 @@ bool VirtualSpaceList::grow_vs(size_t vs_word_size) {
}
// Reserve the space
size_t
vs_byte_size
=
vs_word_size
*
BytesPerWord
;
assert
(
vs_byte_size
%
os
::
vm_
page_size
()
==
0
,
"Not aligned"
);
assert
(
vs_byte_size
%
os
::
vm_
allocation_granularity
()
==
0
,
"Not aligned"
);
// Allocate the meta virtual space and initialize it.
VirtualSpaceNode
*
new_entry
=
new
VirtualSpaceNode
(
vs_byte_size
);
...
...
@@ -1167,12 +1167,14 @@ Metachunk* VirtualSpaceList::get_new_chunk(size_t word_size,
// being used for CompressedHeaders, don't allocate a new virtualspace.
if
(
can_grow
()
&&
MetaspaceGC
::
should_expand
(
this
,
word_size
))
{
// Get another virtual space.
size_t
grow_vs_words
=
MAX2
((
size_t
)
VirtualSpaceSize
,
aligned_expand_vs_by_words
);
size_t
allocation_aligned_expand_words
=
align_size_up
(
aligned_expand_vs_by_words
,
os
::
vm_allocation_granularity
()
/
BytesPerWord
);
size_t
grow_vs_words
=
MAX2
((
size_t
)
VirtualSpaceSize
,
allocation_aligned_expand_words
);
if
(
grow_vs
(
grow_vs_words
))
{
// Got it. It's on the list now. Get a chunk from it.
assert
(
current_virtual_space
()
->
expanded_words
()
==
0
,
"New virtual
s
space nodes should not have expanded"
);
"New virtual space nodes should not have expanded"
);
size_t
grow_chunks_by_words_aligned
=
align_size_up
(
grow_chunks_by_words
,
page_size_words
);
...
...
@@ -3357,7 +3359,7 @@ void Metaspace::dump(outputStream* const out) const {
#ifndef PRODUCT
class
MetaspaceAuxTest
:
AllStatic
{
class
Test
MetaspaceAuxTest
:
AllStatic
{
public:
static
void
test_reserved
()
{
size_t
reserved
=
MetaspaceAux
::
reserved_bytes
();
...
...
@@ -3397,14 +3399,25 @@ class MetaspaceAuxTest : AllStatic {
}
}
static
void
test_virtual_space_list_large_chunk
()
{
VirtualSpaceList
*
vs_list
=
new
VirtualSpaceList
(
os
::
vm_allocation_granularity
());
MutexLockerEx
cl
(
SpaceManager
::
expand_lock
(),
Mutex
::
_no_safepoint_check_flag
);
// A size larger than VirtualSpaceSize (256k) and add one page to make it _not_ be
// vm_allocation_granularity aligned on Windows.
size_t
large_size
=
(
size_t
)(
2
*
256
*
K
+
(
os
::
vm_page_size
()
/
BytesPerWord
));
large_size
+=
(
os
::
vm_page_size
()
/
BytesPerWord
);
vs_list
->
get_new_chunk
(
large_size
,
large_size
,
0
);
}
static
void
test
()
{
test_reserved
();
test_committed
();
test_virtual_space_list_large_chunk
();
}
};
void
MetaspaceAux_test
()
{
MetaspaceAuxTest
::
test
();
void
Test
MetaspaceAux_test
()
{
Test
MetaspaceAuxTest
::
test
();
}
#endif
src/share/vm/prims/jni.cpp
浏览文件 @
259f62c7
...
...
@@ -5046,7 +5046,7 @@ _JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_GetDefaultJavaVMInitArgs(void *args_) {
void
TestReservedSpace_test
();
void
TestReserveMemorySpecial_test
();
void
TestVirtualSpace_test
();
void
MetaspaceAux_test
();
void
Test
MetaspaceAux_test
();
#if INCLUDE_ALL_GCS
void
TestG1BiasedArray_test
();
#endif
...
...
@@ -5057,7 +5057,7 @@ void execute_internal_vm_tests() {
run_unit_test
(
TestReservedSpace_test
());
run_unit_test
(
TestReserveMemorySpecial_test
());
run_unit_test
(
TestVirtualSpace_test
());
run_unit_test
(
MetaspaceAux_test
());
run_unit_test
(
Test
MetaspaceAux_test
());
run_unit_test
(
GlobalDefinitions
::
test_globals
());
run_unit_test
(
GCTimerAllTest
::
all
());
run_unit_test
(
arrayOopDesc
::
test_max_array_length
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录