Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell11
提交
9d9f7dcf
D
dragonwell11
项目概览
openanolis
/
dragonwell11
通知
7
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell11
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9d9f7dcf
编写于
9月 02, 2011
作者:
T
twisti
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7085404: JSR 292: VolatileCallSites should have push notification too
Reviewed-by: never, kvn
上级
e79e3d2a
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
36 addition
and
34 deletion
+36
-34
hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
+13
-19
hotspot/src/share/vm/ci/ciField.hpp
hotspot/src/share/vm/ci/ciField.hpp
+3
-1
hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
+1
-1
hotspot/src/share/vm/opto/callGenerator.cpp
hotspot/src/share/vm/opto/callGenerator.cpp
+1
-2
hotspot/src/share/vm/opto/doCall.cpp
hotspot/src/share/vm/opto/doCall.cpp
+3
-9
hotspot/src/share/vm/opto/parse3.cpp
hotspot/src/share/vm/opto/parse3.cpp
+2
-2
hotspot/src/share/vm/prims/unsafe.cpp
hotspot/src/share/vm/prims/unsafe.cpp
+13
-0
未找到文件。
hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
浏览文件 @
9d9f7dcf
...
...
@@ -3744,26 +3744,20 @@ bool GraphBuilder::for_invokedynamic_inline(ciMethod* callee) {
ciCallSite
*
call_site
=
stream
()
->
get_call_site
();
ciMethodHandle
*
method_handle
=
call_site
->
get_target
();
// Inline constant and mutable call sites. We don't inline
// volatile call sites optimistically since they are specified
// to change their value often and that would result in a lot of
// deoptimizations and recompiles.
if
(
call_site
->
is_constant_call_site
()
||
call_site
->
is_mutable_call_site
())
{
// Set the callee to have access to the class and signature in the
// MethodHandleCompiler.
method_handle
->
set_callee
(
callee
);
method_handle
->
set_caller
(
method
());
// Get an adapter for the MethodHandle.
ciMethod
*
method_handle_adapter
=
method_handle
->
get_invokedynamic_adapter
();
if
(
method_handle_adapter
!=
NULL
)
{
if
(
try_inline
(
method_handle_adapter
,
/*holder_known=*/
true
))
{
// Add a dependence for invalidation of the optimization.
if
(
!
call_site
->
is_constant_call_site
())
{
dependency_recorder
()
->
assert_call_site_target_value
(
call_site
,
method_handle
);
}
return
true
;
// Set the callee to have access to the class and signature in the
// MethodHandleCompiler.
method_handle
->
set_callee
(
callee
);
method_handle
->
set_caller
(
method
());
// Get an adapter for the MethodHandle.
ciMethod
*
method_handle_adapter
=
method_handle
->
get_invokedynamic_adapter
();
if
(
method_handle_adapter
!=
NULL
)
{
if
(
try_inline
(
method_handle_adapter
,
/*holder_known=*/
true
))
{
// Add a dependence for invalidation of the optimization.
if
(
!
call_site
->
is_constant_call_site
())
{
dependency_recorder
()
->
assert_call_site_target_value
(
call_site
,
method_handle
);
}
return
true
;
}
}
return
false
;
...
...
hotspot/src/share/vm/ci/ciField.hpp
浏览文件 @
9d9f7dcf
...
...
@@ -175,7 +175,9 @@ public:
bool
is_volatile
()
{
return
flags
().
is_volatile
();
}
bool
is_transient
()
{
return
flags
().
is_transient
();
}
bool
is_call_site_target
()
{
return
((
holder
()
==
CURRENT_ENV
->
CallSite_klass
())
&&
(
name
()
==
ciSymbol
::
target_name
()));
}
bool
is_call_site_target
()
{
return
(
holder
()
->
is_subclass_of
(
CURRENT_ENV
->
CallSite_klass
())
&&
(
name
()
==
ciSymbol
::
target_name
()));
}
// Debugging output
void
print
();
...
...
hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
浏览文件 @
9d9f7dcf
...
...
@@ -555,7 +555,7 @@ IRT_ENTRY(void, InterpreterRuntime::resolve_get_put(JavaThread* thread, Bytecode
assert
(
method_handle
->
is_a
(
SystemDictionary
::
MethodHandle_klass
()),
"must be"
);
{
// Walk all nmethods depending on
CallSite
// Walk all nmethods depending on
this call site.
MutexLocker
mu
(
Compile_lock
,
thread
);
Universe
::
flush_dependents_on
(
call_site
,
method_handle
);
}
...
...
hotspot/src/share/vm/opto/callGenerator.cpp
浏览文件 @
9d9f7dcf
...
...
@@ -726,7 +726,6 @@ CallGenerator* CallGenerator::for_method_handle_inline(Node* method_handle, JVMS
CallGenerator
*
CallGenerator
::
for_invokedynamic_inline
(
ciCallSite
*
call_site
,
JVMState
*
jvms
,
ciMethod
*
caller
,
ciMethod
*
callee
,
ciCallProfile
profile
)
{
assert
(
call_site
->
is_constant_call_site
()
||
call_site
->
is_mutable_call_site
(),
"must be"
);
ciMethodHandle
*
method_handle
=
call_site
->
get_target
();
// Set the callee to have access to the class and signature in the
...
...
@@ -742,7 +741,7 @@ CallGenerator* CallGenerator::for_invokedynamic_inline(ciCallSite* call_site, JV
CallGenerator
*
cg
=
C
->
call_generator
(
target_method
,
-
1
,
false
,
jvms
,
true
,
PROB_ALWAYS
);
if
(
cg
!=
NULL
&&
cg
->
is_inline
())
{
// Add a dependence for invalidation of the optimization.
if
(
call_site
->
is_mutable
_call_site
())
{
if
(
!
call_site
->
is_constant
_call_site
())
{
C
->
dependencies
()
->
assert_call_site_target_value
(
call_site
,
method_handle
);
}
return
cg
;
...
...
hotspot/src/share/vm/opto/doCall.cpp
浏览文件 @
9d9f7dcf
...
...
@@ -136,15 +136,9 @@ CallGenerator* Compile::call_generator(ciMethod* call_method, int vtable_index,
str
.
force_bci
(
jvms
->
bci
());
// Set the stream to the invokedynamic bci.
ciCallSite
*
call_site
=
str
.
get_call_site
();
// Inline constant and mutable call sites. We don't inline
// volatile call sites optimistically since they are specified
// to change their value often and that would result in a lot of
// deoptimizations and recompiles.
if
(
call_site
->
is_constant_call_site
()
||
call_site
->
is_mutable_call_site
())
{
CallGenerator
*
cg
=
CallGenerator
::
for_invokedynamic_inline
(
call_site
,
jvms
,
caller
,
call_method
,
profile
);
if
(
cg
!=
NULL
)
{
return
cg
;
}
CallGenerator
*
cg
=
CallGenerator
::
for_invokedynamic_inline
(
call_site
,
jvms
,
caller
,
call_method
,
profile
);
if
(
cg
!=
NULL
)
{
return
cg
;
}
// If something failed, generate a normal dynamic call.
return
CallGenerator
::
for_dynamic_call
(
call_method
);
...
...
hotspot/src/share/vm/opto/parse3.cpp
浏览文件 @
9d9f7dcf
...
...
@@ -100,11 +100,11 @@ void Parse::do_field_access(bool is_get, bool is_field) {
}
}
// Deoptimize on putfield writes to
CallSite.target
// Deoptimize on putfield writes to
call site target field.
if
(
!
is_get
&&
field
->
is_call_site_target
())
{
uncommon_trap
(
Deoptimization
::
Reason_unhandled
,
Deoptimization
::
Action_reinterpret
,
NULL
,
"put to
CallSite.
target field"
);
NULL
,
"put to
call site
target field"
);
return
;
}
...
...
hotspot/src/share/vm/prims/unsafe.cpp
浏览文件 @
9d9f7dcf
...
...
@@ -302,6 +302,19 @@ UNSAFE_ENTRY(void, Unsafe_SetObjectVolatile(JNIEnv *env, jobject unsafe, jobject
UnsafeWrapper
(
"Unsafe_SetObjectVolatile"
);
oop
x
=
JNIHandles
::
resolve
(
x_h
);
oop
p
=
JNIHandles
::
resolve
(
obj
);
// Catch VolatileCallSite.target stores (via
// CallSite.setTargetVolatile) and check call site dependencies.
if
((
offset
==
java_lang_invoke_CallSite
::
target_offset_in_bytes
())
&&
p
->
is_a
(
SystemDictionary
::
CallSite_klass
()))
{
oop
call_site
=
p
;
oop
method_handle
=
x
;
assert
(
call_site
->
is_a
(
SystemDictionary
::
CallSite_klass
()),
"must be"
);
assert
(
method_handle
->
is_a
(
SystemDictionary
::
MethodHandle_klass
()),
"must be"
);
{
// Walk all nmethods depending on this call site.
MutexLocker
mu
(
Compile_lock
,
thread
);
Universe
::
flush_dependents_on
(
call_site
,
method_handle
);
}
}
void
*
addr
=
index_oop_from_field_offset_long
(
p
,
offset
);
OrderAccess
::
release
();
if
(
UseCompressedOops
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录