Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
77172117
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看板
提交
77172117
编写于
9月 09, 2011
作者:
I
iveresov
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
d0e622be
1ac0fbea
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
282 addition
and
63 deletion
+282
-63
src/cpu/sparc/vm/frame_sparc.cpp
src/cpu/sparc/vm/frame_sparc.cpp
+6
-0
src/cpu/x86/vm/frame_x86.cpp
src/cpu/x86/vm/frame_x86.cpp
+6
-0
src/cpu/x86/vm/sharedRuntime_x86_32.cpp
src/cpu/x86/vm/sharedRuntime_x86_32.cpp
+2
-2
src/cpu/x86/vm/sharedRuntime_x86_64.cpp
src/cpu/x86/vm/sharedRuntime_x86_64.cpp
+2
-2
src/cpu/zero/vm/frame_zero.cpp
src/cpu/zero/vm/frame_zero.cpp
+6
-0
src/share/vm/classfile/javaClasses.cpp
src/share/vm/classfile/javaClasses.cpp
+0
-8
src/share/vm/classfile/javaClasses.hpp
src/share/vm/classfile/javaClasses.hpp
+12
-9
src/share/vm/oops/klassOop.hpp
src/share/vm/oops/klassOop.hpp
+3
-1
src/share/vm/oops/oop.hpp
src/share/vm/oops/oop.hpp
+3
-1
src/share/vm/oops/oop.inline.hpp
src/share/vm/oops/oop.inline.hpp
+11
-1
src/share/vm/opto/chaitin.hpp
src/share/vm/opto/chaitin.hpp
+1
-0
src/share/vm/opto/loopTransform.cpp
src/share/vm/opto/loopTransform.cpp
+5
-1
src/share/vm/opto/postaloc.cpp
src/share/vm/opto/postaloc.cpp
+29
-12
src/share/vm/prims/methodHandles.cpp
src/share/vm/prims/methodHandles.cpp
+53
-16
src/share/vm/runtime/arguments.cpp
src/share/vm/runtime/arguments.cpp
+0
-3
src/share/vm/runtime/deoptimization.cpp
src/share/vm/runtime/deoptimization.cpp
+5
-4
src/share/vm/runtime/deoptimization.hpp
src/share/vm/runtime/deoptimization.hpp
+3
-3
src/share/vm/runtime/frame.hpp
src/share/vm/runtime/frame.hpp
+4
-0
test/compiler/7068051/Test7068051.java
test/compiler/7068051/Test7068051.java
+82
-0
test/compiler/7068051/Test7068051.sh
test/compiler/7068051/Test7068051.sh
+49
-0
未找到文件。
src/cpu/sparc/vm/frame_sparc.cpp
浏览文件 @
77172117
...
...
@@ -839,3 +839,9 @@ void frame::describe_pd(FrameValues& values, int frame_no) {
}
#endif
intptr_t
*
frame
::
initial_deoptimization_info
()
{
// unused... but returns fp() to minimize changes introduced by 7087445
return
fp
();
}
src/cpu/x86/vm/frame_x86.cpp
浏览文件 @
77172117
...
...
@@ -666,3 +666,9 @@ void frame::describe_pd(FrameValues& values, int frame_no) {
}
#endif
intptr_t
*
frame
::
initial_deoptimization_info
()
{
// used to reset the saved FP
return
fp
();
}
src/cpu/x86/vm/sharedRuntime_x86_32.cpp
浏览文件 @
77172117
...
...
@@ -2471,7 +2471,7 @@ void SharedRuntime::generate_deopt_blob() {
__
movl
(
counter
,
rbx
);
// Pick up the initial fp we should save
__
movptr
(
rbp
,
Address
(
rdi
,
Deoptimization
::
UnrollBlock
::
initial_
fp
_offset_in_bytes
()));
__
movptr
(
rbp
,
Address
(
rdi
,
Deoptimization
::
UnrollBlock
::
initial_
info
_offset_in_bytes
()));
// Now adjust the caller's stack to make up for the extra locals
// but record the original sp so that we can save it in the skeletal interpreter
...
...
@@ -2691,7 +2691,7 @@ void SharedRuntime::generate_uncommon_trap_blob() {
__
movl
(
counter
,
rbx
);
// Pick up the initial fp we should save
__
movptr
(
rbp
,
Address
(
rdi
,
Deoptimization
::
UnrollBlock
::
initial_
fp
_offset_in_bytes
()));
__
movptr
(
rbp
,
Address
(
rdi
,
Deoptimization
::
UnrollBlock
::
initial_
info
_offset_in_bytes
()));
// Now adjust the caller's stack to make up for the extra locals
// but record the original sp so that we can save it in the skeletal interpreter
...
...
src/cpu/x86/vm/sharedRuntime_x86_64.cpp
浏览文件 @
77172117
...
...
@@ -2730,7 +2730,7 @@ void SharedRuntime::generate_deopt_blob() {
__
movl
(
rdx
,
Address
(
rdi
,
Deoptimization
::
UnrollBlock
::
number_of_frames_offset_in_bytes
()));
// Pick up the initial fp we should save
__
movptr
(
rbp
,
Address
(
rdi
,
Deoptimization
::
UnrollBlock
::
initial_
fp
_offset_in_bytes
()));
__
movptr
(
rbp
,
Address
(
rdi
,
Deoptimization
::
UnrollBlock
::
initial_
info
_offset_in_bytes
()));
// Now adjust the caller's stack to make up for the extra locals
// but record the original sp so that we can save it in the skeletal interpreter
...
...
@@ -2922,7 +2922,7 @@ void SharedRuntime::generate_uncommon_trap_blob() {
// Pick up the initial fp we should save
__
movptr
(
rbp
,
Address
(
rdi
,
Deoptimization
::
UnrollBlock
::
initial_
fp
_offset_in_bytes
()));
Deoptimization
::
UnrollBlock
::
initial_
info
_offset_in_bytes
()));
// Now adjust the caller's stack to make up for the extra locals but
// record the original sp so that we can save it in the skeletal
...
...
src/cpu/zero/vm/frame_zero.cpp
浏览文件 @
77172117
...
...
@@ -425,3 +425,9 @@ void frame::describe_pd(FrameValues& values, int frame_no) {
}
#endif
intptr_t
*
frame
::
initial_deoptimization_info
()
{
// unused... but returns fp() to minimize changes introduced by 7087445
return
fp
();
}
src/share/vm/classfile/javaClasses.cpp
浏览文件 @
77172117
...
...
@@ -2707,14 +2707,6 @@ void java_lang_invoke_CallSite::compute_offsets() {
}
}
oop
java_lang_invoke_CallSite
::
target
(
oop
site
)
{
return
site
->
obj_field
(
_target_offset
);
}
void
java_lang_invoke_CallSite
::
set_target
(
oop
site
,
oop
target
)
{
site
->
obj_field_put
(
_target_offset
,
target
);
}
// Support for java_security_AccessControlContext
...
...
src/share/vm/classfile/javaClasses.hpp
浏览文件 @
77172117
...
...
@@ -771,7 +771,7 @@ class java_lang_ref_Reference: AllStatic {
ref
->
obj_field_put
(
referent_offset
,
value
);
}
static
void
set_referent_raw
(
oop
ref
,
oop
value
)
{
ref
->
obj_field_
raw_put
(
referent_offset
,
value
);
ref
->
obj_field_
put_raw
(
referent_offset
,
value
);
}
static
HeapWord
*
referent_addr
(
oop
ref
)
{
return
ref
->
obj_field_addr
<
HeapWord
>
(
referent_offset
);
...
...
@@ -783,7 +783,7 @@ class java_lang_ref_Reference: AllStatic {
ref
->
obj_field_put
(
next_offset
,
value
);
}
static
void
set_next_raw
(
oop
ref
,
oop
value
)
{
ref
->
obj_field_
raw_put
(
next_offset
,
value
);
ref
->
obj_field_
put_raw
(
next_offset
,
value
);
}
static
HeapWord
*
next_addr
(
oop
ref
)
{
return
ref
->
obj_field_addr
<
HeapWord
>
(
next_offset
);
...
...
@@ -795,7 +795,7 @@ class java_lang_ref_Reference: AllStatic {
ref
->
obj_field_put
(
discovered_offset
,
value
);
}
static
void
set_discovered_raw
(
oop
ref
,
oop
value
)
{
ref
->
obj_field_
raw_put
(
discovered_offset
,
value
);
ref
->
obj_field_
put_raw
(
discovered_offset
,
value
);
}
static
HeapWord
*
discovered_addr
(
oop
ref
)
{
return
ref
->
obj_field_addr
<
HeapWord
>
(
discovered_offset
);
...
...
@@ -1163,14 +1163,17 @@ private:
public:
// Accessors
static
oop
target
(
oop
site
);
static
void
set_target
(
oop
site
,
oop
target
);
static
oop
target
(
oop
site
)
{
return
site
->
obj_field
(
_target_offset
);
}
static
void
set_target
(
oop
site
,
oop
target
)
{
site
->
obj_field_put
(
_target_offset
,
target
);
}
static
oop
caller_method
(
oop
site
);
static
void
set_caller_method
(
oop
site
,
oop
ref
);
static
volatile
oop
target_volatile
(
oop
site
)
{
return
site
->
obj_field_volatile
(
_target_offset
);
}
static
void
set_target_volatile
(
oop
site
,
oop
target
)
{
site
->
obj_field_put_volatile
(
_target_offset
,
target
);
}
static
jint
caller_bci
(
oop
site
);
static
void
set_caller_bci
(
oop
site
,
jint
bci
);
static
oop
caller_method
(
oop
site
);
static
void
set_caller_method
(
oop
site
,
oop
ref
);
static
jint
caller_bci
(
oop
site
);
static
void
set_caller_bci
(
oop
site
,
jint
bci
);
// Testers
static
bool
is_subclass
(
klassOop
klass
)
{
...
...
src/share/vm/oops/klassOop.hpp
浏览文件 @
77172117
...
...
@@ -53,8 +53,10 @@ class klassOopDesc : public oopDesc {
private:
// These have no implementation since klassOop should never be accessed in this fashion
oop
obj_field
(
int
offset
)
const
;
volatile
oop
obj_field_volatile
(
int
offset
)
const
;
void
obj_field_put
(
int
offset
,
oop
value
);
void
obj_field_raw_put
(
int
offset
,
oop
value
);
void
obj_field_put_raw
(
int
offset
,
oop
value
);
void
obj_field_put_volatile
(
int
offset
,
oop
value
);
jbyte
byte_field
(
int
offset
)
const
;
void
byte_field_put
(
int
offset
,
jbyte
contents
);
...
...
src/share/vm/oops/oop.hpp
浏览文件 @
77172117
...
...
@@ -214,8 +214,10 @@ class oopDesc {
// Access to fields in a instanceOop through these methods.
oop
obj_field
(
int
offset
)
const
;
volatile
oop
obj_field_volatile
(
int
offset
)
const
;
void
obj_field_put
(
int
offset
,
oop
value
);
void
obj_field_raw_put
(
int
offset
,
oop
value
);
void
obj_field_put_raw
(
int
offset
,
oop
value
);
void
obj_field_put_volatile
(
int
offset
,
oop
value
);
jbyte
byte_field
(
int
offset
)
const
;
void
byte_field_put
(
int
offset
,
jbyte
contents
);
...
...
src/share/vm/oops/oop.inline.hpp
浏览文件 @
77172117
...
...
@@ -321,15 +321,25 @@ inline oop oopDesc::obj_field(int offset) const {
load_decode_heap_oop
(
obj_field_addr
<
narrowOop
>
(
offset
))
:
load_decode_heap_oop
(
obj_field_addr
<
oop
>
(
offset
));
}
inline
volatile
oop
oopDesc
::
obj_field_volatile
(
int
offset
)
const
{
volatile
oop
value
=
obj_field
(
offset
);
OrderAccess
::
acquire
();
return
value
;
}
inline
void
oopDesc
::
obj_field_put
(
int
offset
,
oop
value
)
{
UseCompressedOops
?
oop_store
(
obj_field_addr
<
narrowOop
>
(
offset
),
value
)
:
oop_store
(
obj_field_addr
<
oop
>
(
offset
),
value
);
}
inline
void
oopDesc
::
obj_field_
raw_put
(
int
offset
,
oop
value
)
{
inline
void
oopDesc
::
obj_field_
put_raw
(
int
offset
,
oop
value
)
{
UseCompressedOops
?
encode_store_heap_oop
(
obj_field_addr
<
narrowOop
>
(
offset
),
value
)
:
encode_store_heap_oop
(
obj_field_addr
<
oop
>
(
offset
),
value
);
}
inline
void
oopDesc
::
obj_field_put_volatile
(
int
offset
,
oop
value
)
{
OrderAccess
::
release
();
obj_field_put
(
offset
,
value
);
OrderAccess
::
fence
();
}
inline
jbyte
oopDesc
::
byte_field
(
int
offset
)
const
{
return
(
jbyte
)
*
byte_field_addr
(
offset
);
}
inline
void
oopDesc
::
byte_field_put
(
int
offset
,
jbyte
contents
)
{
*
byte_field_addr
(
offset
)
=
(
jint
)
contents
;
}
...
...
src/share/vm/opto/chaitin.hpp
浏览文件 @
77172117
...
...
@@ -482,6 +482,7 @@ private:
}
int
yank_if_dead
(
Node
*
old
,
Block
*
current_block
,
Node_List
*
value
,
Node_List
*
regnd
);
int
yank
(
Node
*
old
,
Block
*
current_block
,
Node_List
*
value
,
Node_List
*
regnd
);
int
elide_copy
(
Node
*
n
,
int
k
,
Block
*
current_block
,
Node_List
&
value
,
Node_List
&
regnd
,
bool
can_change_regs
);
int
use_prior_register
(
Node
*
copy
,
uint
idx
,
Node
*
def
,
Block
*
current_block
,
Node_List
&
value
,
Node_List
&
regnd
);
bool
may_be_copy_of_callee
(
Node
*
def
)
const
;
...
...
src/share/vm/opto/loopTransform.cpp
浏览文件 @
77172117
...
...
@@ -709,10 +709,13 @@ bool IdealLoopTree::policy_unroll( PhaseIdealLoop *phase ) const {
// Adjust body_size to determine if we unroll or not
uint
body_size
=
_body
.
size
();
// Key test to unroll loop in CRC32 java code
int
xors_in_loop
=
0
;
// Also count ModL, DivL and MulL which expand mightly
for
(
uint
k
=
0
;
k
<
_body
.
size
();
k
++
)
{
Node
*
n
=
_body
.
at
(
k
);
switch
(
n
->
Opcode
())
{
case
Op_XorI
:
xors_in_loop
++
;
break
;
// CRC32 java code
case
Op_ModL
:
body_size
+=
30
;
break
;
case
Op_DivL
:
body_size
+=
30
;
break
;
case
Op_MulL
:
body_size
+=
10
;
break
;
...
...
@@ -729,7 +732,8 @@ bool IdealLoopTree::policy_unroll( PhaseIdealLoop *phase ) const {
// Check for being too big
if
(
body_size
>
(
uint
)
LoopUnrollLimit
)
{
// Normal case: loop too big
if
(
xors_in_loop
>=
4
&&
body_size
<
(
uint
)
LoopUnrollLimit
*
4
)
return
true
;
// Normal case: loop too big
return
false
;
}
...
...
src/share/vm/opto/postaloc.cpp
浏览文件 @
77172117
...
...
@@ -72,7 +72,22 @@ bool PhaseChaitin::may_be_copy_of_callee( Node *def ) const {
return
i
==
limit
;
}
//------------------------------yank-----------------------------------
// Helper function for yank_if_dead
int
PhaseChaitin
::
yank
(
Node
*
old
,
Block
*
current_block
,
Node_List
*
value
,
Node_List
*
regnd
)
{
int
blk_adjust
=
0
;
Block
*
oldb
=
_cfg
.
_bbs
[
old
->
_idx
];
oldb
->
find_remove
(
old
);
// Count 1 if deleting an instruction from the current block
if
(
oldb
==
current_block
)
blk_adjust
++
;
_cfg
.
_bbs
.
map
(
old
->
_idx
,
NULL
);
OptoReg
::
Name
old_reg
=
lrgs
(
n2lidx
(
old
)).
reg
();
if
(
regnd
&&
(
*
regnd
)[
old_reg
]
==
old
)
{
// Instruction is currently available?
value
->
map
(
old_reg
,
NULL
);
// Yank from value/regnd maps
regnd
->
map
(
old_reg
,
NULL
);
// This register's value is now unknown
}
return
blk_adjust
;
}
//------------------------------yank_if_dead-----------------------------------
// Removed an edge from 'old'. Yank if dead. Return adjustment counts to
...
...
@@ -80,18 +95,20 @@ bool PhaseChaitin::may_be_copy_of_callee( Node *def ) const {
int
PhaseChaitin
::
yank_if_dead
(
Node
*
old
,
Block
*
current_block
,
Node_List
*
value
,
Node_List
*
regnd
)
{
int
blk_adjust
=
0
;
while
(
old
->
outcnt
()
==
0
&&
old
!=
C
->
top
())
{
Block
*
oldb
=
_cfg
.
_bbs
[
old
->
_idx
];
oldb
->
find_remove
(
old
);
// Count 1 if deleting an instruction from the current block
if
(
oldb
==
current_block
)
blk_adjust
++
;
_cfg
.
_bbs
.
map
(
old
->
_idx
,
NULL
);
OptoReg
::
Name
old_reg
=
lrgs
(
n2lidx
(
old
)).
reg
();
if
(
regnd
&&
(
*
regnd
)[
old_reg
]
==
old
)
{
// Instruction is currently available?
value
->
map
(
old_reg
,
NULL
);
// Yank from value/regnd maps
regnd
->
map
(
old_reg
,
NULL
);
// This register's value is now unknown
blk_adjust
+=
yank
(
old
,
current_block
,
value
,
regnd
);
Node
*
tmp
=
NULL
;
for
(
uint
i
=
1
;
i
<
old
->
req
();
i
++
)
{
if
(
old
->
in
(
i
)
->
is_MachTemp
())
{
Node
*
machtmp
=
old
->
in
(
i
);
assert
(
machtmp
->
outcnt
()
==
1
,
"expected for a MachTemp"
);
blk_adjust
+=
yank
(
machtmp
,
current_block
,
value
,
regnd
);
machtmp
->
disconnect_inputs
(
NULL
);
}
else
{
assert
(
tmp
==
NULL
,
"can't handle more non MachTemp inputs"
);
tmp
=
old
->
in
(
i
);
}
}
assert
(
old
->
req
()
<=
2
,
"can't handle more inputs"
);
Node
*
tmp
=
old
->
req
()
>
1
?
old
->
in
(
1
)
:
NULL
;
old
->
disconnect_inputs
(
NULL
);
if
(
!
tmp
)
break
;
old
=
tmp
;
...
...
src/share/vm/prims/methodHandles.cpp
浏览文件 @
77172117
...
...
@@ -3081,6 +3081,30 @@ JVM_ENTRY(jint, MHN_getMembers(JNIEnv *env, jobject igcls,
}
JVM_END
JVM_ENTRY
(
void
,
MHN_setCallSiteTargetNormal
(
JNIEnv
*
env
,
jobject
igcls
,
jobject
call_site_jh
,
jobject
target_jh
))
{
oop
call_site
=
JNIHandles
::
resolve_non_null
(
call_site_jh
);
oop
target
=
JNIHandles
::
resolve
(
target_jh
);
{
// Walk all nmethods depending on this call site.
MutexLocker
mu
(
Compile_lock
,
thread
);
Universe
::
flush_dependents_on
(
call_site
,
target
);
}
java_lang_invoke_CallSite
::
set_target
(
call_site
,
target
);
}
JVM_END
JVM_ENTRY
(
void
,
MHN_setCallSiteTargetVolatile
(
JNIEnv
*
env
,
jobject
igcls
,
jobject
call_site_jh
,
jobject
target_jh
))
{
oop
call_site
=
JNIHandles
::
resolve_non_null
(
call_site_jh
);
oop
target
=
JNIHandles
::
resolve
(
target_jh
);
{
// Walk all nmethods depending on this call site.
MutexLocker
mu
(
Compile_lock
,
thread
);
Universe
::
flush_dependents_on
(
call_site
,
target
);
}
java_lang_invoke_CallSite
::
set_target_volatile
(
call_site
,
target
);
}
JVM_END
methodOop
MethodHandles
::
resolve_raise_exception_method
(
TRAPS
)
{
if
(
_raise_exception_method
!=
NULL
)
{
// no need to do it twice
...
...
@@ -3137,12 +3161,15 @@ JVM_END
/// JVM_RegisterMethodHandleMethods
#undef CS // Solaris builds complain
#define LANG "Ljava/lang/"
#define JLINV "Ljava/lang/invoke/"
#define OBJ LANG"Object;"
#define CLS LANG"Class;"
#define STRG LANG"String;"
#define CS JLINV"CallSite;"
#define MT JLINV"MethodType;"
#define MH JLINV"MethodHandle;"
#define MEM JLINV"MemberName;"
...
...
@@ -3153,29 +3180,34 @@ JVM_END
#define CC (char*)
/*cast a literal from (const char*)*/
#define FN_PTR(f) CAST_FROM_FN_PTR(void*, &f)
// These are the native methods on
sun
.invoke.MethodHandleNatives.
// These are the native methods on
java.lang
.invoke.MethodHandleNatives.
static
JNINativeMethod
methods
[]
=
{
// void init(MemberName self, AccessibleObject ref)
{
CC
"init"
,
CC
"("
AMH
""
MH
"I)V"
,
FN_PTR
(
MHN_init_AMH
)},
{
CC
"init"
,
CC
"("
BMH
""
OBJ
"I)V"
,
FN_PTR
(
MHN_init_BMH
)},
{
CC
"init"
,
CC
"("
DMH
""
OBJ
"Z"
CLS
")V"
,
FN_PTR
(
MHN_init_DMH
)},
{
CC
"init"
,
CC
"("
MT
")V"
,
FN_PTR
(
MHN_init_MT
)},
{
CC
"init"
,
CC
"("
MEM
""
OBJ
")V"
,
FN_PTR
(
MHN_init_Mem
)},
{
CC
"expand"
,
CC
"("
MEM
")V"
,
FN_PTR
(
MHN_expand_Mem
)},
{
CC
"resolve"
,
CC
"("
MEM
""
CLS
")V"
,
FN_PTR
(
MHN_resolve_Mem
)},
{
CC
"getTarget"
,
CC
"("
MH
"I)"
OBJ
,
FN_PTR
(
MHN_getTarget
)},
{
CC
"getConstant"
,
CC
"(I)I"
,
FN_PTR
(
MHN_getConstant
)},
{
CC
"init"
,
CC
"("
AMH
""
MH
"I)V"
,
FN_PTR
(
MHN_init_AMH
)},
{
CC
"init"
,
CC
"("
BMH
""
OBJ
"I)V"
,
FN_PTR
(
MHN_init_BMH
)},
{
CC
"init"
,
CC
"("
DMH
""
OBJ
"Z"
CLS
")V"
,
FN_PTR
(
MHN_init_DMH
)},
{
CC
"init"
,
CC
"("
MT
")V"
,
FN_PTR
(
MHN_init_MT
)},
{
CC
"init"
,
CC
"("
MEM
""
OBJ
")V"
,
FN_PTR
(
MHN_init_Mem
)},
{
CC
"expand"
,
CC
"("
MEM
")V"
,
FN_PTR
(
MHN_expand_Mem
)},
{
CC
"resolve"
,
CC
"("
MEM
""
CLS
")V"
,
FN_PTR
(
MHN_resolve_Mem
)},
{
CC
"getTarget"
,
CC
"("
MH
"I)"
OBJ
,
FN_PTR
(
MHN_getTarget
)},
{
CC
"getConstant"
,
CC
"(I)I"
,
FN_PTR
(
MHN_getConstant
)},
// static native int getNamedCon(int which, Object[] name)
{
CC
"getNamedCon"
,
CC
"(I["
OBJ
")I"
,
FN_PTR
(
MHN_getNamedCon
)},
{
CC
"getNamedCon"
,
CC
"(I["
OBJ
")I"
,
FN_PTR
(
MHN_getNamedCon
)},
// static native int getMembers(Class<?> defc, String matchName, String matchSig,
// int matchFlags, Class<?> caller, int skip, MemberName[] results);
{
CC
"getMembers"
,
CC
"("
CLS
""
STRG
""
STRG
"I"
CLS
"I["
MEM
")I"
,
FN_PTR
(
MHN_getMembers
)}
{
CC
"getMembers"
,
CC
"("
CLS
""
STRG
""
STRG
"I"
CLS
"I["
MEM
")I"
,
FN_PTR
(
MHN_getMembers
)}
};
static
JNINativeMethod
call_site_methods
[]
=
{
{
CC
"setCallSiteTargetNormal"
,
CC
"("
CS
""
MH
")V"
,
FN_PTR
(
MHN_setCallSiteTargetNormal
)},
{
CC
"setCallSiteTargetVolatile"
,
CC
"("
CS
""
MH
")V"
,
FN_PTR
(
MHN_setCallSiteTargetVolatile
)}
};
static
JNINativeMethod
invoke_methods
[]
=
{
// void init(MemberName self, AccessibleObject ref)
{
CC
"invoke"
,
CC
"(["
OBJ
")"
OBJ
,
FN_PTR
(
MH_invoke_UOE
)},
{
CC
"invokeExact"
,
CC
"(["
OBJ
")"
OBJ
,
FN_PTR
(
MH_invokeExact_UOE
)}
{
CC
"invoke"
,
CC
"(["
OBJ
")"
OBJ
,
FN_PTR
(
MH_invoke_UOE
)},
{
CC
"invokeExact"
,
CC
"(["
OBJ
")"
OBJ
,
FN_PTR
(
MH_invokeExact_UOE
)}
};
// This one function is exported, used by NativeLookup.
...
...
@@ -3188,11 +3220,11 @@ JVM_ENTRY(void, JVM_RegisterMethodHandleMethods(JNIEnv *env, jclass MHN_class))
return
;
// bind nothing
}
assert
(
!
MethodHandles
::
enabled
(),
"must not be enabled"
);
bool
enable_MH
=
true
;
{
ThreadToNativeFromVM
ttnfv
(
thread
);
int
status
=
env
->
RegisterNatives
(
MHN_class
,
methods
,
sizeof
(
methods
)
/
sizeof
(
JNINativeMethod
));
if
(
!
env
->
ExceptionOccurred
())
{
const
char
*
L_MH_name
=
(
JLINV
"MethodHandle"
);
...
...
@@ -3201,11 +3233,16 @@ JVM_ENTRY(void, JVM_RegisterMethodHandleMethods(JNIEnv *env, jclass MHN_class))
status
=
env
->
RegisterNatives
(
MH_class
,
invoke_methods
,
sizeof
(
invoke_methods
)
/
sizeof
(
JNINativeMethod
));
}
if
(
env
->
ExceptionOccurred
())
{
MethodHandles
::
set_enabled
(
false
);
warning
(
"JSR 292 method handle code is mismatched to this JVM. Disabling support."
);
enable_MH
=
false
;
env
->
ExceptionClear
();
}
status
=
env
->
RegisterNatives
(
MHN_class
,
call_site_methods
,
sizeof
(
call_site_methods
)
/
sizeof
(
JNINativeMethod
));
if
(
env
->
ExceptionOccurred
())
{
// Exception is okay until 7087357
env
->
ExceptionClear
();
}
}
if
(
enable_MH
)
{
...
...
src/share/vm/runtime/arguments.cpp
浏览文件 @
77172117
...
...
@@ -3021,9 +3021,6 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
}
#ifdef JAVASE_EMBEDDED
#ifdef PPC
UNSUPPORTED_OPTION
(
EnableInvokeDynamic
,
"Invoke dynamic"
);
#endif
UNSUPPORTED_OPTION
(
UseG1GC
,
"G1 GC"
);
#endif
...
...
src/share/vm/runtime/deoptimization.cpp
浏览文件 @
77172117
...
...
@@ -103,7 +103,7 @@ Deoptimization::UnrollBlock::UnrollBlock(int size_of_deoptimized_frame,
_frame_pcs
=
frame_pcs
;
_register_block
=
NEW_C_HEAP_ARRAY
(
intptr_t
,
RegisterMap
::
reg_count
*
2
);
_return_type
=
return_type
;
_initial_
fp
=
0
;
_initial_
info
=
0
;
// PD (x86 only)
_counter_temp
=
0
;
_unpack_kind
=
0
;
...
...
@@ -486,9 +486,10 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread
frame_sizes
,
frame_pcs
,
return_type
);
// On some platforms, we need a way to pass fp to the unpacking code
// so the skeletal frames come out correct.
info
->
set_initial_fp
((
intptr_t
)
array
->
sender
().
fp
());
// On some platforms, we need a way to pass some platform dependent
// information to the unpacking code so the skeletal frames come out
// correct (initial fp value, unextended sp, ...)
info
->
set_initial_info
((
intptr_t
)
array
->
sender
().
initial_deoptimization_info
());
if
(
array
->
frames
()
>
1
)
{
if
(
VerifyStack
&&
TraceDeoptimization
)
{
...
...
src/share/vm/runtime/deoptimization.hpp
浏览文件 @
77172117
...
...
@@ -137,7 +137,7 @@ class Deoptimization : AllStatic {
address
*
_frame_pcs
;
// Array of frame pc's, in bytes, for unrolling the stack
intptr_t
*
_register_block
;
// Block for storing callee-saved registers.
BasicType
_return_type
;
// Tells if we have to restore double or long return value
intptr_t
_initial_
fp
;
// FP of the sender frame
intptr_t
_initial_
info
;
// Platform dependent data for the sender frame (was FP on x86)
int
_caller_actual_parameters
;
// The number of actual arguments at the
// interpreted caller of the deoptimized frame
...
...
@@ -170,7 +170,7 @@ class Deoptimization : AllStatic {
// Returns the total size of frames
int
size_of_frames
()
const
;
void
set_initial_
fp
(
intptr_t
fp
)
{
_initial_fp
=
fp
;
}
void
set_initial_
info
(
intptr_t
info
)
{
_initial_info
=
info
;
}
int
caller_actual_parameters
()
const
{
return
_caller_actual_parameters
;
}
...
...
@@ -184,7 +184,7 @@ class Deoptimization : AllStatic {
static
int
register_block_offset_in_bytes
()
{
return
offset_of
(
UnrollBlock
,
_register_block
);
}
static
int
return_type_offset_in_bytes
()
{
return
offset_of
(
UnrollBlock
,
_return_type
);
}
static
int
counter_temp_offset_in_bytes
()
{
return
offset_of
(
UnrollBlock
,
_counter_temp
);
}
static
int
initial_
fp_offset_in_bytes
()
{
return
offset_of
(
UnrollBlock
,
_initial_fp
);
}
static
int
initial_
info_offset_in_bytes
()
{
return
offset_of
(
UnrollBlock
,
_initial_info
);
}
static
int
unpack_kind_offset_in_bytes
()
{
return
offset_of
(
UnrollBlock
,
_unpack_kind
);
}
static
int
sender_sp_temp_offset_in_bytes
()
{
return
offset_of
(
UnrollBlock
,
_sender_sp_temp
);
}
...
...
src/share/vm/runtime/frame.hpp
浏览文件 @
77172117
...
...
@@ -221,6 +221,10 @@ class frame VALUE_OBJ_CLASS_SPEC {
// returns the stack pointer of the calling frame
intptr_t
*
sender_sp
()
const
;
// Deoptimization info, if needed (platform dependent).
// Stored in the initial_info field of the unroll info, to be used by
// the platform dependent deoptimization blobs.
intptr_t
*
initial_deoptimization_info
();
// Interpreter frames:
...
...
test/compiler/7068051/Test7068051.java
0 → 100644
浏览文件 @
77172117
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
/**
* @test
* @bug 7068051
* @summary SIGSEGV in PhaseIdealLoop::build_loop_late_post on T5440
*
* @run shell/timeout=300 Test7068051.sh
*/
import
java.io.*
;
import
java.nio.*
;
import
java.util.*
;
import
java.util.zip.*
;
public
class
Test7068051
{
public
static
void
main
(
String
[]
args
)
throws
Throwable
{
ZipFile
zf
=
new
ZipFile
(
args
[
0
]);
Enumeration
<?
extends
ZipEntry
>
entries
=
zf
.
entries
();
ArrayList
<
String
>
names
=
new
ArrayList
<
String
>();
while
(
entries
.
hasMoreElements
())
{
names
.
add
(
entries
.
nextElement
().
getName
());
}
byte
[]
bytes
=
new
byte
[
16
];
for
(
String
name
:
names
)
{
ZipEntry
e
=
zf
.
getEntry
(
name
);
if
(
e
.
isDirectory
())
continue
;
final
InputStream
is
=
zf
.
getInputStream
(
e
);
try
{
while
(
is
.
read
(
bytes
)
>=
0
)
{
}
is
.
close
();
}
catch
(
IOException
x
)
{
System
.
out
.
println
(
".................................."
);
System
.
out
.
println
(
" --> is :"
+
is
);
System
.
out
.
println
(
" is.hash :"
+
is
.
hashCode
());
System
.
out
.
println
();
System
.
out
.
println
(
" e.name :"
+
e
.
getName
());
System
.
out
.
println
(
" e.hash :"
+
e
.
hashCode
());
System
.
out
.
println
(
" e.method :"
+
e
.
getMethod
());
System
.
out
.
println
(
" e.size :"
+
e
.
getSize
());
System
.
out
.
println
(
" e.csize :"
+
e
.
getCompressedSize
());
x
.
printStackTrace
();
System
.
out
.
println
(
".................................."
);
System
.
exit
(
97
);
}
}
zf
.
close
();
}
}
test/compiler/7068051/Test7068051.sh
0 → 100644
浏览文件 @
77172117
#!/bin/sh
#
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
if
[
"
${
TESTSRC
}
"
=
""
]
then
echo
"TESTSRC not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTSRC=
${
TESTSRC
}
"
if
[
"
${
TESTJAVA
}
"
=
""
]
then
echo
"TESTJAVA not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTJAVA=
${
TESTJAVA
}
"
set
-x
${
TESTJAVA
}
/bin/jar xf
${
TESTJAVA
}
/jre/lib/javaws.jar
${
TESTJAVA
}
/bin/jar cf foo.jar
*
cp
${
TESTSRC
}
/Test7068051.java ./
${
TESTJAVA
}
/bin/jar
-uf0
foo.jar Test7068051.java
${
TESTJAVA
}
/bin/javac
-d
.
Test7068051.java
${
TESTJAVA
}
/bin/java
-showversion
-Xbatch
${
TESTVMOPTS
}
Test7068051 foo.jar
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录