Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
77016965
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看板
提交
77016965
编写于
2月 13, 2012
作者:
T
twisti
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7141329: Strange values of stack_size in -XX:+TraceMethodHandles output
Reviewed-by: kvn, never
上级
e3cecb62
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
19 addition
and
47 deletion
+19
-47
src/cpu/x86/vm/methodHandles_x86.cpp
src/cpu/x86/vm/methodHandles_x86.cpp
+19
-47
未找到文件。
src/cpu/x86/vm/methodHandles_x86.cpp
浏览文件 @
77016965
...
...
@@ -1018,41 +1018,26 @@ extern "C" void print_method_handle(oop mh);
void
trace_method_handle_stub
(
const
char
*
adaptername
,
oop
mh
,
intptr_t
*
saved_regs
,
intptr_t
*
entry_sp
,
intptr_t
*
saved_sp
,
intptr_t
*
saved_bp
)
{
intptr_t
*
entry_sp
)
{
// called as a leaf from native code: do not block the JVM!
bool
has_mh
=
(
strstr
(
adaptername
,
"return/"
)
==
NULL
);
// return adapters don't have rcx_mh
const
char
*
mh_reg_name
=
has_mh
?
"rcx_mh"
:
"rcx"
;
tty
->
print_cr
(
"MH %s %s="
PTR_FORMAT
" sp="
PTR_FORMAT
,
adaptername
,
mh_reg_name
,
mh
,
entry_sp
);
intptr_t
*
last_sp
=
(
intptr_t
*
)
saved_bp
[
frame
::
interpreter_frame_last_sp_offset
];
intptr_t
*
base_sp
=
last_sp
;
typedef
MethodHandles
::
RicochetFrame
RicochetFrame
;
RicochetFrame
*
rfp
=
(
RicochetFrame
*
)((
address
)
saved_bp
-
RicochetFrame
::
sender_link_offset_in_bytes
());
if
(
Universe
::
heap
()
->
is_in
((
address
)
rfp
->
saved_args_base
()))
{
// Probably an interpreter frame.
base_sp
=
(
intptr_t
*
)
saved_bp
[
frame
::
interpreter_frame_monitor_block_top_offset
];
}
intptr_t
mh_reg
=
(
intptr_t
)
mh
;
const
char
*
mh_reg_name
=
"rcx_mh"
;
if
(
!
has_mh
)
mh_reg_name
=
"rcx"
;
tty
->
print_cr
(
"MH %s %s="
PTR_FORMAT
" sp=("
PTR_FORMAT
"+"
INTX_FORMAT
") stack_size="
INTX_FORMAT
" bp="
PTR_FORMAT
,
adaptername
,
mh_reg_name
,
mh_reg
,
(
intptr_t
)
entry_sp
,
(
intptr_t
)(
saved_sp
-
entry_sp
),
(
intptr_t
)(
base_sp
-
last_sp
),
(
intptr_t
)
saved_bp
);
if
(
Verbose
)
{
tty
->
print
(
" reg dump: "
);
int
saved_regs_count
=
(
entry_sp
-
1
)
-
saved_regs
;
// 32 bit: rdi rsi rbp rsp; rbx rdx rcx (*) rax
int
i
;
for
(
i
=
0
;
i
<=
saved_regs_count
;
i
++
)
{
if
(
i
>
0
&&
i
%
4
==
0
&&
i
!=
saved_regs_count
)
{
tty
->
print_cr
(
"Registers:"
);
const
int
saved_regs_count
=
RegisterImpl
::
number_of_registers
;
for
(
int
i
=
0
;
i
<
saved_regs_count
;
i
++
)
{
Register
r
=
as_Register
(
i
);
// The registers are stored in reverse order on the stack (by pusha).
tty
->
print
(
"%3s="
PTR_FORMAT
,
r
->
name
(),
saved_regs
[((
saved_regs_count
-
1
)
-
i
)]);
if
((
i
+
1
)
%
4
==
0
)
{
tty
->
cr
();
tty
->
print
(
" + dump: "
);
}
else
{
tty
->
print
(
", "
);
}
tty
->
print
(
" %d: "
PTR_FORMAT
,
i
,
saved_regs
[
i
]);
}
tty
->
cr
();
if
(
last_sp
!=
saved_sp
&&
last_sp
!=
NULL
)
tty
->
print_cr
(
"*** last_sp="
PTR_FORMAT
,
(
intptr_t
)
last_sp
);
{
// dumping last frame with frame::describe
...
...
@@ -1102,14 +1087,7 @@ void trace_method_handle_stub(const char* adaptername,
values
.
describe
(
-
1
,
dump_sp
,
"sp for #1"
);
}
// mark saved_sp if seems valid
if
(
has_mh
)
{
if
((
saved_sp
>=
dump_sp
-
UNREASONABLE_STACK_MOVE
)
&&
(
saved_sp
<
dump_fp
))
{
values
.
describe
(
-
1
,
saved_sp
,
"*saved_sp"
);
}
}
tty
->
print_cr
(
" stack layout:"
);
tty
->
print_cr
(
"Stack layout:"
);
values
.
print
(
p
);
}
if
(
has_mh
)
...
...
@@ -1125,16 +1103,12 @@ struct MethodHandleStubArguments {
oopDesc
*
mh
;
intptr_t
*
saved_regs
;
intptr_t
*
entry_sp
;
intptr_t
*
saved_sp
;
intptr_t
*
saved_bp
;
};
void
trace_method_handle_stub_wrapper
(
MethodHandleStubArguments
*
args
)
{
trace_method_handle_stub
(
args
->
adaptername
,
args
->
mh
,
args
->
saved_regs
,
args
->
entry_sp
,
args
->
saved_sp
,
args
->
saved_bp
);
args
->
entry_sp
);
}
void
MethodHandles
::
trace_method_handle
(
MacroAssembler
*
_masm
,
const
char
*
adaptername
)
{
...
...
@@ -1157,20 +1131,18 @@ void MethodHandles::trace_method_handle(MacroAssembler* _masm, const char* adapt
__
fst_d
(
Address
(
rsp
,
0
));
}
//
i
ncoming state:
//
I
ncoming state:
// rcx: method handle
// r13 or rsi: saved sp
// To avoid calling convention issues, build a record on the stack and pass the pointer to that instead.
// Note: fix the increment below if pushing more arguments
__
push
(
rbp
);
// saved_bp
__
push
(
saved_last_sp_register
());
// saved_sp
//
// To avoid calling convention issues, build a record on the stack
// and pass the pointer to that instead.
__
push
(
rbp
);
// entry_sp (with extra align space)
__
push
(
rbx
);
// pusha saved_regs
__
push
(
rcx
);
// mh
__
push
(
rcx
);
// slot for adaptername
__
movptr
(
Address
(
rsp
,
0
),
(
intptr_t
)
adaptername
);
__
super_call_VM_leaf
(
CAST_FROM_FN_PTR
(
address
,
trace_method_handle_stub_wrapper
),
rsp
);
__
increment
(
rsp
,
6
*
wordSize
);
// MethodHandleStubArguments
__
increment
(
rsp
,
sizeof
(
MethodHandleStubArguments
));
if
(
UseSSE
>=
2
)
{
__
movdbl
(
xmm0
,
Address
(
rsp
,
0
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录