Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
0cdc0d61
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,发现更多精彩内容 >>
提交
0cdc0d61
编写于
3月 21, 2014
作者:
E
ehelin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8036701: Add trace event when a metaspace throws out of memory error
Reviewed-by: stefank, mgerdin
上级
b81066f5
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
39 addition
and
4 deletion
+39
-4
src/share/vm/memory/metaspace.cpp
src/share/vm/memory/metaspace.cpp
+4
-2
src/share/vm/memory/metaspace.hpp
src/share/vm/memory/metaspace.hpp
+1
-1
src/share/vm/memory/metaspaceTracer.cpp
src/share/vm/memory/metaspaceTracer.cpp
+16
-1
src/share/vm/memory/metaspaceTracer.hpp
src/share/vm/memory/metaspaceTracer.hpp
+10
-0
src/share/vm/trace/trace.xml
src/share/vm/trace/trace.xml
+8
-0
未找到文件。
src/share/vm/memory/metaspace.cpp
浏览文件 @
0cdc0d61
...
...
@@ -3370,7 +3370,7 @@ MetaWord* Metaspace::allocate(ClassLoaderData* loader_data, size_t word_size,
}
if
(
result
==
NULL
)
{
report_metadata_oome
(
loader_data
,
word_size
,
mdtype
,
CHECK_NULL
);
report_metadata_oome
(
loader_data
,
word_size
,
type
,
mdtype
,
CHECK_NULL
);
}
// Zero initialize.
...
...
@@ -3384,7 +3384,9 @@ size_t Metaspace::class_chunk_size(size_t word_size) {
return
class_vsm
()
->
calc_chunk_size
(
word_size
);
}
void
Metaspace
::
report_metadata_oome
(
ClassLoaderData
*
loader_data
,
size_t
word_size
,
MetadataType
mdtype
,
TRAPS
)
{
void
Metaspace
::
report_metadata_oome
(
ClassLoaderData
*
loader_data
,
size_t
word_size
,
MetaspaceObj
::
Type
type
,
MetadataType
mdtype
,
TRAPS
)
{
tracer
()
->
report_metadata_oom
(
loader_data
,
word_size
,
type
,
mdtype
);
// If result is still null, we are out of memory.
if
(
Verbose
&&
TraceMetadataChunkAllocation
)
{
gclog_or_tty
->
print_cr
(
"Metaspace allocation failed for size "
...
...
src/share/vm/memory/metaspace.hpp
浏览文件 @
0cdc0d61
...
...
@@ -238,7 +238,7 @@ class Metaspace : public CHeapObj<mtClass> {
static
void
purge
();
static
void
report_metadata_oome
(
ClassLoaderData
*
loader_data
,
size_t
word_size
,
MetadataType
mdtype
,
TRAPS
);
Meta
spaceObj
::
Type
type
,
Meta
dataType
mdtype
,
TRAPS
);
static
const
char
*
metadata_type_name
(
Metaspace
::
MetadataType
mdtype
);
...
...
src/share/vm/memory/metaspaceTracer.cpp
浏览文件 @
0cdc0d61
...
...
@@ -44,7 +44,22 @@ void MetaspaceTracer::report_metaspace_allocation_failure(ClassLoaderData *cld,
size_t
word_size
,
MetaspaceObj
::
Type
objtype
,
Metaspace
::
MetadataType
mdtype
)
const
{
EventMetaspaceAllocationFailure
event
;
send_allocation_failure_event
<
EventMetaspaceAllocationFailure
>
(
cld
,
word_size
,
objtype
,
mdtype
);
}
void
MetaspaceTracer
::
report_metadata_oom
(
ClassLoaderData
*
cld
,
size_t
word_size
,
MetaspaceObj
::
Type
objtype
,
Metaspace
::
MetadataType
mdtype
)
const
{
send_allocation_failure_event
<
EventMetaspaceOOM
>
(
cld
,
word_size
,
objtype
,
mdtype
);
}
template
<
typename
E
>
void
MetaspaceTracer
::
send_allocation_failure_event
(
ClassLoaderData
*
cld
,
size_t
word_size
,
MetaspaceObj
::
Type
objtype
,
Metaspace
::
MetadataType
mdtype
)
const
{
E
event
;
if
(
event
.
should_commit
())
{
if
(
cld
->
is_anonymous
())
{
event
.
set_classLoader
(
NULL
);
...
...
src/share/vm/memory/metaspaceTracer.hpp
浏览文件 @
0cdc0d61
...
...
@@ -32,6 +32,11 @@
class
ClassLoaderData
;
class
MetaspaceTracer
:
public
CHeapObj
<
mtTracing
>
{
template
<
typename
E
>
void
send_allocation_failure_event
(
ClassLoaderData
*
cld
,
size_t
word_size
,
MetaspaceObj
::
Type
objtype
,
Metaspace
::
MetadataType
mdtype
)
const
;
public:
void
report_gc_threshold
(
size_t
old_val
,
size_t
new_val
,
...
...
@@ -40,6 +45,11 @@ class MetaspaceTracer : public CHeapObj<mtTracing> {
size_t
word_size
,
MetaspaceObj
::
Type
objtype
,
Metaspace
::
MetadataType
mdtype
)
const
;
void
report_metadata_oom
(
ClassLoaderData
*
cld
,
size_t
word_size
,
MetaspaceObj
::
Type
objtype
,
Metaspace
::
MetadataType
mdtype
)
const
;
};
#endif // SHARE_VM_MEMORY_METASPACE_TRACER_HPP
src/share/vm/trace/trace.xml
浏览文件 @
0cdc0d61
...
...
@@ -213,6 +213,14 @@ Declares a structure type that can be used in other events.
<value
type=
"METASPACEOBJTYPE"
field=
"metaspaceObjectType"
label=
"Metaspace Object Type"
/>
</event>
<event
id=
"MetaspaceOOM"
path=
"vm/gc/metaspace/out_of_memory"
label=
"Metaspace Out of Memory"
is_instant=
"true"
has_stacktrace=
"true"
>
<value
type=
"CLASS"
field=
"classLoader"
label=
"Class Loader"
/>
<value
type=
"BOOLEAN"
field=
"anonymousClassLoader"
label=
"Anonymous Class Loader"
/>
<value
type=
"BYTES64"
field=
"size"
label=
"Size"
/>
<value
type=
"METADATATYPE"
field=
"metadataType"
label=
"Metadata Type"
/>
<value
type=
"METASPACEOBJTYPE"
field=
"metaspaceObjectType"
label=
"Metaspace Object Type"
/>
</event>
<event
id=
"PSHeapSummary"
path=
"vm/gc/heap/ps_summary"
label=
"Parallel Scavenge Heap Summary"
is_instant=
"true"
>
<value
type=
"UINT"
field=
"gcId"
label=
"GC ID"
relation=
"GC_ID"
/>
<value
type=
"GCWHEN"
field=
"when"
label=
"When"
/>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录