Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
308bc6bf
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看板
提交
308bc6bf
编写于
9月 06, 2012
作者:
J
jmasa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7196298: Better fix for 7195789
Reviewed-by: jcoomes, brutisso
上级
dde9b60b
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
5 addition
and
41 deletion
+5
-41
src/share/vm/memory/metaspace.cpp
src/share/vm/memory/metaspace.cpp
+3
-30
src/share/vm/memory/metaspace.hpp
src/share/vm/memory/metaspace.hpp
+0
-9
src/share/vm/memory/metaspaceCounters.cpp
src/share/vm/memory/metaspaceCounters.cpp
+2
-2
未找到文件。
src/share/vm/memory/metaspace.cpp
浏览文件 @
308bc6bf
...
...
@@ -2541,41 +2541,14 @@ void SpaceManager::mangle_freed_chunks() {
// MetaspaceAux
size_t
MetaspaceAux
::
used_in_bytes_unsafe
(
Metaspace
::
MetadataType
mdtype
)
{
size_t
used
=
0
;
ClassLoaderDataGraphMetaspaceIterator
iter
;
while
(
iter
.
repeat
())
{
Metaspace
*
msp
=
iter
.
get_next
();
// Sum allocation_total for each metaspace
if
(
msp
!=
NULL
)
{
used
+=
msp
->
used_words
(
mdtype
);
}
}
return
used
*
BytesPerWord
;
}
size_t
MetaspaceAux
::
used_in_bytes
(
Metaspace
::
MetadataType
mdtype
)
{
assert
(
SafepointSynchronize
::
is_at_safepoint
(),
"Consistency checks require being at a safepoint"
);
size_t
used
=
0
;
#ifdef ASSERT
size_t
free
=
0
;
size_t
capacity
=
0
;
#endif
ClassLoaderDataGraphMetaspaceIterator
iter
;
while
(
iter
.
repeat
())
{
Metaspace
*
msp
=
iter
.
get_next
();
// Sum allocation_total for each metaspace
if
(
msp
!=
NULL
)
{
used
+=
msp
->
used_words
(
mdtype
);
#ifdef ASSERT
free
+=
msp
->
free_words
(
mdtype
);
capacity
+=
msp
->
capacity_words
(
mdtype
);
assert
(
used
+
free
==
capacity
,
err_msg
(
"Accounting is wrong used "
SIZE_FORMAT
" free "
SIZE_FORMAT
" capacity "
SIZE_FORMAT
,
used
,
free
,
capacity
));
#endif
}
}
return
used
*
BytesPerWord
;
...
...
@@ -2661,15 +2634,15 @@ void MetaspaceAux::print_on(outputStream* out) {
out
->
print_cr
(
" Metaspace total "
SIZE_FORMAT
"K, used "
SIZE_FORMAT
"K,"
" reserved "
SIZE_FORMAT
"K"
,
capacity_in_bytes
()
/
K
,
used_in_bytes
_unsafe
()
/
K
,
reserved_in_bytes
()
/
K
);
capacity_in_bytes
()
/
K
,
used_in_bytes
()
/
K
,
reserved_in_bytes
()
/
K
);
out
->
print_cr
(
" data space "
SIZE_FORMAT
"K, used "
SIZE_FORMAT
"K,"
" reserved "
SIZE_FORMAT
"K"
,
capacity_in_bytes
(
nct
)
/
K
,
used_in_bytes
_unsafe
(
nct
)
/
K
,
reserved_in_bytes
(
nct
)
/
K
);
capacity_in_bytes
(
nct
)
/
K
,
used_in_bytes
(
nct
)
/
K
,
reserved_in_bytes
(
nct
)
/
K
);
out
->
print_cr
(
" class space "
SIZE_FORMAT
"K, used "
SIZE_FORMAT
"K,"
" reserved "
SIZE_FORMAT
"K"
,
capacity_in_bytes
(
ct
)
/
K
,
used_in_bytes
_unsafe
(
ct
)
/
K
,
reserved_in_bytes
(
ct
)
/
K
);
capacity_in_bytes
(
ct
)
/
K
,
used_in_bytes
(
ct
)
/
K
,
reserved_in_bytes
(
ct
)
/
K
);
}
// Print information for class space and data space separately.
...
...
src/share/vm/memory/metaspace.hpp
浏览文件 @
308bc6bf
...
...
@@ -149,10 +149,6 @@ class MetaspaceAux : AllStatic {
// Statistics for class space and data space in metaspace.
static
size_t
used_in_bytes
(
Metaspace
::
MetadataType
mdtype
);
// Same as used_in_bytes() without the consistency checking.
// Use this version if not at a safepoint (so consistency is
// not necessarily expected).
static
size_t
used_in_bytes_unsafe
(
Metaspace
::
MetadataType
mdtype
);
static
size_t
free_in_bytes
(
Metaspace
::
MetadataType
mdtype
);
static
size_t
capacity_in_bytes
(
Metaspace
::
MetadataType
mdtype
);
static
size_t
reserved_in_bytes
(
Metaspace
::
MetadataType
mdtype
);
...
...
@@ -167,11 +163,6 @@ class MetaspaceAux : AllStatic {
used_in_bytes
(
Metaspace
::
NonClassType
);
}
static
size_t
used_in_bytes_unsafe
()
{
return
used_in_bytes_unsafe
(
Metaspace
::
ClassType
)
+
used_in_bytes_unsafe
(
Metaspace
::
NonClassType
);
}
// Total of available space in all Metaspaces
// Total of capacity allocated to all Metaspaces. This includes
// space in Metachunks not yet allocated and in the Metachunk
...
...
src/share/vm/memory/metaspaceCounters.cpp
浏览文件 @
308bc6bf
...
...
@@ -35,7 +35,7 @@ MetaspaceCounters::MetaspaceCounters() {
size_t
min_capacity
=
MetaspaceAux
::
min_chunk_size
();
size_t
max_capacity
=
MetaspaceAux
::
reserved_in_bytes
();
size_t
curr_capacity
=
MetaspaceAux
::
capacity_in_bytes
();
size_t
used
=
MetaspaceAux
::
used_in_bytes
_unsafe
();
size_t
used
=
MetaspaceAux
::
used_in_bytes
();
initialize
(
min_capacity
,
max_capacity
,
curr_capacity
,
used
);
}
...
...
@@ -131,7 +131,7 @@ void MetaspaceCounters::update_capacity() {
void
MetaspaceCounters
::
update_used
()
{
assert
(
UsePerfData
,
"Should not be called unless being used"
);
size_t
used_in_bytes
=
MetaspaceAux
::
used_in_bytes
_unsafe
();
size_t
used_in_bytes
=
MetaspaceAux
::
used_in_bytes
();
_used
->
set_value
(
used_in_bytes
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录