Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
4275ef20
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看板
提交
4275ef20
编写于
9月 10, 2012
作者:
T
twisti
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7196242: vm/mlvm/indy/stress/java/loopsAndThreads crashed
Reviewed-by: jrose, coleenp, jmasa, kvn
上级
bed9d59a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
20 deletion
+23
-20
src/share/vm/interpreter/interpreterRuntime.cpp
src/share/vm/interpreter/interpreterRuntime.cpp
+2
-0
src/share/vm/oops/cpCache.cpp
src/share/vm/oops/cpCache.cpp
+18
-20
src/share/vm/oops/cpCache.hpp
src/share/vm/oops/cpCache.hpp
+3
-0
未找到文件。
src/share/vm/interpreter/interpreterRuntime.cpp
浏览文件 @
4275ef20
...
...
@@ -734,6 +734,7 @@ IRT_ENTRY(void, InterpreterRuntime::resolve_invokehandle(JavaThread* thread)) {
}
// end JvmtiHideSingleStepping
cache_entry
(
thread
)
->
set_method_handle
(
pool
,
info
.
resolved_method
(),
info
.
resolved_appendix
(),
pool
->
resolved_references
());
...
...
@@ -761,6 +762,7 @@ IRT_ENTRY(void, InterpreterRuntime::resolve_invokedynamic(JavaThread* thread)) {
ConstantPoolCacheEntry
*
cp_cache_entry
=
pool
->
invokedynamic_cp_cache_entry_at
(
index
);
cp_cache_entry
->
set_dynamic_call
(
pool
,
info
.
resolved_method
(),
info
.
resolved_appendix
(),
pool
->
resolved_references
());
...
...
src/share/vm/oops/cpCache.cpp
浏览文件 @
4275ef20
...
...
@@ -243,17 +243,20 @@ void ConstantPoolCacheEntry::set_interface_call(methodHandle method, int index)
}
void
ConstantPoolCacheEntry
::
set_method_handle
(
methodHandle
adapter
,
Handle
appendix
,
void
ConstantPoolCacheEntry
::
set_method_handle
(
constantPoolHandle
cpool
,
methodHandle
adapter
,
Handle
appendix
,
objArrayHandle
resolved_references
)
{
set_method_handle_common
(
Bytecodes
::
_invokehandle
,
adapter
,
appendix
,
resolved_references
);
set_method_handle_common
(
cpool
,
Bytecodes
::
_invokehandle
,
adapter
,
appendix
,
resolved_references
);
}
void
ConstantPoolCacheEntry
::
set_dynamic_call
(
methodHandle
adapter
,
Handle
appendix
,
void
ConstantPoolCacheEntry
::
set_dynamic_call
(
constantPoolHandle
cpool
,
methodHandle
adapter
,
Handle
appendix
,
objArrayHandle
resolved_references
)
{
set_method_handle_common
(
Bytecodes
::
_invokedynamic
,
adapter
,
appendix
,
resolved_references
);
set_method_handle_common
(
cpool
,
Bytecodes
::
_invokedynamic
,
adapter
,
appendix
,
resolved_references
);
}
void
ConstantPoolCacheEntry
::
set_method_handle_common
(
Bytecodes
::
Code
invoke_code
,
void
ConstantPoolCacheEntry
::
set_method_handle_common
(
constantPoolHandle
cpool
,
Bytecodes
::
Code
invoke_code
,
methodHandle
adapter
,
Handle
appendix
,
objArrayHandle
resolved_references
)
{
...
...
@@ -261,28 +264,23 @@ void ConstantPoolCacheEntry::set_method_handle_common(Bytecodes::Code invoke_cod
// There are three words to update: flags, refs[f2], f1 (in that order).
// Writers must store all other values before f1.
// Readers must test f1 first for non-null before reading other fields.
// Competing writers must acquire exclusive access on the first
// write, to flags, using a compare/exchange.
// A losing writer to flags must spin until the winner writes f1,
// so that when he returns, he can use the linked cache entry.
// Competing writers must acquire exclusive access via a lock.
// A losing writer waits on the lock until the winner writes f1 and leaves
// the lock, so that when the losing writer returns, he can use the linked
// cache entry.
MonitorLockerEx
ml
(
cpool
->
lock
());
if
(
!
is_f1_null
())
{
return
;
}
bool
has_appendix
=
appendix
.
not_null
();
// Write the flags.
bool
owner
=
init_method_flags_atomic
(
as_TosState
(
adapter
->
result_type
()),
set_method_flags
(
as_TosState
(
adapter
->
result_type
()),
((
has_appendix
?
1
:
0
)
<<
has_appendix_shift
)
|
(
1
<<
is_final_shift
),
adapter
->
size_of_parameters
());
if
(
!
owner
)
{
// Somebody else is working on the same CPCE. Let them proceed.
while
(
is_f1_null
())
{
// Pause momentarily on a low-level lock, to allow racing thread to win.
MutexLockerEx
mu
(
Patching_lock
,
Mutex
::
_no_safepoint_check_flag
);
os
::
yield
();
}
return
;
}
if
(
TraceInvokeDynamic
)
{
tty
->
print_cr
(
"set_method_handle bc=%d appendix="
PTR_FORMAT
"%s method="
PTR_FORMAT
" "
,
...
...
src/share/vm/oops/cpCache.hpp
浏览文件 @
4275ef20
...
...
@@ -221,12 +221,14 @@ class ConstantPoolCacheEntry VALUE_OBJ_CLASS_SPEC {
);
void
set_method_handle
(
constantPoolHandle
cpool
,
// holding constant pool (required for locking)
methodHandle
method
,
// adapter for invokeExact, etc.
Handle
appendix
,
// stored in refs[f2]; could be a java.lang.invoke.MethodType
objArrayHandle
resolved_references
);
void
set_dynamic_call
(
constantPoolHandle
cpool
,
// holding constant pool (required for locking)
methodHandle
method
,
// adapter for this call site
Handle
appendix
,
// stored in refs[f2]; could be a java.lang.invoke.CallSite
objArrayHandle
resolved_references
...
...
@@ -248,6 +250,7 @@ class ConstantPoolCacheEntry VALUE_OBJ_CLASS_SPEC {
// resolution logic needs to make slightly different assessments about the
// number and types of arguments.
void
set_method_handle_common
(
constantPoolHandle
cpool
,
// holding constant pool (required for locking)
Bytecodes
::
Code
invoke_code
,
// _invokehandle or _invokedynamic
methodHandle
adapter
,
// invoker method (f1)
Handle
appendix
,
// appendix such as CallSite, MethodType, etc. (refs[f2])
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录