Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
ac7961de
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看板
提交
ac7961de
编写于
12月 18, 2012
作者:
V
vlivanov
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
b2d14d0d
2e2587e8
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
24 addition
and
18 deletion
+24
-18
src/share/vm/opto/library_call.cpp
src/share/vm/opto/library_call.cpp
+24
-18
未找到文件。
src/share/vm/opto/library_call.cpp
浏览文件 @
ac7961de
...
@@ -2952,14 +2952,23 @@ bool LibraryCallKit::inline_native_isInterrupted() {
...
@@ -2952,14 +2952,23 @@ bool LibraryCallKit::inline_native_isInterrupted() {
// We only go to the fast case code if we pass two guards.
// We only go to the fast case code if we pass two guards.
// Paths which do not pass are accumulated in the slow_region.
// Paths which do not pass are accumulated in the slow_region.
enum
{
no_int_result_path
=
1
,
// t == Thread.current() && !TLS._osthread._interrupted
no_clear_result_path
=
2
,
// t == Thread.current() && TLS._osthread._interrupted && !clear_int
slow_result_path
=
3
,
// slow path: t.isInterrupted(clear_int)
PATH_LIMIT
};
// Ensure that it's not possible to move the load of TLS._osthread._interrupted flag
// out of the function.
insert_mem_bar
(
Op_MemBarCPUOrder
);
RegionNode
*
result_rgn
=
new
(
C
)
RegionNode
(
PATH_LIMIT
);
PhiNode
*
result_val
=
new
(
C
)
PhiNode
(
result_rgn
,
TypeInt
::
BOOL
);
RegionNode
*
slow_region
=
new
(
C
)
RegionNode
(
1
);
RegionNode
*
slow_region
=
new
(
C
)
RegionNode
(
1
);
record_for_igvn
(
slow_region
);
record_for_igvn
(
slow_region
);
RegionNode
*
result_rgn
=
new
(
C
)
RegionNode
(
1
+
3
);
// fast1, fast2, slow
PhiNode
*
result_val
=
new
(
C
)
PhiNode
(
result_rgn
,
TypeInt
::
BOOL
);
enum
{
no_int_result_path
=
1
,
no_clear_result_path
=
2
,
slow_result_path
=
3
};
// (a) Receiving thread must be the current thread.
// (a) Receiving thread must be the current thread.
Node
*
rec_thr
=
argument
(
0
);
Node
*
rec_thr
=
argument
(
0
);
...
@@ -2968,14 +2977,13 @@ bool LibraryCallKit::inline_native_isInterrupted() {
...
@@ -2968,14 +2977,13 @@ bool LibraryCallKit::inline_native_isInterrupted() {
Node
*
cmp_thr
=
_gvn
.
transform
(
new
(
C
)
CmpPNode
(
cur_thr
,
rec_thr
)
);
Node
*
cmp_thr
=
_gvn
.
transform
(
new
(
C
)
CmpPNode
(
cur_thr
,
rec_thr
)
);
Node
*
bol_thr
=
_gvn
.
transform
(
new
(
C
)
BoolNode
(
cmp_thr
,
BoolTest
::
ne
)
);
Node
*
bol_thr
=
_gvn
.
transform
(
new
(
C
)
BoolNode
(
cmp_thr
,
BoolTest
::
ne
)
);
bool
known_current_thread
=
(
_gvn
.
type
(
bol_thr
)
==
TypeInt
::
ZERO
);
if
(
!
known_current_thread
)
generate_slow_guard
(
bol_thr
,
slow_region
);
generate_slow_guard
(
bol_thr
,
slow_region
);
// (b) Interrupt bit on TLS must be false.
// (b) Interrupt bit on TLS must be false.
Node
*
p
=
basic_plus_adr
(
top
()
/*!oop*/
,
tls_ptr
,
in_bytes
(
JavaThread
::
osthread_offset
()));
Node
*
p
=
basic_plus_adr
(
top
()
/*!oop*/
,
tls_ptr
,
in_bytes
(
JavaThread
::
osthread_offset
()));
Node
*
osthread
=
make_load
(
NULL
,
p
,
TypeRawPtr
::
NOTNULL
,
T_ADDRESS
);
Node
*
osthread
=
make_load
(
NULL
,
p
,
TypeRawPtr
::
NOTNULL
,
T_ADDRESS
);
p
=
basic_plus_adr
(
top
()
/*!oop*/
,
osthread
,
in_bytes
(
OSThread
::
interrupted_offset
()));
p
=
basic_plus_adr
(
top
()
/*!oop*/
,
osthread
,
in_bytes
(
OSThread
::
interrupted_offset
()));
// Set the control input on the field _interrupted read to prevent it floating up.
// Set the control input on the field _interrupted read to prevent it floating up.
Node
*
int_bit
=
make_load
(
control
(),
p
,
TypeInt
::
BOOL
,
T_INT
);
Node
*
int_bit
=
make_load
(
control
(),
p
,
TypeInt
::
BOOL
,
T_INT
);
Node
*
cmp_bit
=
_gvn
.
transform
(
new
(
C
)
CmpINode
(
int_bit
,
intcon
(
0
))
);
Node
*
cmp_bit
=
_gvn
.
transform
(
new
(
C
)
CmpINode
(
int_bit
,
intcon
(
0
))
);
...
@@ -3020,22 +3028,20 @@ bool LibraryCallKit::inline_native_isInterrupted() {
...
@@ -3020,22 +3028,20 @@ bool LibraryCallKit::inline_native_isInterrupted() {
Node
*
slow_val
=
set_results_for_java_call
(
slow_call
);
Node
*
slow_val
=
set_results_for_java_call
(
slow_call
);
// this->control() comes from set_results_for_java_call
// this->control() comes from set_results_for_java_call
// If we know that the result of the slow call will be true, tell the optimizer!
if
(
known_current_thread
)
slow_val
=
intcon
(
1
);
Node
*
fast_io
=
slow_call
->
in
(
TypeFunc
::
I_O
);
Node
*
fast_io
=
slow_call
->
in
(
TypeFunc
::
I_O
);
Node
*
fast_mem
=
slow_call
->
in
(
TypeFunc
::
Memory
);
Node
*
fast_mem
=
slow_call
->
in
(
TypeFunc
::
Memory
);
// These two phis are pre-filled with copies of of the fast IO and Memory
// These two phis are pre-filled with copies of of the fast IO and Memory
Node
*
io_phi
=
PhiNode
::
make
(
result_rgn
,
fast_io
,
Type
::
ABIO
);
PhiNode
*
result_mem
=
PhiNode
::
make
(
result_rgn
,
fast_mem
,
Type
::
MEMORY
,
TypePtr
::
BOTTOM
);
Node
*
mem_phi
=
PhiNode
::
make
(
result_rgn
,
fast_mem
,
Type
::
MEMORY
,
TypePtr
::
BOTTOM
);
PhiNode
*
result_io
=
PhiNode
::
make
(
result_rgn
,
fast_io
,
Type
::
ABIO
);
result_rgn
->
init_req
(
slow_result_path
,
control
());
result_rgn
->
init_req
(
slow_result_path
,
control
());
io_phi
->
init_req
(
slow_result_path
,
i_o
());
result_io
->
init_req
(
slow_result_path
,
i_o
());
mem_phi
->
init_req
(
slow_result_path
,
reset_memory
());
result_mem
->
init_req
(
slow_result_path
,
reset_memory
());
result_val
->
init_req
(
slow_result_path
,
slow_val
);
result_val
->
init_req
(
slow_result_path
,
slow_val
);
set_all_memory
(
_gvn
.
transform
(
mem_phi
)
);
set_all_memory
(
_gvn
.
transform
(
result_mem
)
);
set_i_o
(
_gvn
.
transform
(
io_phi
)
);
set_i_o
(
_gvn
.
transform
(
result_io
)
);
}
}
C
->
set_has_split_ifs
(
true
);
// Has chance for split-if optimization
C
->
set_has_split_ifs
(
true
);
// Has chance for split-if optimization
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录