Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
e1af249a
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看板
提交
e1af249a
编写于
10月 25, 2010
作者:
A
acorn
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
f9bc752b
6a30097f
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
1043 addition
and
0 deletion
+1043
-0
src/share/vm/classfile/stackMapTableFormat.hpp
src/share/vm/classfile/stackMapTableFormat.hpp
+916
-0
src/share/vm/includeDB_core
src/share/vm/includeDB_core
+4
-0
src/share/vm/oops/methodOop.hpp
src/share/vm/oops/methodOop.hpp
+4
-0
src/share/vm/runtime/relocator.cpp
src/share/vm/runtime/relocator.cpp
+118
-0
src/share/vm/runtime/relocator.hpp
src/share/vm/runtime/relocator.hpp
+1
-0
未找到文件。
src/share/vm/classfile/stackMapTableFormat.hpp
0 → 100644
浏览文件 @
e1af249a
此差异已折叠。
点击以展开。
src/share/vm/includeDB_core
浏览文件 @
e1af249a
...
@@ -3614,7 +3614,9 @@ relocInfo_<arch>.hpp generate_platform_dependent_include
...
@@ -3614,7 +3614,9 @@ relocInfo_<arch>.hpp generate_platform_dependent_include
relocator.cpp bytecodes.hpp
relocator.cpp bytecodes.hpp
relocator.cpp handles.inline.hpp
relocator.cpp handles.inline.hpp
relocator.cpp oop.inline.hpp
relocator.cpp oop.inline.hpp
relocator.cpp oopFactory.hpp
relocator.cpp relocator.hpp
relocator.cpp relocator.hpp
relocator.cpp stackMapTableFormat.hpp
relocator.cpp universe.inline.hpp
relocator.cpp universe.inline.hpp
relocator.hpp bytecodes.hpp
relocator.hpp bytecodes.hpp
...
@@ -3921,6 +3923,8 @@ stackMapTable.hpp globalDefinitions.hpp
...
@@ -3921,6 +3923,8 @@ stackMapTable.hpp globalDefinitions.hpp
stackMapTable.hpp methodOop.hpp
stackMapTable.hpp methodOop.hpp
stackMapTable.hpp stackMapFrame.hpp
stackMapTable.hpp stackMapFrame.hpp
stackMapTableFormat.hpp verificationType.hpp
stackValue.cpp debugInfo.hpp
stackValue.cpp debugInfo.hpp
stackValue.cpp frame.inline.hpp
stackValue.cpp frame.inline.hpp
stackValue.cpp handles.inline.hpp
stackValue.cpp handles.inline.hpp
...
...
src/share/vm/oops/methodOop.hpp
浏览文件 @
e1af249a
...
@@ -247,6 +247,10 @@ class methodOopDesc : public oopDesc {
...
@@ -247,6 +247,10 @@ class methodOopDesc : public oopDesc {
return
constMethod
()
->
stackmap_data
();
return
constMethod
()
->
stackmap_data
();
}
}
void
set_stackmap_data
(
typeArrayOop
sd
)
{
constMethod
()
->
set_stackmap_data
(
sd
);
}
// exception handler table
// exception handler table
typeArrayOop
exception_table
()
const
typeArrayOop
exception_table
()
const
{
return
constMethod
()
->
exception_table
();
}
{
return
constMethod
()
->
exception_table
();
}
...
...
src/share/vm/runtime/relocator.cpp
浏览文件 @
e1af249a
...
@@ -435,6 +435,120 @@ void Relocator::adjust_local_var_table(int bci, int delta) {
...
@@ -435,6 +435,120 @@ void Relocator::adjust_local_var_table(int bci, int delta) {
}
}
}
}
// Create a new array, copying the src array but adding a hole at
// the specified location
static
typeArrayOop
insert_hole_at
(
size_t
where
,
int
hole_sz
,
typeArrayOop
src
)
{
Thread
*
THREAD
=
Thread
::
current
();
Handle
src_hnd
(
THREAD
,
src
);
typeArrayOop
dst
=
oopFactory
::
new_permanent_byteArray
(
src
->
length
()
+
hole_sz
,
CHECK_NULL
);
src
=
(
typeArrayOop
)
src_hnd
();
address
src_addr
=
(
address
)
src
->
byte_at_addr
(
0
);
address
dst_addr
=
(
address
)
dst
->
byte_at_addr
(
0
);
memcpy
(
dst_addr
,
src_addr
,
where
);
memcpy
(
dst_addr
+
where
+
hole_sz
,
src_addr
+
where
,
src
->
length
()
-
where
);
return
dst
;
}
// The width of instruction at "bci" is changing by "delta". Adjust the stack
// map frames.
void
Relocator
::
adjust_stack_map_table
(
int
bci
,
int
delta
)
{
if
(
method
()
->
has_stackmap_table
())
{
typeArrayOop
data
=
method
()
->
stackmap_data
();
// The data in the array is a classfile representation of the stackmap
// table attribute, less the initial u2 tag and u4 attribute_length fields.
stack_map_table_attribute
*
attr
=
stack_map_table_attribute
::
at
(
(
address
)
data
->
byte_at_addr
(
0
)
-
(
sizeof
(
u2
)
+
sizeof
(
u4
)));
int
count
=
attr
->
number_of_entries
();
stack_map_frame
*
frame
=
attr
->
entries
();
int
bci_iter
=
-
1
;
bool
offset_adjusted
=
false
;
// only need to adjust one offset
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
int
offset_delta
=
frame
->
offset_delta
();
bci_iter
+=
offset_delta
;
if
(
!
offset_adjusted
&&
bci_iter
>
bci
)
{
int
new_offset_delta
=
offset_delta
+
delta
;
if
(
frame
->
is_valid_offset
(
new_offset_delta
))
{
frame
->
set_offset_delta
(
new_offset_delta
);
}
else
{
assert
(
frame
->
is_same_frame
()
||
frame
->
is_same_frame_1_stack_item_frame
(),
"Frame must be one of the compressed forms"
);
// The new delta exceeds the capacity of the 'same_frame' or
// 'same_frame_1_stack_item_frame' frame types. We need to
// convert these frames to the extended versions, but the extended
// version is bigger and requires more room. So we allocate a
// new array and copy the data, being sure to leave u2-sized hole
// right after the 'frame_type' for the new offset field.
//
// We can safely ignore the reverse situation as a small delta
// can still be used in an extended version of the frame.
size_t
frame_offset
=
(
address
)
frame
-
(
address
)
data
->
byte_at_addr
(
0
);
data
=
insert_hole_at
(
frame_offset
+
1
,
2
,
data
);
if
(
data
==
NULL
)
{
return
;
// out-of-memory?
}
address
frame_addr
=
(
address
)(
data
->
byte_at_addr
(
0
)
+
frame_offset
);
frame
=
stack_map_frame
::
at
(
frame_addr
);
// Now convert the frames in place
if
(
frame
->
is_same_frame
())
{
same_frame_extended
::
create_at
(
frame_addr
,
new_offset_delta
);
}
else
{
same_frame_1_stack_item_extended
::
create_at
(
frame_addr
,
new_offset_delta
,
NULL
);
// the verification_info_type should already be at the right spot
}
}
offset_adjusted
=
true
;
// needs to be done only once, since subsequent
// values are offsets from the current
}
// The stack map frame may contain verification types, if so we need to
// check and update any Uninitialized type's bci (no matter where it is).
int
number_of_types
=
frame
->
number_of_types
();
verification_type_info
*
types
=
frame
->
types
();
for
(
int
i
=
0
;
i
<
number_of_types
;
++
i
)
{
if
(
types
->
is_uninitialized
()
&&
types
->
bci
()
>
bci
)
{
types
->
set_bci
(
types
->
bci
()
+
delta
);
}
types
=
types
->
next
();
}
// Full frame has stack values too
full_frame
*
ff
=
frame
->
as_full_frame
();
if
(
ff
!=
NULL
)
{
address
eol
=
(
address
)
types
;
number_of_types
=
ff
->
stack_slots
(
eol
);
types
=
ff
->
stack
(
eol
);
for
(
int
i
=
0
;
i
<
number_of_types
;
++
i
)
{
if
(
types
->
is_uninitialized
()
&&
types
->
bci
()
>
bci
)
{
types
->
set_bci
(
types
->
bci
()
+
delta
);
}
types
=
types
->
next
();
}
}
frame
=
frame
->
next
();
}
method
()
->
set_stackmap_data
(
data
);
// in case it has changed
}
}
bool
Relocator
::
expand_code_array
(
int
delta
)
{
bool
Relocator
::
expand_code_array
(
int
delta
)
{
int
length
=
MAX2
(
code_length
()
+
delta
,
code_length
()
*
(
100
+
code_slop_pct
())
/
100
);
int
length
=
MAX2
(
code_length
()
+
delta
,
code_length
()
*
(
100
+
code_slop_pct
())
/
100
);
...
@@ -499,6 +613,9 @@ bool Relocator::relocate_code(int bci, int ilen, int delta) {
...
@@ -499,6 +613,9 @@ bool Relocator::relocate_code(int bci, int ilen, int delta) {
// And local variable table...
// And local variable table...
adjust_local_var_table
(
bci
,
delta
);
adjust_local_var_table
(
bci
,
delta
);
// Adjust stack maps
adjust_stack_map_table
(
bci
,
delta
);
// Relocate the pending change stack...
// Relocate the pending change stack...
for
(
int
j
=
0
;
j
<
_changes
->
length
();
j
++
)
{
for
(
int
j
=
0
;
j
<
_changes
->
length
();
j
++
)
{
ChangeItem
*
ci
=
_changes
->
at
(
j
);
ChangeItem
*
ci
=
_changes
->
at
(
j
);
...
@@ -641,6 +758,7 @@ bool Relocator::handle_switch_pad(int bci, int old_pad, bool is_lookup_switch) {
...
@@ -641,6 +758,7 @@ bool Relocator::handle_switch_pad(int bci, int old_pad, bool is_lookup_switch) {
memmove
(
addr_at
(
bci
+
1
+
new_pad
),
memmove
(
addr_at
(
bci
+
1
+
new_pad
),
addr_at
(
bci
+
1
+
old_pad
),
addr_at
(
bci
+
1
+
old_pad
),
len
*
4
);
len
*
4
);
memset
(
addr_at
(
bci
+
1
),
0
,
new_pad
);
// pad must be 0
}
}
}
}
return
true
;
return
true
;
...
...
src/share/vm/runtime/relocator.hpp
浏览文件 @
e1af249a
...
@@ -105,6 +105,7 @@ class Relocator : public ResourceObj {
...
@@ -105,6 +105,7 @@ class Relocator : public ResourceObj {
void
adjust_exception_table
(
int
bci
,
int
delta
);
void
adjust_exception_table
(
int
bci
,
int
delta
);
void
adjust_line_no_table
(
int
bci
,
int
delta
);
void
adjust_line_no_table
(
int
bci
,
int
delta
);
void
adjust_local_var_table
(
int
bci
,
int
delta
);
void
adjust_local_var_table
(
int
bci
,
int
delta
);
void
adjust_stack_map_table
(
int
bci
,
int
delta
);
int
get_orig_switch_pad
(
int
bci
,
bool
is_lookup_switch
);
int
get_orig_switch_pad
(
int
bci
,
bool
is_lookup_switch
);
int
rc_instr_len
(
int
bci
);
int
rc_instr_len
(
int
bci
);
bool
expand_code_array
(
int
delta
);
bool
expand_code_array
(
int
delta
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录