Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
06299adb
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
06299adb
编写于
4月 05, 2011
作者:
N
never
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6777083: assert(target != __null,"must not be null")
Reviewed-by: iveresov, kvn
上级
70a30e5e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
26 addition
and
14 deletion
+26
-14
src/cpu/x86/vm/assembler_x86.hpp
src/cpu/x86/vm/assembler_x86.hpp
+10
-2
src/share/vm/code/relocInfo.cpp
src/share/vm/code/relocInfo.cpp
+6
-12
src/share/vm/code/relocInfo.hpp
src/share/vm/code/relocInfo.hpp
+10
-0
未找到文件。
src/cpu/x86/vm/assembler_x86.hpp
浏览文件 @
06299adb
...
@@ -385,10 +385,18 @@ class OopAddress: public AddressLiteral {
...
@@ -385,10 +385,18 @@ class OopAddress: public AddressLiteral {
};
};
class
ExternalAddress
:
public
AddressLiteral
{
class
ExternalAddress
:
public
AddressLiteral
{
private:
static
relocInfo
::
relocType
reloc_for_target
(
address
target
)
{
// Sometimes ExternalAddress is used for values which aren't
// exactly addresses, like the card table base.
// external_word_type can't be used for values in the first page
// so just skip the reloc in that case.
return
external_word_Relocation
::
can_be_relocated
(
target
)
?
relocInfo
::
external_word_type
:
relocInfo
::
none
;
}
public:
public:
ExternalAddress
(
address
target
)
:
AddressLiteral
(
target
,
reloc
Info
::
external_word_type
)
{}
ExternalAddress
(
address
target
)
:
AddressLiteral
(
target
,
reloc
_for_target
(
target
))
{}
};
};
...
...
src/share/vm/code/relocInfo.cpp
浏览文件 @
06299adb
...
@@ -472,20 +472,14 @@ RelocationHolder Relocation::spec_simple(relocInfo::relocType rtype) {
...
@@ -472,20 +472,14 @@ RelocationHolder Relocation::spec_simple(relocInfo::relocType rtype) {
return
itr
.
_rh
;
return
itr
.
_rh
;
}
}
static
inline
bool
is_index
(
intptr_t
index
)
{
return
0
<
index
&&
index
<
os
::
vm_page_size
();
}
int32_t
Relocation
::
runtime_address_to_index
(
address
runtime_address
)
{
int32_t
Relocation
::
runtime_address_to_index
(
address
runtime_address
)
{
assert
(
!
is_index
((
intptr_t
)
runtime_address
),
"must not look like an index"
);
assert
(
!
is_
reloc_
index
((
intptr_t
)
runtime_address
),
"must not look like an index"
);
if
(
runtime_address
==
NULL
)
return
0
;
if
(
runtime_address
==
NULL
)
return
0
;
StubCodeDesc
*
p
=
StubCodeDesc
::
desc_for
(
runtime_address
);
StubCodeDesc
*
p
=
StubCodeDesc
::
desc_for
(
runtime_address
);
if
(
p
!=
NULL
&&
p
->
begin
()
==
runtime_address
)
{
if
(
p
!=
NULL
&&
p
->
begin
()
==
runtime_address
)
{
assert
(
is_index
(
p
->
index
()),
"there must not be too many stubs"
);
assert
(
is_
reloc_
index
(
p
->
index
()),
"there must not be too many stubs"
);
return
(
int32_t
)
p
->
index
();
return
(
int32_t
)
p
->
index
();
}
else
{
}
else
{
// Known "miscellaneous" non-stub pointers:
// Known "miscellaneous" non-stub pointers:
...
@@ -506,7 +500,7 @@ int32_t Relocation::runtime_address_to_index(address runtime_address) {
...
@@ -506,7 +500,7 @@ int32_t Relocation::runtime_address_to_index(address runtime_address) {
address
Relocation
::
index_to_runtime_address
(
int32_t
index
)
{
address
Relocation
::
index_to_runtime_address
(
int32_t
index
)
{
if
(
index
==
0
)
return
NULL
;
if
(
index
==
0
)
return
NULL
;
if
(
is_index
(
index
))
{
if
(
is_
reloc_
index
(
index
))
{
StubCodeDesc
*
p
=
StubCodeDesc
::
desc_for_index
(
index
);
StubCodeDesc
*
p
=
StubCodeDesc
::
desc_for_index
(
index
);
assert
(
p
!=
NULL
,
"there must be a stub for this index"
);
assert
(
p
!=
NULL
,
"there must be a stub for this index"
);
return
p
->
begin
();
return
p
->
begin
();
...
@@ -634,7 +628,7 @@ void external_word_Relocation::pack_data_to(CodeSection* dest) {
...
@@ -634,7 +628,7 @@ void external_word_Relocation::pack_data_to(CodeSection* dest) {
#ifndef _LP64
#ifndef _LP64
p
=
pack_1_int_to
(
p
,
index
);
p
=
pack_1_int_to
(
p
,
index
);
#else
#else
if
(
is_index
(
index
))
{
if
(
is_
reloc_
index
(
index
))
{
p
=
pack_2_ints_to
(
p
,
index
,
0
);
p
=
pack_2_ints_to
(
p
,
index
,
0
);
}
else
{
}
else
{
jlong
t
=
(
jlong
)
_target
;
jlong
t
=
(
jlong
)
_target
;
...
@@ -642,7 +636,7 @@ void external_word_Relocation::pack_data_to(CodeSection* dest) {
...
@@ -642,7 +636,7 @@ void external_word_Relocation::pack_data_to(CodeSection* dest) {
int32_t
hi
=
high
(
t
);
int32_t
hi
=
high
(
t
);
p
=
pack_2_ints_to
(
p
,
lo
,
hi
);
p
=
pack_2_ints_to
(
p
,
lo
,
hi
);
DEBUG_ONLY
(
jlong
t1
=
jlong_from
(
hi
,
lo
));
DEBUG_ONLY
(
jlong
t1
=
jlong_from
(
hi
,
lo
));
assert
(
!
is_index
(
t1
)
&&
(
address
)
t1
==
_target
,
"not symmetric"
);
assert
(
!
is_
reloc_
index
(
t1
)
&&
(
address
)
t1
==
_target
,
"not symmetric"
);
}
}
#endif
/* _LP64 */
#endif
/* _LP64 */
dest
->
set_locs_end
((
relocInfo
*
)
p
);
dest
->
set_locs_end
((
relocInfo
*
)
p
);
...
@@ -656,7 +650,7 @@ void external_word_Relocation::unpack_data() {
...
@@ -656,7 +650,7 @@ void external_word_Relocation::unpack_data() {
int32_t
lo
,
hi
;
int32_t
lo
,
hi
;
unpack_2_ints
(
lo
,
hi
);
unpack_2_ints
(
lo
,
hi
);
jlong
t
=
jlong_from
(
hi
,
lo
);;
jlong
t
=
jlong_from
(
hi
,
lo
);;
if
(
is_index
(
t
))
{
if
(
is_
reloc_
index
(
t
))
{
_target
=
index_to_runtime_address
(
t
);
_target
=
index_to_runtime_address
(
t
);
}
else
{
}
else
{
_target
=
(
address
)
t
;
_target
=
(
address
)
t
;
...
...
src/share/vm/code/relocInfo.hpp
浏览文件 @
06299adb
...
@@ -703,6 +703,10 @@ class Relocation VALUE_OBJ_CLASS_SPEC {
...
@@ -703,6 +703,10 @@ class Relocation VALUE_OBJ_CLASS_SPEC {
assert
(
datalen
()
==
0
||
type
()
==
relocInfo
::
none
,
"no data here"
);
assert
(
datalen
()
==
0
||
type
()
==
relocInfo
::
none
,
"no data here"
);
}
}
static
bool
is_reloc_index
(
intptr_t
index
)
{
return
0
<
index
&&
index
<
os
::
vm_page_size
();
}
protected:
protected:
// Helper functions for pack_data_to() and unpack_data().
// Helper functions for pack_data_to() and unpack_data().
...
@@ -1127,6 +1131,12 @@ class external_word_Relocation : public DataRelocation {
...
@@ -1127,6 +1131,12 @@ class external_word_Relocation : public DataRelocation {
return
rh
;
return
rh
;
}
}
// Some address looking values aren't safe to treat as relocations
// and should just be treated as constants.
static
bool
can_be_relocated
(
address
target
)
{
return
target
!=
NULL
&&
!
is_reloc_index
((
intptr_t
)
target
);
}
private:
private:
address
_target
;
// address in runtime
address
_target
;
// address in runtime
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录