Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
3a8ec81f
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看板
提交
3a8ec81f
编写于
11月 27, 2009
作者:
T
twisti
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6896043: first round of zero fixes
Reviewed-by: kvn Contributed-by:
N
Gary Benson
<
gbenson@redhat.com
>
上级
f00fd8ba
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
59 addition
and
54 deletion
+59
-54
src/cpu/zero/vm/cppInterpreter_zero.cpp
src/cpu/zero/vm/cppInterpreter_zero.cpp
+14
-0
src/cpu/zero/vm/frame_zero.cpp
src/cpu/zero/vm/frame_zero.cpp
+7
-24
src/cpu/zero/vm/frame_zero.hpp
src/cpu/zero/vm/frame_zero.hpp
+1
-4
src/cpu/zero/vm/globals_zero.hpp
src/cpu/zero/vm/globals_zero.hpp
+0
-1
src/cpu/zero/vm/sharedRuntime_zero.cpp
src/cpu/zero/vm/sharedRuntime_zero.cpp
+8
-1
src/cpu/zero/vm/sharkFrame_zero.hpp
src/cpu/zero/vm/sharkFrame_zero.hpp
+2
-2
src/share/vm/interpreter/bytecodeInterpreter.cpp
src/share/vm/interpreter/bytecodeInterpreter.cpp
+2
-11
src/share/vm/prims/jni.cpp
src/share/vm/prims/jni.cpp
+15
-0
src/share/vm/prims/jvmtiManageCapabilities.cpp
src/share/vm/prims/jvmtiManageCapabilities.cpp
+2
-0
src/share/vm/runtime/os.hpp
src/share/vm/runtime/os.hpp
+8
-11
未找到文件。
src/cpu/zero/vm/cppInterpreter_zero.cpp
浏览文件 @
3a8ec81f
...
@@ -204,6 +204,20 @@ void CppInterpreter::native_entry(methodOop method, intptr_t UNUSED, TRAPS) {
...
@@ -204,6 +204,20 @@ void CppInterpreter::native_entry(methodOop method, intptr_t UNUSED, TRAPS) {
goto
unwind_and_return
;
goto
unwind_and_return
;
}
}
// Update the invocation counter
if
((
UseCompiler
||
CountCompiledCalls
)
&&
!
method
->
is_synchronized
())
{
thread
->
set_do_not_unlock
();
InvocationCounter
*
counter
=
method
->
invocation_counter
();
counter
->
increment
();
if
(
counter
->
reached_InvocationLimit
())
{
CALL_VM_NOCHECK
(
InterpreterRuntime
::
frequency_counter_overflow
(
thread
,
NULL
));
if
(
HAS_PENDING_EXCEPTION
)
goto
unwind_and_return
;
}
thread
->
clr_do_not_unlock
();
}
// Lock if necessary
// Lock if necessary
BasicObjectLock
*
monitor
;
BasicObjectLock
*
monitor
;
monitor
=
NULL
;
monitor
=
NULL
;
...
...
src/cpu/zero/vm/frame_zero.cpp
浏览文件 @
3a8ec81f
...
@@ -36,11 +36,8 @@ bool frame::is_interpreted_frame() const {
...
@@ -36,11 +36,8 @@ bool frame::is_interpreted_frame() const {
return
zeroframe
()
->
is_interpreter_frame
();
return
zeroframe
()
->
is_interpreter_frame
();
}
}
bool
frame
::
is_fake_stub_frame
()
const
{
return
zeroframe
()
->
is_fake_stub_frame
();
}
frame
frame
::
sender_for_entry_frame
(
RegisterMap
*
map
)
const
{
frame
frame
::
sender_for_entry_frame
(
RegisterMap
*
map
)
const
{
assert
(
zeroframe
()
->
is_entry_frame
(),
"wrong type of frame"
);
assert
(
map
!=
NULL
,
"map must be set"
);
assert
(
map
!=
NULL
,
"map must be set"
);
assert
(
!
entry_frame_is_first
(),
"next Java fp must be non zero"
);
assert
(
!
entry_frame_is_first
(),
"next Java fp must be non zero"
);
assert
(
entry_frame_call_wrapper
()
->
anchor
()
->
last_Java_sp
()
==
sender_sp
(),
assert
(
entry_frame_call_wrapper
()
->
anchor
()
->
last_Java_sp
()
==
sender_sp
(),
...
@@ -50,15 +47,10 @@ frame frame::sender_for_entry_frame(RegisterMap *map) const {
...
@@ -50,15 +47,10 @@ frame frame::sender_for_entry_frame(RegisterMap *map) const {
return
frame
(
sender_sp
(),
sp
()
+
1
);
return
frame
(
sender_sp
(),
sp
()
+
1
);
}
}
frame
frame
::
sender_for_interpreter_frame
(
RegisterMap
*
map
)
const
{
frame
frame
::
sender_for_nonentry_frame
(
RegisterMap
*
map
)
const
{
return
frame
(
sender_sp
(),
sp
()
+
1
);
assert
(
zeroframe
()
->
is_interpreter_frame
()
||
}
zeroframe
()
->
is_shark_frame
()
||
zeroframe
()
->
is_fake_stub_frame
(),
"wrong type of frame"
);
frame
frame
::
sender_for_compiled_frame
(
RegisterMap
*
map
)
const
{
return
frame
(
sender_sp
(),
sp
()
+
1
);
}
frame
frame
::
sender_for_fake_stub_frame
(
RegisterMap
*
map
)
const
{
return
frame
(
sender_sp
(),
sp
()
+
1
);
return
frame
(
sender_sp
(),
sp
()
+
1
);
}
}
...
@@ -69,17 +61,8 @@ frame frame::sender(RegisterMap* map) const {
...
@@ -69,17 +61,8 @@ frame frame::sender(RegisterMap* map) const {
if
(
is_entry_frame
())
if
(
is_entry_frame
())
return
sender_for_entry_frame
(
map
);
return
sender_for_entry_frame
(
map
);
else
if
(
is_interpreted_frame
())
return
sender_for_nonentry_frame
(
map
);
return
sender_for_interpreter_frame
(
map
);
if
(
is_compiled_frame
())
return
sender_for_compiled_frame
(
map
);
if
(
is_fake_stub_frame
())
return
sender_for_fake_stub_frame
(
map
);
ShouldNotReachHere
();
}
}
#ifdef CC_INTERP
#ifdef CC_INTERP
...
...
src/cpu/zero/vm/frame_zero.hpp
浏览文件 @
3a8ec81f
...
@@ -65,10 +65,7 @@
...
@@ -65,10 +65,7 @@
}
}
public
:
public
:
bool
is_fake_stub_frame
()
const
;
frame
sender_for_nonentry_frame
(
RegisterMap
*
map
)
const
;
public
:
frame
sender_for_fake_stub_frame
(
RegisterMap
*
map
)
const
;
public
:
public
:
void
zero_print_on_error
(
int
index
,
void
zero_print_on_error
(
int
index
,
...
...
src/cpu/zero/vm/globals_zero.hpp
浏览文件 @
3a8ec81f
...
@@ -36,7 +36,6 @@ define_pd_global(bool, UncommonNullCast, true);
...
@@ -36,7 +36,6 @@ define_pd_global(bool, UncommonNullCast, true);
define_pd_global
(
intx
,
CodeEntryAlignment
,
32
);
define_pd_global
(
intx
,
CodeEntryAlignment
,
32
);
define_pd_global
(
intx
,
InlineFrequencyCount
,
100
);
define_pd_global
(
intx
,
InlineFrequencyCount
,
100
);
define_pd_global
(
intx
,
InlineSmallCode
,
1000
);
define_pd_global
(
intx
,
PreInflateSpin
,
10
);
define_pd_global
(
intx
,
PreInflateSpin
,
10
);
define_pd_global
(
intx
,
StackYellowPages
,
2
);
define_pd_global
(
intx
,
StackYellowPages
,
2
);
...
...
src/cpu/zero/vm/sharedRuntime_zero.cpp
浏览文件 @
3a8ec81f
/*
/*
* Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2007, 2008 Red Hat, Inc.
* Copyright 2007, 2008
, 2009
Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -61,7 +61,14 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
...
@@ -61,7 +61,14 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
BasicType
*
in_sig_bt
,
BasicType
*
in_sig_bt
,
VMRegPair
*
in_regs
,
VMRegPair
*
in_regs
,
BasicType
ret_type
)
{
BasicType
ret_type
)
{
#ifdef SHARK
return
SharkCompiler
::
compiler
()
->
generate_native_wrapper
(
masm
,
method
,
in_sig_bt
,
ret_type
);
#else
ShouldNotCallThis
();
ShouldNotCallThis
();
#endif // SHARK
}
}
int
Deoptimization
::
last_frame_adjust
(
int
callee_parameters
,
int
Deoptimization
::
last_frame_adjust
(
int
callee_parameters
,
...
...
src/cpu/zero/vm/sharkFrame_zero.hpp
浏览文件 @
3a8ec81f
/*
/*
* Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2008 Red Hat, Inc.
* Copyright 2008
, 2009
Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
// | ... |
// | ... |
class
SharkFrame
:
public
ZeroFrame
{
class
SharkFrame
:
public
ZeroFrame
{
friend
class
Shark
Function
;
friend
class
Shark
Stack
;
private:
private:
SharkFrame
()
:
ZeroFrame
()
{
SharkFrame
()
:
ZeroFrame
()
{
...
...
src/share/vm/interpreter/bytecodeInterpreter.cpp
浏览文件 @
3a8ec81f
...
@@ -281,7 +281,7 @@
...
@@ -281,7 +281,7 @@
#define DO_BACKEDGE_CHECKS(skip, branch_pc) \
#define DO_BACKEDGE_CHECKS(skip, branch_pc) \
if ((skip) <= 0) { \
if ((skip) <= 0) { \
if (Use
Compiler && UseLoopCounter) {
\
if (Use
LoopCounter) {
\
bool do_OSR = UseOnStackReplacement; \
bool do_OSR = UseOnStackReplacement; \
BACKEDGE_COUNT->increment(); \
BACKEDGE_COUNT->increment(); \
if (do_OSR) do_OSR = BACKEDGE_COUNT->reached_InvocationLimit(); \
if (do_OSR) do_OSR = BACKEDGE_COUNT->reached_InvocationLimit(); \
...
@@ -289,16 +289,12 @@
...
@@ -289,16 +289,12 @@
nmethod* osr_nmethod; \
nmethod* osr_nmethod; \
OSR_REQUEST(osr_nmethod, branch_pc); \
OSR_REQUEST(osr_nmethod, branch_pc); \
if (osr_nmethod != NULL && osr_nmethod->osr_entry_bci() != InvalidOSREntryBci) { \
if (osr_nmethod != NULL && osr_nmethod->osr_entry_bci() != InvalidOSREntryBci) { \
intptr_t* buf; \
intptr_t* buf = SharedRuntime::OSR_migration_begin(THREAD); \
CALL_VM(buf=SharedRuntime::OSR_migration_begin(THREAD), handle_exception); \
istate->set_msg(do_osr); \
istate->set_msg(do_osr); \
istate->set_osr_buf((address)buf); \
istate->set_osr_buf((address)buf); \
istate->set_osr_entry(osr_nmethod->osr_entry()); \
istate->set_osr_entry(osr_nmethod->osr_entry()); \
return; \
return; \
} \
} \
} else { \
INCR_INVOCATION_COUNT; \
SAFEPOINT; \
} \
} \
}
/* UseCompiler ... */
\
}
/* UseCompiler ... */
\
INCR_INVOCATION_COUNT; \
INCR_INVOCATION_COUNT; \
...
@@ -1281,12 +1277,7 @@ run:
...
@@ -1281,12 +1277,7 @@ run:
jfloat
f
;
jfloat
f
;
jdouble
r
;
jdouble
r
;
f
=
STACK_FLOAT
(
-
1
);
f
=
STACK_FLOAT
(
-
1
);
#ifdef IA64
// IA64 gcc bug
r
=
(
f
==
0.0
f
)
?
(
jdouble
)
f
:
(
jdouble
)
f
+
ia64_double_zero
;
#else
r
=
(
jdouble
)
f
;
r
=
(
jdouble
)
f
;
#endif
MORE_STACK
(
-
1
);
// POP
MORE_STACK
(
-
1
);
// POP
SET_STACK_DOUBLE
(
r
,
1
);
SET_STACK_DOUBLE
(
r
,
1
);
UPDATE_PC_AND_TOS_AND_CONTINUE
(
1
,
2
);
UPDATE_PC_AND_TOS_AND_CONTINUE
(
1
,
2
);
...
...
src/share/vm/prims/jni.cpp
浏览文件 @
3a8ec81f
...
@@ -3231,6 +3231,21 @@ _JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_CreateJavaVM(JavaVM **vm, void **penv, v
...
@@ -3231,6 +3231,21 @@ _JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_CreateJavaVM(JavaVM **vm, void **penv, v
jint
result
=
JNI_ERR
;
jint
result
=
JNI_ERR
;
DT_RETURN_MARK
(
CreateJavaVM
,
jint
,
(
const
jint
&
)
result
);
DT_RETURN_MARK
(
CreateJavaVM
,
jint
,
(
const
jint
&
)
result
);
// We're about to use Atomic::xchg for synchronization. Some Zero
// platforms use the GCC builtin __sync_lock_test_and_set for this,
// but __sync_lock_test_and_set is not guaranteed to do what we want
// on all architectures. So we check it works before relying on it.
#if defined(ZERO) && defined(ASSERT)
{
jint
a
=
0xcafebabe
;
jint
b
=
Atomic
::
xchg
(
0xdeadbeef
,
&
a
);
void
*
c
=
&
a
;
void
*
d
=
Atomic
::
xchg_ptr
(
&
b
,
&
c
);
assert
(
a
==
0xdeadbeef
&&
b
==
(
jint
)
0xcafebabe
,
"Atomic::xchg() works"
);
assert
(
c
==
&
b
&&
d
==
&
a
,
"Atomic::xchg_ptr() works"
);
}
#endif // ZERO && ASSERT
// At the moment it's only possible to have one Java VM,
// At the moment it's only possible to have one Java VM,
// since some of the runtime state is in global variables.
// since some of the runtime state is in global variables.
...
...
src/share/vm/prims/jvmtiManageCapabilities.cpp
浏览文件 @
3a8ec81f
...
@@ -115,8 +115,10 @@ jvmtiCapabilities JvmtiManageCapabilities::init_onload_capabilities() {
...
@@ -115,8 +115,10 @@ jvmtiCapabilities JvmtiManageCapabilities::init_onload_capabilities() {
jvmtiCapabilities
jc
;
jvmtiCapabilities
jc
;
memset
(
&
jc
,
0
,
sizeof
(
jc
));
memset
(
&
jc
,
0
,
sizeof
(
jc
));
#ifndef CC_INTERP
jc
.
can_pop_frame
=
1
;
jc
.
can_pop_frame
=
1
;
jc
.
can_force_early_return
=
1
;
jc
.
can_force_early_return
=
1
;
#endif // !CC_INTERP
jc
.
can_get_source_debug_extension
=
1
;
jc
.
can_get_source_debug_extension
=
1
;
jc
.
can_access_local_variables
=
1
;
jc
.
can_access_local_variables
=
1
;
jc
.
can_maintain_original_method_order
=
1
;
jc
.
can_maintain_original_method_order
=
1
;
...
...
src/share/vm/runtime/os.hpp
浏览文件 @
3a8ec81f
...
@@ -294,19 +294,16 @@ class os: AllStatic {
...
@@ -294,19 +294,16 @@ class os: AllStatic {
}
}
static
bool
is_memory_serialize_page
(
JavaThread
*
thread
,
address
addr
)
{
static
bool
is_memory_serialize_page
(
JavaThread
*
thread
,
address
addr
)
{
address
thr_addr
;
if
(
UseMembar
)
return
false
;
if
(
UseMembar
)
return
false
;
// Calculate thread specific address
// Previously this function calculated the exact address of this
// thread's serialize page, and checked if the faulting address
// was equal. However, some platforms mask off faulting addresses
// to the page size, so now we just check that the address is
// within the page. This makes the thread argument unnecessary,
// but we retain the NULL check to preserve existing behaviour.
if
(
thread
==
NULL
)
return
false
;
if
(
thread
==
NULL
)
return
false
;
// TODO-FIXME: some platforms mask off faulting addresses to the base pagesize.
address
page
=
(
address
)
_mem_serialize_page
;
// Instead of using a test for equality we should probably use something
return
addr
>=
page
&&
addr
<
(
page
+
os
::
vm_page_size
());
// of the form:
// return ((_mem_serialize_page ^ addr) & -pagesize) == 0
//
thr_addr
=
(
address
)(((
uintptr_t
)
thread
>>
get_serialize_page_shift_count
())
&
get_serialize_page_mask
())
+
(
uintptr_t
)
_mem_serialize_page
;
return
(
thr_addr
==
addr
);
}
}
static
void
block_on_serialize_page_trap
();
static
void
block_on_serialize_page_trap
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录