Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
a1b799a8
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看板
提交
a1b799a8
编写于
6月 26, 2009
作者:
N
never
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6818666: G1: Type lost in g1 pre-barrier
Reviewed-by: kvn
上级
3ef748a2
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
36 addition
and
21 deletion
+36
-21
src/share/vm/opto/graphKit.cpp
src/share/vm/opto/graphKit.cpp
+25
-8
src/share/vm/opto/graphKit.hpp
src/share/vm/opto/graphKit.hpp
+4
-5
src/share/vm/opto/library_call.cpp
src/share/vm/opto/library_call.cpp
+4
-5
src/share/vm/opto/parse2.cpp
src/share/vm/opto/parse2.cpp
+1
-1
src/share/vm/opto/parse3.cpp
src/share/vm/opto/parse3.cpp
+2
-2
未找到文件。
src/share/vm/opto/graphKit.cpp
浏览文件 @
a1b799a8
...
...
@@ -1378,7 +1378,7 @@ void GraphKit::pre_barrier(Node* ctl,
Node
*
adr
,
uint
adr_idx
,
Node
*
val
,
const
Type
*
val_type
,
const
Type
OopPtr
*
val_type
,
BasicType
bt
)
{
BarrierSet
*
bs
=
Universe
::
heap
()
->
barrier_set
();
set_control
(
ctl
);
...
...
@@ -1436,7 +1436,7 @@ Node* GraphKit::store_oop_to_object(Node* ctl,
Node
*
adr
,
const
TypePtr
*
adr_type
,
Node
*
val
,
const
Type
*
val_type
,
const
Type
OopPtr
*
val_type
,
BasicType
bt
)
{
uint
adr_idx
=
C
->
get_alias_index
(
adr_type
);
Node
*
store
;
...
...
@@ -1451,7 +1451,7 @@ Node* GraphKit::store_oop_to_array(Node* ctl,
Node
*
adr
,
const
TypePtr
*
adr_type
,
Node
*
val
,
const
Type
*
val_type
,
const
Type
OopPtr
*
val_type
,
BasicType
bt
)
{
uint
adr_idx
=
C
->
get_alias_index
(
adr_type
);
Node
*
store
;
...
...
@@ -1466,12 +1466,29 @@ Node* GraphKit::store_oop_to_unknown(Node* ctl,
Node
*
adr
,
const
TypePtr
*
adr_type
,
Node
*
val
,
const
Type
*
val_type
,
BasicType
bt
)
{
uint
adr_idx
=
C
->
get_alias_index
(
adr_type
);
Node
*
store
;
Compile
::
AliasType
*
at
=
C
->
alias_type
(
adr_type
);
const
TypeOopPtr
*
val_type
=
NULL
;
if
(
adr_type
->
isa_instptr
())
{
if
(
at
->
field
()
!=
NULL
)
{
// known field. This code is a copy of the do_put_xxx logic.
ciField
*
field
=
at
->
field
();
if
(
!
field
->
type
()
->
is_loaded
())
{
val_type
=
TypeInstPtr
::
BOTTOM
;
}
else
{
val_type
=
TypeOopPtr
::
make_from_klass
(
field
->
type
()
->
as_klass
());
}
}
}
else
if
(
adr_type
->
isa_aryptr
())
{
val_type
=
adr_type
->
is_aryptr
()
->
elem
()
->
isa_oopptr
();
}
if
(
val_type
==
NULL
)
{
val_type
=
TypeInstPtr
::
BOTTOM
;
}
uint
adr_idx
=
at
->
index
();
pre_barrier
(
ctl
,
obj
,
adr
,
adr_idx
,
val
,
val_type
,
bt
);
store
=
store_to_memory
(
control
(),
adr
,
val
,
bt
,
adr_idx
);
Node
*
store
=
store_to_memory
(
control
(),
adr
,
val
,
bt
,
adr_idx
);
post_barrier
(
control
(),
store
,
obj
,
adr
,
adr_idx
,
val
,
bt
,
true
);
return
store
;
}
...
...
@@ -3202,7 +3219,7 @@ void GraphKit::g1_write_barrier_pre(Node* obj,
Node
*
adr
,
uint
alias_idx
,
Node
*
val
,
const
Type
*
val_type
,
const
Type
OopPtr
*
val_type
,
BasicType
bt
)
{
IdealKit
ideal
(
gvn
(),
control
(),
merged_memory
(),
true
);
#define __ ideal.
...
...
src/share/vm/opto/graphKit.hpp
浏览文件 @
a1b799a8
...
...
@@ -454,7 +454,7 @@ class GraphKit : public Phase {
Node
*
adr
,
// actual adress to store val at
const
TypePtr
*
adr_type
,
Node
*
val
,
const
Type
*
val_type
,
const
Type
OopPtr
*
val_type
,
BasicType
bt
);
Node
*
store_oop_to_array
(
Node
*
ctl
,
...
...
@@ -462,7 +462,7 @@ class GraphKit : public Phase {
Node
*
adr
,
// actual adress to store val at
const
TypePtr
*
adr_type
,
Node
*
val
,
const
Type
*
val_type
,
const
Type
OopPtr
*
val_type
,
BasicType
bt
);
// Could be an array or object we don't know at compile time (unsafe ref.)
...
...
@@ -471,12 +471,11 @@ class GraphKit : public Phase {
Node
*
adr
,
// actual adress to store val at
const
TypePtr
*
adr_type
,
Node
*
val
,
const
Type
*
val_type
,
BasicType
bt
);
// For the few case where the barriers need special help
void
pre_barrier
(
Node
*
ctl
,
Node
*
obj
,
Node
*
adr
,
uint
adr_idx
,
Node
*
val
,
const
Type
*
val_type
,
BasicType
bt
);
Node
*
val
,
const
Type
OopPtr
*
val_type
,
BasicType
bt
);
void
post_barrier
(
Node
*
ctl
,
Node
*
store
,
Node
*
obj
,
Node
*
adr
,
uint
adr_idx
,
Node
*
val
,
BasicType
bt
,
bool
use_precise
);
...
...
@@ -599,7 +598,7 @@ class GraphKit : public Phase {
Node
*
adr
,
uint
alias_idx
,
Node
*
val
,
const
Type
*
val_type
,
const
Type
OopPtr
*
val_type
,
BasicType
bt
);
void
g1_write_barrier_post
(
Node
*
store
,
...
...
src/share/vm/opto/library_call.cpp
浏览文件 @
a1b799a8
...
...
@@ -2178,9 +2178,8 @@ bool LibraryCallKit::inline_unsafe_access(bool is_native_ptr, bool is_store, Bas
// Possibly an oop being stored to Java heap or native memory
if
(
!
TypePtr
::
NULL_PTR
->
higher_equal
(
_gvn
.
type
(
heap_base_oop
)))
{
// oop to Java heap.
(
void
)
store_oop_to_unknown
(
control
(),
heap_base_oop
,
adr
,
adr_type
,
val
,
val
->
bottom_type
(),
type
);
(
void
)
store_oop_to_unknown
(
control
(),
heap_base_oop
,
adr
,
adr_type
,
val
,
type
);
}
else
{
// We can't tell at compile time if we are storing in the Java heap or outside
// of it. So we need to emit code to conditionally do the proper type of
// store.
...
...
@@ -2189,7 +2188,7 @@ bool LibraryCallKit::inline_unsafe_access(bool is_native_ptr, bool is_store, Bas
kit
.
declares_done
();
// QQQ who knows what probability is here??
kit
.
if_then
(
heap_base_oop
,
BoolTest
::
ne
,
null
(),
PROB_UNLIKELY
(
0.999
));
{
(
void
)
store_oop_to_unknown
(
control
(),
heap_base_oop
,
adr
,
adr_type
,
val
,
val
->
bottom_type
(),
type
);
(
void
)
store_oop_to_unknown
(
control
(),
heap_base_oop
,
adr
,
adr_type
,
val
,
type
);
}
kit
.
else_
();
{
(
void
)
store_to_memory
(
control
(),
adr
,
val
,
type
,
adr_type
,
is_volatile
);
}
kit
.
end_if
();
...
...
@@ -2394,7 +2393,7 @@ bool LibraryCallKit::inline_unsafe_CAS(BasicType type) {
case
T_OBJECT
:
// reference stores need a store barrier.
// (They don't if CAS fails, but it isn't worth checking.)
pre_barrier
(
control
(),
base
,
adr
,
alias_idx
,
newval
,
value_type
,
T_OBJECT
);
pre_barrier
(
control
(),
base
,
adr
,
alias_idx
,
newval
,
value_type
->
is_oopptr
()
,
T_OBJECT
);
#ifdef _LP64
if
(
adr
->
bottom_type
()
->
is_ptr_to_narrowoop
())
{
Node
*
newval_enc
=
_gvn
.
transform
(
new
(
C
,
2
)
EncodePNode
(
newval
,
newval
->
bottom_type
()
->
make_narrowoop
()));
...
...
@@ -2489,7 +2488,7 @@ bool LibraryCallKit::inline_unsafe_ordered_store(BasicType type) {
bool
require_atomic_access
=
true
;
Node
*
store
;
if
(
type
==
T_OBJECT
)
// reference stores need a store barrier.
store
=
store_oop_to_unknown
(
control
(),
base
,
adr
,
adr_type
,
val
,
value_type
,
type
);
store
=
store_oop_to_unknown
(
control
(),
base
,
adr
,
adr_type
,
val
,
type
);
else
{
store
=
store_to_memory
(
control
(),
adr
,
val
,
type
,
adr_type
,
require_atomic_access
);
}
...
...
src/share/vm/opto/parse2.cpp
浏览文件 @
a1b799a8
...
...
@@ -1565,7 +1565,7 @@ void Parse::do_one_bytecode() {
c
=
pop
();
// Oop to store
b
=
pop
();
// index (already used)
a
=
pop
();
// the array itself
const
Type
*
elemtype
=
_gvn
.
type
(
a
)
->
is_aryptr
()
->
elem
();
const
Type
OopPtr
*
elemtype
=
_gvn
.
type
(
a
)
->
is_aryptr
()
->
elem
()
->
is_oopptr
();
const
TypeAryPtr
*
adr_type
=
TypeAryPtr
::
OOPS
;
Node
*
store
=
store_oop_to_array
(
control
(),
a
,
d
,
adr_type
,
c
,
elemtype
,
T_OBJECT
);
break
;
...
...
src/share/vm/opto/parse3.cpp
浏览文件 @
a1b799a8
...
...
@@ -222,7 +222,7 @@ void Parse::do_put_xxx(const TypePtr* obj_type, Node* obj, ciField* field, bool
// Store the value.
Node
*
store
;
if
(
bt
==
T_OBJECT
)
{
const
TypePtr
*
field_type
;
const
Type
Oop
Ptr
*
field_type
;
if
(
!
field
->
type
()
->
is_loaded
())
{
field_type
=
TypeInstPtr
::
BOTTOM
;
}
else
{
...
...
@@ -361,7 +361,7 @@ Node* Parse::expand_multianewarray(ciArrayKlass* array_klass, Node* *lengths, in
guarantee
(
length_con
>=
0
,
"non-constant multianewarray"
);
ciArrayKlass
*
array_klass_1
=
array_klass
->
as_obj_array_klass
()
->
element_klass
()
->
as_array_klass
();
const
TypePtr
*
adr_type
=
TypeAryPtr
::
OOPS
;
const
Type
*
elemtype
=
_gvn
.
type
(
array
)
->
is_aryptr
()
->
elem
();
const
Type
OopPtr
*
elemtype
=
_gvn
.
type
(
array
)
->
is_aryptr
()
->
elem
()
->
is_oopptr
();
const
intptr_t
header
=
arrayOopDesc
::
base_offset_in_bytes
(
T_OBJECT
);
for
(
jint
i
=
0
;
i
<
length_con
;
i
++
)
{
Node
*
elem
=
expand_multianewarray
(
array_klass_1
,
&
lengths
[
1
],
ndimensions
-
1
,
nargs
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录