Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
f2472686
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看板
提交
f2472686
编写于
4月 04, 2008
作者:
K
kamg
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
bd970594
3598f463
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
52 addition
and
26 deletion
+52
-26
src/cpu/sparc/vm/sparc.ad
src/cpu/sparc/vm/sparc.ad
+2
-2
src/share/vm/opto/memnode.cpp
src/share/vm/opto/memnode.cpp
+6
-0
src/share/vm/runtime/deoptimization.cpp
src/share/vm/runtime/deoptimization.cpp
+36
-19
src/share/vm/runtime/deoptimization.hpp
src/share/vm/runtime/deoptimization.hpp
+1
-1
src/share/vm/runtime/vframe.cpp
src/share/vm/runtime/vframe.cpp
+1
-1
src/share/vm/runtime/vframe.hpp
src/share/vm/runtime/vframe.hpp
+4
-1
src/share/vm/runtime/vframe_hp.cpp
src/share/vm/runtime/vframe_hp.cpp
+2
-2
未找到文件。
src/cpu/sparc/vm/sparc.ad
浏览文件 @
f2472686
...
...
@@ -6023,7 +6023,7 @@ instruct cmovII_imm(cmpOp cmp, flagsReg icc, iRegI dst, immI11 src) %{
ins_pipe(ialu_imm);
%}
instruct cmovII_U_reg(cmpOp cmp, flagsRegU icc, iRegI dst, iRegI src) %{
instruct cmovII_U_reg(cmpOp
U
cmp, flagsRegU icc, iRegI dst, iRegI src) %{
match(Set dst (CMoveI (Binary cmp icc) (Binary dst src)));
ins_cost(150);
size(4);
...
...
@@ -6032,7 +6032,7 @@ instruct cmovII_U_reg(cmpOp cmp, flagsRegU icc, iRegI dst, iRegI src) %{
ins_pipe(ialu_reg);
%}
instruct cmovII_U_imm(cmpOp cmp, flagsRegU icc, iRegI dst, immI11 src) %{
instruct cmovII_U_imm(cmpOp
U
cmp, flagsRegU icc, iRegI dst, immI11 src) %{
match(Set dst (CMoveI (Binary cmp icc) (Binary dst src)));
ins_cost(140);
size(4);
...
...
src/share/vm/opto/memnode.cpp
浏览文件 @
f2472686
...
...
@@ -1122,6 +1122,12 @@ Node *LoadNode::Ideal(PhaseGVN *phase, bool can_reshape) {
}
// Split through Phi (see original code in loopopts.cpp).
assert
(
phase
->
C
->
have_alias_type
(
addr_t
),
"instance should have alias type"
);
// Do nothing here if Identity will find a value
// (to avoid infinite chain of value phis generation).
if
(
!
phase
->
eqv
(
this
,
this
->
Identity
(
phase
))
)
return
NULL
;
const
Type
*
this_type
=
this
->
bottom_type
();
int
this_index
=
phase
->
C
->
get_alias_index
(
addr_t
);
int
this_offset
=
addr_t
->
offset
();
...
...
src/share/vm/runtime/deoptimization.cpp
浏览文件 @
f2472686
...
...
@@ -143,6 +143,7 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread
// relock objects if synchronization on them was eliminated.
if
(
DoEscapeAnalysis
)
{
if
(
EliminateAllocations
)
{
assert
(
chunk
->
at
(
0
)
->
scope
()
!=
NULL
,
"expect only compiled java frames"
);
GrowableArray
<
ScopeValue
*>*
objects
=
chunk
->
at
(
0
)
->
scope
()
->
objects
();
bool
reallocated
=
false
;
if
(
objects
!=
NULL
)
{
...
...
@@ -162,19 +163,26 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread
}
}
if
(
EliminateLocks
)
{
#ifndef PRODUCT
bool
first
=
true
;
#endif
for
(
int
i
=
0
;
i
<
chunk
->
length
();
i
++
)
{
GrowableArray
<
MonitorValue
*>*
monitors
=
chunk
->
at
(
i
)
->
scope
()
->
monitors
();
if
(
monitors
!=
NULL
)
{
relock_objects
(
&
deoptee
,
&
map
,
monitors
);
compiledVFrame
*
cvf
=
chunk
->
at
(
i
);
assert
(
cvf
->
scope
()
!=
NULL
,
"expect only compiled java frames"
);
GrowableArray
<
MonitorInfo
*>*
monitors
=
cvf
->
monitors
();
if
(
monitors
->
is_nonempty
())
{
relock_objects
(
monitors
,
thread
);
#ifndef PRODUCT
if
(
TraceDeoptimization
)
{
ttyLocker
ttyl
;
tty
->
print_cr
(
"RELOCK OBJECTS in thread "
INTPTR_FORMAT
,
thread
);
for
(
int
j
=
0
;
j
<
monitors
->
length
();
j
++
)
{
MonitorValue
*
mv
=
monitors
->
at
(
j
);
if
(
mv
->
eliminated
())
{
StackValue
*
owner
=
StackValue
::
create_stack_value
(
&
deoptee
,
&
map
,
mv
->
owner
());
tty
->
print_cr
(
" object <"
INTPTR_FORMAT
"> locked"
,
owner
->
get_obj
()());
MonitorInfo
*
mi
=
monitors
->
at
(
j
);
if
(
mi
->
eliminated
())
{
if
(
first
)
{
first
=
false
;
tty
->
print_cr
(
"RELOCK OBJECTS in thread "
INTPTR_FORMAT
,
thread
);
}
tty
->
print_cr
(
" object <"
INTPTR_FORMAT
"> locked"
,
mi
->
owner
());
}
}
}
...
...
@@ -799,18 +807,27 @@ void Deoptimization::reassign_fields(frame* fr, RegisterMap* reg_map, GrowableAr
// relock objects for which synchronization was eliminated
void
Deoptimization
::
relock_objects
(
frame
*
fr
,
RegisterMap
*
reg_map
,
GrowableArray
<
MonitorValue
*>*
monitors
)
{
void
Deoptimization
::
relock_objects
(
GrowableArray
<
MonitorInfo
*>*
monitors
,
JavaThread
*
thread
)
{
for
(
int
i
=
0
;
i
<
monitors
->
length
();
i
++
)
{
MonitorValue
*
mv
=
monitors
->
at
(
i
);
StackValue
*
owner
=
StackValue
::
create_stack_value
(
fr
,
reg_map
,
mv
->
owner
());
if
(
mv
->
eliminated
())
{
Handle
obj
=
owner
->
get_obj
();
assert
(
obj
.
not_null
(),
"reallocation was missed"
);
BasicLock
*
lock
=
StackValue
::
resolve_monitor_lock
(
fr
,
mv
->
basic_lock
());
lock
->
set_displaced_header
(
obj
->
mark
());
obj
->
set_mark
((
markOop
)
lock
);
MonitorInfo
*
mon_info
=
monitors
->
at
(
i
);
if
(
mon_info
->
eliminated
())
{
assert
(
mon_info
->
owner
()
!=
NULL
,
"reallocation was missed"
);
Handle
obj
=
Handle
(
mon_info
->
owner
());
markOop
mark
=
obj
->
mark
();
if
(
UseBiasedLocking
&&
mark
->
has_bias_pattern
())
{
// New allocated objects may have the mark set to anonymously biased.
// Also the deoptimized method may called methods with synchronization
// where the thread-local object is bias locked to the current thread.
assert
(
mark
->
is_biased_anonymously
()
||
mark
->
biased_locker
()
==
thread
,
"should be locked to current thread"
);
// Reset mark word to unbiased prototype.
markOop
unbiased_prototype
=
markOopDesc
::
prototype
()
->
set_age
(
mark
->
age
());
obj
->
set_mark
(
unbiased_prototype
);
}
BasicLock
*
lock
=
mon_info
->
lock
();
ObjectSynchronizer
::
slow_enter
(
obj
,
lock
,
thread
);
}
assert
(
owner
->
get_obj
()
->
is_locked
(),
"object must be locked now"
);
assert
(
mon_info
->
owner
()
->
is_locked
(),
"object must be locked now"
);
}
}
...
...
@@ -916,7 +933,7 @@ static void collect_monitors(compiledVFrame* cvf, GrowableArray<Handle>* objects
GrowableArray
<
MonitorInfo
*>*
monitors
=
cvf
->
monitors
();
for
(
int
i
=
0
;
i
<
monitors
->
length
();
i
++
)
{
MonitorInfo
*
mon_info
=
monitors
->
at
(
i
);
if
(
mon_info
->
owner
()
!=
NULL
)
{
if
(
mon_info
->
owner
()
!=
NULL
&&
!
mon_info
->
eliminated
()
)
{
objects_to_revoke
->
append
(
Handle
(
mon_info
->
owner
()));
}
}
...
...
src/share/vm/runtime/deoptimization.hpp
浏览文件 @
f2472686
...
...
@@ -105,7 +105,7 @@ class Deoptimization : AllStatic {
static
void
reassign_type_array_elements
(
frame
*
fr
,
RegisterMap
*
reg_map
,
ObjectValue
*
sv
,
typeArrayOop
obj
,
BasicType
type
);
static
void
reassign_object_array_elements
(
frame
*
fr
,
RegisterMap
*
reg_map
,
ObjectValue
*
sv
,
objArrayOop
obj
);
static
void
reassign_fields
(
frame
*
fr
,
RegisterMap
*
reg_map
,
GrowableArray
<
ScopeValue
*>*
objects
);
static
void
relock_objects
(
frame
*
fr
,
RegisterMap
*
reg_map
,
GrowableArray
<
MonitorValue
*>*
monitors
);
static
void
relock_objects
(
GrowableArray
<
MonitorInfo
*>*
monitors
,
JavaThread
*
thread
);
NOT_PRODUCT
(
static
void
print_objects
(
GrowableArray
<
ScopeValue
*>*
objects
);)
#endif // COMPILER2
...
...
src/share/vm/runtime/vframe.cpp
浏览文件 @
f2472686
...
...
@@ -206,7 +206,7 @@ GrowableArray<MonitorInfo*>* interpretedVFrame::monitors() const {
for
(
BasicObjectLock
*
current
=
(
fr
().
previous_monitor_in_interpreter_frame
(
fr
().
interpreter_frame_monitor_begin
()));
current
>=
fr
().
interpreter_frame_monitor_end
();
current
=
fr
().
previous_monitor_in_interpreter_frame
(
current
))
{
result
->
push
(
new
MonitorInfo
(
current
->
obj
(),
current
->
lock
()));
result
->
push
(
new
MonitorInfo
(
current
->
obj
(),
current
->
lock
()
,
false
));
}
return
result
;
}
...
...
src/share/vm/runtime/vframe.hpp
浏览文件 @
f2472686
...
...
@@ -230,15 +230,18 @@ class MonitorInfo : public ResourceObj {
private:
oop
_owner
;
// the object owning the monitor
BasicLock
*
_lock
;
bool
_eliminated
;
public:
// Constructor
MonitorInfo
(
oop
owner
,
BasicLock
*
lock
)
{
MonitorInfo
(
oop
owner
,
BasicLock
*
lock
,
bool
eliminated
)
{
_owner
=
owner
;
_lock
=
lock
;
_eliminated
=
eliminated
;
}
// Accessors
oop
owner
()
const
{
return
_owner
;
}
BasicLock
*
lock
()
const
{
return
_lock
;
}
bool
eliminated
()
const
{
return
_eliminated
;
}
};
class
vframeStreamCommon
:
StackObj
{
...
...
src/share/vm/runtime/vframe_hp.cpp
浏览文件 @
f2472686
...
...
@@ -190,7 +190,7 @@ GrowableArray<MonitorInfo*>* compiledVFrame::monitors() const {
// Casting away const
frame
&
fr
=
(
frame
&
)
_fr
;
MonitorInfo
*
info
=
new
MonitorInfo
(
fr
.
compiled_synchronized_native_monitor_owner
(
nm
),
fr
.
compiled_synchronized_native_monitor
(
nm
));
fr
.
compiled_synchronized_native_monitor
(
nm
)
,
false
);
monitors
->
push
(
info
);
return
monitors
;
}
...
...
@@ -202,7 +202,7 @@ GrowableArray<MonitorInfo*>* compiledVFrame::monitors() const {
for
(
int
index
=
0
;
index
<
monitors
->
length
();
index
++
)
{
MonitorValue
*
mv
=
monitors
->
at
(
index
);
StackValue
*
owner_sv
=
create_stack_value
(
mv
->
owner
());
// it is an oop
result
->
push
(
new
MonitorInfo
(
owner_sv
->
get_obj
()(),
resolve_monitor_lock
(
mv
->
basic_lock
())));
result
->
push
(
new
MonitorInfo
(
owner_sv
->
get_obj
()(),
resolve_monitor_lock
(
mv
->
basic_lock
())
,
mv
->
eliminated
()
));
}
return
result
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录