Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
8a1bb301
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看板
提交
8a1bb301
编写于
10月 18, 2013
作者:
D
dsamersoff
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
59598eb3
8bf2ea5c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
47 addition
and
2 deletion
+47
-2
agent/src/share/classes/sun/jvm/hotspot/oops/ConstMethod.java
...t/src/share/classes/sun/jvm/hotspot/oops/ConstMethod.java
+45
-2
src/share/vm/runtime/vmStructs.cpp
src/share/vm/runtime/vmStructs.cpp
+2
-0
未找到文件。
agent/src/share/classes/sun/jvm/hotspot/oops/ConstMethod.java
浏览文件 @
8a1bb301
...
...
@@ -51,6 +51,7 @@ public class ConstMethod extends VMObject {
private
static
int
HAS_GENERIC_SIGNATURE
;
private
static
int
HAS_METHOD_ANNOTATIONS
;
private
static
int
HAS_PARAMETER_ANNOTATIONS
;
private
static
int
HAS_METHOD_PARAMETERS
;
private
static
int
HAS_DEFAULT_ANNOTATIONS
;
private
static
int
HAS_TYPE_ANNOTATIONS
;
...
...
@@ -70,6 +71,7 @@ public class ConstMethod extends VMObject {
HAS_GENERIC_SIGNATURE
=
db
.
lookupIntConstant
(
"ConstMethod::_has_generic_signature"
).
intValue
();
HAS_METHOD_ANNOTATIONS
=
db
.
lookupIntConstant
(
"ConstMethod::_has_method_annotations"
).
intValue
();
HAS_PARAMETER_ANNOTATIONS
=
db
.
lookupIntConstant
(
"ConstMethod::_has_parameter_annotations"
).
intValue
();
HAS_METHOD_PARAMETERS
=
db
.
lookupIntConstant
(
"ConstMethod::_has_method_parameters"
).
intValue
();
HAS_DEFAULT_ANNOTATIONS
=
db
.
lookupIntConstant
(
"ConstMethod::_has_default_annotations"
).
intValue
();
HAS_TYPE_ANNOTATIONS
=
db
.
lookupIntConstant
(
"ConstMethod::_has_type_annotations"
).
intValue
();
...
...
@@ -85,6 +87,9 @@ public class ConstMethod extends VMObject {
// start of byte code
bytecodeOffset
=
type
.
getSize
();
type
=
db
.
lookupType
(
"MethodParametersElement"
);
methodParametersElementSize
=
type
.
getSize
();
type
=
db
.
lookupType
(
"CheckedExceptionElement"
);
checkedExceptionElementSize
=
type
.
getSize
();
...
...
@@ -113,7 +118,7 @@ public class ConstMethod extends VMObject {
// start of bytecode
private
static
long
bytecodeOffset
;
private
static
long
methodParametersElementSize
;
private
static
long
checkedExceptionElementSize
;
private
static
long
localVariableTableElementSize
;
private
static
long
exceptionTableElementSize
;
...
...
@@ -387,6 +392,10 @@ public class ConstMethod extends VMObject {
return
ret
;
}
private
boolean
hasMethodParameters
()
{
return
(
getFlags
()
&
HAS_METHOD_PARAMETERS
)
!=
0
;
}
private
boolean
hasGenericSignature
()
{
return
(
getFlags
()
&
HAS_GENERIC_SIGNATURE
)
!=
0
;
}
...
...
@@ -442,11 +451,41 @@ public class ConstMethod extends VMObject {
return
offsetOfLastU2Element
();
}
private
long
offsetOfCheckedExceptionsLength
()
{
private
long
offsetOfMethodParametersLength
()
{
if
(
Assert
.
ASSERTS_ENABLED
)
{
Assert
.
that
(
hasMethodParameters
(),
"should only be called if table is present"
);
}
return
hasGenericSignature
()
?
offsetOfLastU2Element
()
-
sizeofShort
:
offsetOfLastU2Element
();
}
private
int
getMethodParametersLength
()
{
if
(
hasMethodParameters
())
return
(
int
)
getAddress
().
getCIntegerAt
(
offsetOfMethodParametersLength
(),
2
,
true
);
else
return
0
;
}
// Offset of start of checked exceptions
private
long
offsetOfMethodParameters
()
{
long
offset
=
offsetOfMethodParametersLength
();
long
length
=
getMethodParametersLength
();
if
(
Assert
.
ASSERTS_ENABLED
)
{
Assert
.
that
(
length
>
0
,
"should only be called if method parameter information is present"
);
}
offset
-=
length
*
methodParametersElementSize
;
return
offset
;
}
private
long
offsetOfCheckedExceptionsLength
()
{
if
(
hasMethodParameters
())
return
offsetOfMethodParameters
()
-
sizeofShort
;
else
{
return
hasGenericSignature
()
?
offsetOfLastU2Element
()
-
sizeofShort
:
offsetOfLastU2Element
();
}
}
private
int
getCheckedExceptionsLength
()
{
if
(
hasCheckedExceptions
())
{
return
(
int
)
getAddress
().
getCIntegerAt
(
offsetOfCheckedExceptionsLength
(),
2
,
true
);
...
...
@@ -496,6 +535,8 @@ public class ConstMethod extends VMObject {
return
offsetOfExceptionTable
()
-
sizeofShort
;
}
else
if
(
hasCheckedExceptions
())
{
return
offsetOfCheckedExceptions
()
-
sizeofShort
;
}
else
if
(
hasMethodParameters
())
{
return
offsetOfMethodParameters
()
-
sizeofShort
;
}
else
{
return
hasGenericSignature
()
?
offsetOfLastU2Element
()
-
sizeofShort
:
offsetOfLastU2Element
();
...
...
@@ -526,6 +567,8 @@ public class ConstMethod extends VMObject {
}
if
(
hasCheckedExceptions
())
{
return
offsetOfCheckedExceptions
()
-
sizeofShort
;
}
else
if
(
hasMethodParameters
())
{
return
offsetOfMethodParameters
()
-
sizeofShort
;
}
else
{
return
hasGenericSignature
()
?
offsetOfLastU2Element
()
-
sizeofShort
:
offsetOfLastU2Element
();
...
...
src/share/vm/runtime/vmStructs.cpp
浏览文件 @
8a1bb301
...
...
@@ -1465,6 +1465,7 @@ typedef BinaryTreeDictionary<Metablock, FreeList> MetablockTreeDictionary;
declare_toplevel_type(CheckedExceptionElement) \
declare_toplevel_type(LocalVariableTableElement) \
declare_toplevel_type(ExceptionTableElement) \
declare_toplevel_type(MethodParametersElement) \
\
declare_toplevel_type(ClassLoaderData) \
declare_toplevel_type(ClassLoaderDataGraph) \
...
...
@@ -2337,6 +2338,7 @@ typedef BinaryTreeDictionary<Metablock, FreeList> MetablockTreeDictionary;
declare_constant(ConstMethod::_has_localvariable_table) \
declare_constant(ConstMethod::_has_exception_table) \
declare_constant(ConstMethod::_has_generic_signature) \
declare_constant(ConstMethod::_has_method_parameters) \
declare_constant(ConstMethod::_has_method_annotations) \
declare_constant(ConstMethod::_has_parameter_annotations) \
declare_constant(ConstMethod::_has_default_annotations) \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录