Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
7b8f4d16
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看板
提交
7b8f4d16
编写于
10月 01, 2018
作者:
S
shade
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8211239: Build fails without JFR: empty JFR events signatures mismatch
Reviewed-by: mgronlun, dholmes
上级
8d36b439
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
85 addition
and
92 deletion
+85
-92
src/share/vm/jfr/GenerateJfrFiles.java
src/share/vm/jfr/GenerateJfrFiles.java
+85
-92
未找到文件。
src/share/vm/jfr/GenerateJfrFiles.java
浏览文件 @
7b8f4d16
...
@@ -478,6 +478,7 @@ public class GenerateJfrFiles {
...
@@ -478,6 +478,7 @@ public class GenerateJfrFiles {
out
.
write
(
""
);
out
.
write
(
""
);
out
.
write
(
"#else // !INCLUDE_JFR"
);
out
.
write
(
"#else // !INCLUDE_JFR"
);
out
.
write
(
""
);
out
.
write
(
""
);
out
.
write
(
"template <typename T>"
);
out
.
write
(
"class JfrEvent {"
);
out
.
write
(
"class JfrEvent {"
);
out
.
write
(
" public:"
);
out
.
write
(
" public:"
);
out
.
write
(
" JfrEvent() {}"
);
out
.
write
(
" JfrEvent() {}"
);
...
@@ -498,80 +499,49 @@ public class GenerateJfrFiles {
...
@@ -498,80 +499,49 @@ public class GenerateJfrFiles {
private
static
void
printTypes
(
Printer
out
,
Metadata
metadata
,
boolean
empty
)
{
private
static
void
printTypes
(
Printer
out
,
Metadata
metadata
,
boolean
empty
)
{
for
(
TypeElement
t
:
metadata
.
getStructs
())
{
for
(
TypeElement
t
:
metadata
.
getStructs
())
{
if
(
empty
)
{
printType
(
out
,
t
,
empty
);
out
.
write
(
""
);
printEmptyType
(
out
,
t
);
}
else
{
printType
(
out
,
t
);
}
out
.
write
(
""
);
out
.
write
(
""
);
}
}
for
(
EventElement
e
:
metadata
.
getEvents
())
{
for
(
EventElement
e
:
metadata
.
getEvents
())
{
if
(
empty
)
{
printEvent
(
out
,
e
,
empty
);
printEmptyEvent
(
out
,
e
);
}
else
{
printEvent
(
out
,
e
);
}
out
.
write
(
""
);
out
.
write
(
""
);
}
}
}
}
private
static
void
printEmptyEvent
(
Printer
out
,
EventElement
event
)
{
private
static
void
printType
(
Printer
out
,
TypeElement
t
,
boolean
empty
)
{
out
.
write
(
"class Event"
+
event
.
name
+
" : public JfrEvent"
);
out
.
write
(
"{"
);
out
.
write
(
" public:"
);
out
.
write
(
" Event"
+
event
.
name
+
"(EventStartTime ignore=TIMED) {}"
);
if
(
event
.
startTime
)
{
StringJoiner
sj
=
new
StringJoiner
(
",\n "
);
for
(
FieldElement
f
:
event
.
fields
)
{
sj
.
add
(
f
.
getParameterType
());
}
out
.
write
(
" Event"
+
event
.
name
+
"("
);
out
.
write
(
" "
+
sj
.
toString
()
+
") { }"
);
}
for
(
FieldElement
f
:
event
.
fields
)
{
out
.
write
(
" void set_"
+
f
.
name
+
"("
+
f
.
getParameterType
()
+
") { }"
);
}
out
.
write
(
"};"
);
}
private
static
void
printEmptyType
(
Printer
out
,
TypeElement
t
)
{
out
.
write
(
"struct JfrStruct"
+
t
.
name
);
out
.
write
(
"{"
);
out
.
write
(
" public:"
);
for
(
FieldElement
f
:
t
.
fields
)
{
out
.
write
(
" void set_"
+
f
.
name
+
"("
+
f
.
getParameterType
()
+
") { }"
);
}
out
.
write
(
"};"
);
}
private
static
void
printType
(
Printer
out
,
TypeElement
t
)
{
out
.
write
(
"struct JfrStruct"
+
t
.
name
);
out
.
write
(
"struct JfrStruct"
+
t
.
name
);
out
.
write
(
"{"
);
out
.
write
(
"{"
);
if
(!
empty
)
{
out
.
write
(
" private:"
);
out
.
write
(
" private:"
);
for
(
FieldElement
f
:
t
.
fields
)
{
for
(
FieldElement
f
:
t
.
fields
)
{
printField
(
out
,
f
);
printField
(
out
,
f
);
}
}
out
.
write
(
""
);
out
.
write
(
""
);
}
out
.
write
(
" public:"
);
out
.
write
(
" public:"
);
for
(
FieldElement
f
:
t
.
fields
)
{
for
(
FieldElement
f
:
t
.
fields
)
{
printTypeSetter
(
out
,
f
);
printTypeSetter
(
out
,
f
,
empty
);
}
}
out
.
write
(
""
);
out
.
write
(
""
);
if
(!
empty
)
{
printWriteData
(
out
,
t
.
fields
);
printWriteData
(
out
,
t
.
fields
);
}
out
.
write
(
"};"
);
out
.
write
(
"};"
);
out
.
write
(
""
);
out
.
write
(
""
);
}
}
private
static
void
printEvent
(
Printer
out
,
EventElement
event
)
{
private
static
void
printEvent
(
Printer
out
,
EventElement
event
,
boolean
empty
)
{
out
.
write
(
"class Event"
+
event
.
name
+
" : public JfrEvent<Event"
+
event
.
name
+
">"
);
out
.
write
(
"class Event"
+
event
.
name
+
" : public JfrEvent<Event"
+
event
.
name
+
">"
);
out
.
write
(
"{"
);
out
.
write
(
"{"
);
if
(!
empty
)
{
out
.
write
(
" private:"
);
out
.
write
(
" private:"
);
for
(
FieldElement
f
:
event
.
fields
)
{
for
(
FieldElement
f
:
event
.
fields
)
{
printField
(
out
,
f
);
printField
(
out
,
f
);
}
}
out
.
write
(
""
);
out
.
write
(
""
);
}
out
.
write
(
" public:"
);
out
.
write
(
" public:"
);
if
(!
empty
)
{
out
.
write
(
" static const bool hasThread = "
+
event
.
thread
+
";"
);
out
.
write
(
" static const bool hasThread = "
+
event
.
thread
+
";"
);
out
.
write
(
" static const bool hasStackTrace = "
+
event
.
stackTrace
+
";"
);
out
.
write
(
" static const bool hasStackTrace = "
+
event
.
stackTrace
+
";"
);
out
.
write
(
" static const bool isInstant = "
+
!
event
.
startTime
+
";"
);
out
.
write
(
" static const bool isInstant = "
+
!
event
.
startTime
+
";"
);
...
@@ -579,22 +549,33 @@ public class GenerateJfrFiles {
...
@@ -579,22 +549,33 @@ public class GenerateJfrFiles {
out
.
write
(
" static const bool isRequestable = "
+
event
.
periodic
+
";"
);
out
.
write
(
" static const bool isRequestable = "
+
event
.
periodic
+
";"
);
out
.
write
(
" static const JfrEventId eventId = Jfr"
+
event
.
name
+
"Event;"
);
out
.
write
(
" static const JfrEventId eventId = Jfr"
+
event
.
name
+
"Event;"
);
out
.
write
(
""
);
out
.
write
(
""
);
}
if
(!
empty
)
{
out
.
write
(
" Event"
+
event
.
name
+
"(EventStartTime timing=TIMED) : JfrEvent<Event"
+
event
.
name
+
">(timing) {}"
);
out
.
write
(
" Event"
+
event
.
name
+
"(EventStartTime timing=TIMED) : JfrEvent<Event"
+
event
.
name
+
">(timing) {}"
);
}
else
{
out
.
write
(
" Event"
+
event
.
name
+
"(EventStartTime timing=TIMED) {}"
);
}
out
.
write
(
""
);
out
.
write
(
""
);
int
index
=
0
;
int
index
=
0
;
for
(
FieldElement
f
:
event
.
fields
)
{
for
(
FieldElement
f
:
event
.
fields
)
{
out
.
write
(
" void set_"
+
f
.
name
+
"("
+
f
.
getParameterType
()
+
" "
+
f
.
getParameterName
()
+
") {"
);
out
.
write
(
" void set_"
+
f
.
name
+
"("
+
f
.
getParameterType
()
+
" "
+
f
.
getParameterName
()
+
") {"
);
if
(!
empty
)
{
out
.
write
(
" this->_"
+
f
.
name
+
" = "
+
f
.
getParameterName
()
+
";"
);
out
.
write
(
" this->_"
+
f
.
name
+
" = "
+
f
.
getParameterName
()
+
";"
);
out
.
write
(
" DEBUG_ONLY(set_field_bit("
+
index
++
+
"));"
);
out
.
write
(
" DEBUG_ONLY(set_field_bit("
+
index
++
+
"));"
);
}
out
.
write
(
" }"
);
out
.
write
(
" }"
);
}
}
out
.
write
(
""
);
out
.
write
(
""
);
if
(!
empty
)
{
printWriteData
(
out
,
event
.
fields
);
printWriteData
(
out
,
event
.
fields
);
out
.
write
(
""
);
out
.
write
(
""
);
}
out
.
write
(
" using JfrEvent<Event"
+
event
.
name
+
">::commit; // else commit() is hidden by overloaded versions in this class"
);
out
.
write
(
" using JfrEvent<Event"
+
event
.
name
+
">::commit; // else commit() is hidden by overloaded versions in this class"
);
printConstructor2
(
out
,
event
);
printConstructor2
(
out
,
event
,
empty
);
printCommitMethod
(
out
,
event
);
printCommitMethod
(
out
,
event
,
empty
);
if
(!
empty
)
{
printVerify
(
out
,
event
.
fields
);
printVerify
(
out
,
event
.
fields
);
}
out
.
write
(
"};"
);
out
.
write
(
"};"
);
}
}
...
@@ -611,8 +592,12 @@ public class GenerateJfrFiles {
...
@@ -611,8 +592,12 @@ public class GenerateJfrFiles {
out
.
write
(
" }"
);
out
.
write
(
" }"
);
}
}
private
static
void
printTypeSetter
(
Printer
out
,
FieldElement
field
)
{
private
static
void
printTypeSetter
(
Printer
out
,
FieldElement
field
,
boolean
empty
)
{
if
(!
empty
)
{
out
.
write
(
" void set_"
+
field
.
name
+
"("
+
field
.
getParameterType
()
+
" new_value) { this->_"
+
field
.
name
+
" = new_value; }"
);
out
.
write
(
" void set_"
+
field
.
name
+
"("
+
field
.
getParameterType
()
+
" new_value) { this->_"
+
field
.
name
+
" = new_value; }"
);
}
else
{
out
.
write
(
" void set_"
+
field
.
name
+
"("
+
field
.
getParameterType
()
+
" new_value) { }"
);
}
}
}
private
static
void
printVerify
(
Printer
out
,
List
<
FieldElement
>
fields
)
{
private
static
void
printVerify
(
Printer
out
,
List
<
FieldElement
>
fields
)
{
...
@@ -627,7 +612,7 @@ public class GenerateJfrFiles {
...
@@ -627,7 +612,7 @@ public class GenerateJfrFiles {
out
.
write
(
"#endif"
);
out
.
write
(
"#endif"
);
}
}
private
static
void
printCommitMethod
(
Printer
out
,
EventElement
event
)
{
private
static
void
printCommitMethod
(
Printer
out
,
EventElement
event
,
boolean
empty
)
{
if
(
event
.
startTime
)
{
if
(
event
.
startTime
)
{
StringJoiner
sj
=
new
StringJoiner
(
",\n "
);
StringJoiner
sj
=
new
StringJoiner
(
",\n "
);
for
(
FieldElement
f
:
event
.
fields
)
{
for
(
FieldElement
f
:
event
.
fields
)
{
...
@@ -635,12 +620,14 @@ public class GenerateJfrFiles {
...
@@ -635,12 +620,14 @@ public class GenerateJfrFiles {
}
}
out
.
write
(
""
);
out
.
write
(
""
);
out
.
write
(
" void commit("
+
sj
.
toString
()
+
") {"
);
out
.
write
(
" void commit("
+
sj
.
toString
()
+
") {"
);
if
(!
empty
)
{
out
.
write
(
" if (should_commit()) {"
);
out
.
write
(
" if (should_commit()) {"
);
for
(
FieldElement
f
:
event
.
fields
)
{
for
(
FieldElement
f
:
event
.
fields
)
{
out
.
write
(
" set_"
+
f
.
name
+
"("
+
f
.
name
+
");"
);
out
.
write
(
" set_"
+
f
.
name
+
"("
+
f
.
name
+
");"
);
}
}
out
.
write
(
" commit();"
);
out
.
write
(
" commit();"
);
out
.
write
(
" }"
);
out
.
write
(
" }"
);
}
out
.
write
(
" }"
);
out
.
write
(
" }"
);
}
}
out
.
write
(
""
);
out
.
write
(
""
);
...
@@ -653,6 +640,7 @@ public class GenerateJfrFiles {
...
@@ -653,6 +640,7 @@ public class GenerateJfrFiles {
sj
.
add
(
f
.
getParameterType
()
+
" "
+
f
.
name
);
sj
.
add
(
f
.
getParameterType
()
+
" "
+
f
.
name
);
}
}
out
.
write
(
" static void commit("
+
sj
.
toString
()
+
") {"
);
out
.
write
(
" static void commit("
+
sj
.
toString
()
+
") {"
);
if
(!
empty
)
{
out
.
write
(
" Event"
+
event
.
name
+
" me(UNTIMED);"
);
out
.
write
(
" Event"
+
event
.
name
+
" me(UNTIMED);"
);
out
.
write
(
""
);
out
.
write
(
""
);
out
.
write
(
" if (me.should_commit()) {"
);
out
.
write
(
" if (me.should_commit()) {"
);
...
@@ -665,10 +653,11 @@ public class GenerateJfrFiles {
...
@@ -665,10 +653,11 @@ public class GenerateJfrFiles {
}
}
out
.
write
(
" me.commit();"
);
out
.
write
(
" me.commit();"
);
out
.
write
(
" }"
);
out
.
write
(
" }"
);
}
out
.
write
(
" }"
);
out
.
write
(
" }"
);
}
}
private
static
void
printConstructor2
(
Printer
out
,
EventElement
event
)
{
private
static
void
printConstructor2
(
Printer
out
,
EventElement
event
,
boolean
empty
)
{
if
(!
event
.
startTime
)
{
if
(!
event
.
startTime
)
{
out
.
write
(
""
);
out
.
write
(
""
);
out
.
write
(
""
);
out
.
write
(
""
);
...
@@ -680,12 +669,16 @@ public class GenerateJfrFiles {
...
@@ -680,12 +669,16 @@ public class GenerateJfrFiles {
for
(
FieldElement
f
:
event
.
fields
)
{
for
(
FieldElement
f
:
event
.
fields
)
{
sj
.
add
(
f
.
getParameterType
()
+
" "
+
f
.
name
);
sj
.
add
(
f
.
getParameterType
()
+
" "
+
f
.
name
);
}
}
if
(!
empty
)
{
out
.
write
(
" "
+
sj
.
toString
()
+
") : JfrEvent<Event"
+
event
.
name
+
">(TIMED) {"
);
out
.
write
(
" "
+
sj
.
toString
()
+
") : JfrEvent<Event"
+
event
.
name
+
">(TIMED) {"
);
out
.
write
(
" if (should_commit()) {"
);
out
.
write
(
" if (should_commit()) {"
);
for
(
FieldElement
f
:
event
.
fields
)
{
for
(
FieldElement
f
:
event
.
fields
)
{
out
.
write
(
" set_"
+
f
.
name
+
"("
+
f
.
name
+
");"
);
out
.
write
(
" set_"
+
f
.
name
+
"("
+
f
.
name
+
");"
);
}
}
out
.
write
(
" }"
);
out
.
write
(
" }"
);
}
else
{
out
.
write
(
" "
+
sj
.
toString
()
+
") {"
);
}
out
.
write
(
" }"
);
out
.
write
(
" }"
);
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录