Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
2d329ef0
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看板
提交
2d329ef0
编写于
3月 03, 2015
作者:
K
kevinw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8073688: Infinite loop reading types during jmap attach.
Reviewed-by: dsamersoff, sla
上级
9e700575
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
41 addition
and
6 deletion
+41
-6
agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java
...rc/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java
+41
-6
未找到文件。
agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java
浏览文件 @
2d329ef0
...
...
@@ -51,6 +51,9 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
private
static
final
int
C_INT32_SIZE
=
4
;
private
static
final
int
C_INT64_SIZE
=
8
;
private
static
int
pointerSize
=
UNINITIALIZED_SIZE
;
// Counter to ensure read loops terminate:
private
static
final
int
MAX_DUPLICATE_DEFINITIONS
=
100
;
private
int
duplicateDefCount
=
0
;
private
static
final
boolean
DEBUG
;
static
{
...
...
@@ -166,6 +169,10 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
typeEntrySizeOffset
=
getLongValueFromProcess
(
"gHotSpotVMTypeEntrySizeOffset"
);
typeEntryArrayStride
=
getLongValueFromProcess
(
"gHotSpotVMTypeEntryArrayStride"
);
if
(
typeEntryArrayStride
==
0L
)
{
throw
new
RuntimeException
(
"zero stride: cannot read types."
);
}
// Start iterating down it until we find an entry with no name
Address
typeNameAddr
=
null
;
do
{
...
...
@@ -192,7 +199,11 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
}
entryAddr
=
entryAddr
.
addOffsetTo
(
typeEntryArrayStride
);
}
while
(
typeNameAddr
!=
null
);
}
while
(
typeNameAddr
!=
null
&&
duplicateDefCount
<
MAX_DUPLICATE_DEFINITIONS
);
if
(
duplicateDefCount
>=
MAX_DUPLICATE_DEFINITIONS
)
{
throw
new
RuntimeException
(
"too many duplicate definitions"
);
}
}
private
void
initializePrimitiveTypes
()
{
...
...
@@ -395,6 +406,10 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
structEntryAddressOffset
=
getLongValueFromProcess
(
"gHotSpotVMStructEntryAddressOffset"
);
structEntryArrayStride
=
getLongValueFromProcess
(
"gHotSpotVMStructEntryArrayStride"
);
if
(
structEntryArrayStride
==
0L
)
{
throw
new
RuntimeException
(
"zero stride: cannot read types."
);
}
// Fetch the address of the VMStructEntry*
Address
entryAddr
=
lookupInProcess
(
"gHotSpotVMStructs"
);
// Dereference this once to get the pointer to the first VMStructEntry
...
...
@@ -472,6 +487,11 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
intConstantEntryValueOffset
=
getLongValueFromProcess
(
"gHotSpotVMIntConstantEntryValueOffset"
);
intConstantEntryArrayStride
=
getLongValueFromProcess
(
"gHotSpotVMIntConstantEntryArrayStride"
);
if
(
intConstantEntryArrayStride
==
0L
)
{
throw
new
RuntimeException
(
"zero stride: cannot read types."
);
}
// Fetch the address of the VMIntConstantEntry*
Address
entryAddr
=
lookupInProcess
(
"gHotSpotVMIntConstants"
);
// Dereference this once to get the pointer to the first VMIntConstantEntry
...
...
@@ -501,12 +521,17 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
}
else
{
System
.
err
.
println
(
"Warning: the int constant \""
+
name
+
"\" (declared in the remote VM in VMStructs::localHotSpotVMIntConstants) "
+
"had its value declared as "
+
value
+
" twice. Continuing."
);
duplicateDefCount
++;
}
}
}
entryAddr
=
entryAddr
.
addOffsetTo
(
intConstantEntryArrayStride
);
}
while
(
nameAddr
!=
null
);
}
while
(
nameAddr
!=
null
&&
duplicateDefCount
<
MAX_DUPLICATE_DEFINITIONS
);
if
(
duplicateDefCount
>=
MAX_DUPLICATE_DEFINITIONS
)
{
throw
new
RuntimeException
(
"too many duplicate definitions"
);
}
}
private
void
readVMLongConstants
()
{
...
...
@@ -519,6 +544,10 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
longConstantEntryValueOffset
=
getLongValueFromProcess
(
"gHotSpotVMLongConstantEntryValueOffset"
);
longConstantEntryArrayStride
=
getLongValueFromProcess
(
"gHotSpotVMLongConstantEntryArrayStride"
);
if
(
longConstantEntryArrayStride
==
0L
)
{
throw
new
RuntimeException
(
"zero stride: cannot read types."
);
}
// Fetch the address of the VMLongConstantEntry*
Address
entryAddr
=
lookupInProcess
(
"gHotSpotVMLongConstants"
);
// Dereference this once to get the pointer to the first VMLongConstantEntry
...
...
@@ -548,12 +577,17 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
}
else
{
System
.
err
.
println
(
"Warning: the long constant \""
+
name
+
"\" (declared in the remote VM in VMStructs::localHotSpotVMLongConstants) "
+
"had its value declared as "
+
value
+
" twice. Continuing."
);
duplicateDefCount
++;
}
}
}
entryAddr
=
entryAddr
.
addOffsetTo
(
longConstantEntryArrayStride
);
}
while
(
nameAddr
!=
null
);
}
while
(
nameAddr
!=
null
&&
duplicateDefCount
<
MAX_DUPLICATE_DEFINITIONS
);
if
(
duplicateDefCount
>=
MAX_DUPLICATE_DEFINITIONS
)
{
throw
new
RuntimeException
(
"too many duplicate definitions."
);
}
}
private
BasicType
lookupOrFail
(
String
typeName
)
{
...
...
@@ -740,9 +774,10 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
}
if
(!
typeNameIsPointerType
(
typeName
))
{
System
.
err
.
println
(
"Warning: the type \""
+
typeName
+
"\" (declared in the remote VM in VMStructs::localHotSpotVMTypes) "
+
"had its size declared as "
+
size
+
" twice. Continuing."
);
}
System
.
err
.
println
(
"Warning: the type \""
+
typeName
+
"\" (declared in the remote VM in VMStructs::localHotSpotVMTypes) "
+
"had its size declared as "
+
size
+
" twice. Continuing."
);
duplicateDefCount
++;
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录