Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
fe82854a
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看板
提交
fe82854a
编写于
10月 05, 2013
作者:
C
coleenp
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
c0488648
cd28ff0d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
21 addition
and
4 deletion
+21
-4
src/share/vm/classfile/javaClasses.cpp
src/share/vm/classfile/javaClasses.cpp
+19
-3
src/share/vm/prims/jvmtiRedefineClasses.cpp
src/share/vm/prims/jvmtiRedefineClasses.cpp
+2
-1
未找到文件。
src/share/vm/classfile/javaClasses.cpp
浏览文件 @
fe82854a
...
...
@@ -1376,8 +1376,15 @@ char* java_lang_Throwable::print_stack_element_to_buffer(Handle mirror,
const
char
*
klass_name
=
holder
->
external_name
();
int
buf_len
=
(
int
)
strlen
(
klass_name
);
//
pushing to the stack trace added one.
//
The method id may point to an obsolete method, can't get more stack information
Method
*
method
=
holder
->
method_with_idnum
(
method_id
);
if
(
method
==
NULL
)
{
char
*
buf
=
NEW_RESOURCE_ARRAY
(
char
,
buf_len
+
64
);
// This is what the java code prints in this case - added Redefined
sprintf
(
buf
,
"
\t
at %s.null (Redefined)"
,
klass_name
);
return
buf
;
}
char
*
method_name
=
method
->
name
()
->
as_C_string
();
buf_len
+=
(
int
)
strlen
(
method_name
);
...
...
@@ -1773,7 +1780,8 @@ oop java_lang_Throwable::get_stack_trace_element(oop throwable, int index, TRAPS
return
element
;
}
oop
java_lang_StackTraceElement
::
create
(
Handle
mirror
,
int
method_id
,
int
version
,
int
bci
,
TRAPS
)
{
oop
java_lang_StackTraceElement
::
create
(
Handle
mirror
,
int
method_id
,
int
version
,
int
bci
,
TRAPS
)
{
// Allocate java.lang.StackTraceElement instance
Klass
*
k
=
SystemDictionary
::
StackTraceElement_klass
();
assert
(
k
!=
NULL
,
"must be loaded in 1.4+"
);
...
...
@@ -1790,8 +1798,16 @@ oop java_lang_StackTraceElement::create(Handle mirror, int method_id, int versio
oop
classname
=
StringTable
::
intern
((
char
*
)
str
,
CHECK_0
);
java_lang_StackTraceElement
::
set_declaringClass
(
element
(),
classname
);
// Fill in method name
Method
*
method
=
holder
->
method_with_idnum
(
method_id
);
// Method on stack may be obsolete because it was redefined so cannot be
// found by idnum.
if
(
method
==
NULL
)
{
// leave name and fileName null
java_lang_StackTraceElement
::
set_lineNumber
(
element
(),
-
1
);
return
element
();
}
// Fill in method name
oop
methodname
=
StringTable
::
intern
(
method
->
name
(),
CHECK_0
);
java_lang_StackTraceElement
::
set_methodName
(
element
(),
methodname
);
...
...
src/share/vm/prims/jvmtiRedefineClasses.cpp
浏览文件 @
fe82854a
...
...
@@ -2931,7 +2931,8 @@ void VM_RedefineClasses::check_methods_and_mark_as_obsolete(
old_method
->
set_is_obsolete
();
obsolete_count
++
;
// obsolete methods need a unique idnum
// obsolete methods need a unique idnum so they become new entries in
// the jmethodID cache in InstanceKlass
u2
num
=
InstanceKlass
::
cast
(
_the_class_oop
)
->
next_method_idnum
();
if
(
num
!=
ConstMethod
::
UNSET_IDNUM
)
{
old_method
->
set_method_idnum
(
num
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录