Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
f1c7596a
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看板
提交
f1c7596a
编写于
8月 12, 2010
作者:
N
never
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6974176: ShouldNotReachHere, instanceKlass.cpp:1426
Reviewed-by: kvn, twisti
上级
0519458f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
30 addition
and
8 deletion
+30
-8
src/share/vm/code/nmethod.cpp
src/share/vm/code/nmethod.cpp
+25
-8
src/share/vm/code/nmethod.hpp
src/share/vm/code/nmethod.hpp
+5
-0
未找到文件。
src/share/vm/code/nmethod.cpp
浏览文件 @
f1c7596a
...
@@ -433,6 +433,10 @@ void nmethod::init_defaults() {
...
@@ -433,6 +433,10 @@ void nmethod::init_defaults() {
_unload_reported
=
false
;
// jvmti state
_unload_reported
=
false
;
// jvmti state
NOT_PRODUCT
(
_has_debug_info
=
false
);
NOT_PRODUCT
(
_has_debug_info
=
false
);
#ifdef ASSERT
_oops_are_stale
=
false
;
#endif
_oops_do_mark_link
=
NULL
;
_oops_do_mark_link
=
NULL
;
_jmethod_id
=
NULL
;
_jmethod_id
=
NULL
;
_osr_link
=
NULL
;
_osr_link
=
NULL
;
...
@@ -1230,11 +1234,10 @@ void nmethod::log_state_change() const {
...
@@ -1230,11 +1234,10 @@ void nmethod::log_state_change() const {
bool
nmethod
::
make_not_entrant_or_zombie
(
unsigned
int
state
)
{
bool
nmethod
::
make_not_entrant_or_zombie
(
unsigned
int
state
)
{
assert
(
state
==
zombie
||
state
==
not_entrant
,
"must be zombie or not_entrant"
);
assert
(
state
==
zombie
||
state
==
not_entrant
,
"must be zombie or not_entrant"
);
bool
was_alive
=
false
;
// Make sure neither the nmethod nor the method is flushed in case of a safepoint in code below.
// Make sure neither the nmethod nor the method is flushed in case of a safepoint in code below.
nmethodLocker
nml
(
this
);
nmethodLocker
nml
(
this
);
methodHandle
the_method
(
method
());
methodHandle
the_method
(
method
());
No_Safepoint_Verifier
nsv
;
{
{
// If the method is already zombie there is nothing to do
// If the method is already zombie there is nothing to do
...
@@ -1303,13 +1306,27 @@ bool nmethod::make_not_entrant_or_zombie(unsigned int state) {
...
@@ -1303,13 +1306,27 @@ bool nmethod::make_not_entrant_or_zombie(unsigned int state) {
// state will be flushed later when the transition to zombie
// state will be flushed later when the transition to zombie
// happens or they get unloaded.
// happens or they get unloaded.
if
(
state
==
zombie
)
{
if
(
state
==
zombie
)
{
// zombie only - if a JVMTI agent has enabled the CompiledMethodUnload event
{
// and it hasn't already been reported for this nmethod then report it now.
// Flushing dependecies must be done before any possible
// (the event may have been reported earilier if the GC marked it for unloading).
// safepoint can sneak in, otherwise the oops used by the
post_compiled_method_unload
();
// dependency logic could have become stale.
MutexLockerEx
mu
(
CodeCache_lock
,
Mutex
::
_no_safepoint_check_flag
);
flush_dependencies
(
NULL
);
}
MutexLockerEx
mu
(
CodeCache_lock
,
Mutex
::
_no_safepoint_check_flag
);
{
flush_dependencies
(
NULL
);
// zombie only - if a JVMTI agent has enabled the CompiledMethodUnload event
// and it hasn't already been reported for this nmethod then report it now.
// (the event may have been reported earilier if the GC marked it for unloading).
Pause_No_Safepoint_Verifier
pnsv
(
&
nsv
);
post_compiled_method_unload
();
}
#ifdef ASSERT
// It's no longer safe to access the oops section since zombie
// nmethods aren't scanned for GC.
_oops_are_stale
=
true
;
#endif
}
else
{
}
else
{
assert
(
state
==
not_entrant
,
"other cases may need to be handled differently"
);
assert
(
state
==
not_entrant
,
"other cases may need to be handled differently"
);
}
}
...
...
src/share/vm/code/nmethod.hpp
浏览文件 @
f1c7596a
...
@@ -177,6 +177,10 @@ class nmethod : public CodeBlob {
...
@@ -177,6 +177,10 @@ class nmethod : public CodeBlob {
// Protected by Patching_lock
// Protected by Patching_lock
unsigned
char
_state
;
// {alive, not_entrant, zombie, unloaded)
unsigned
char
_state
;
// {alive, not_entrant, zombie, unloaded)
#ifdef ASSERT
bool
_oops_are_stale
;
// indicates that it's no longer safe to access oops section
#endif
enum
{
alive
=
0
,
enum
{
alive
=
0
,
not_entrant
=
1
,
// uncommon trap has happened but activations may still exist
not_entrant
=
1
,
// uncommon trap has happened but activations may still exist
zombie
=
2
,
zombie
=
2
,
...
@@ -434,6 +438,7 @@ class nmethod : public CodeBlob {
...
@@ -434,6 +438,7 @@ class nmethod : public CodeBlob {
oop
*
oop_addr_at
(
int
index
)
const
{
// for GC
oop
*
oop_addr_at
(
int
index
)
const
{
// for GC
// relocation indexes are biased by 1 (because 0 is reserved)
// relocation indexes are biased by 1 (because 0 is reserved)
assert
(
index
>
0
&&
index
<=
oops_size
(),
"must be a valid non-zero index"
);
assert
(
index
>
0
&&
index
<=
oops_size
(),
"must be a valid non-zero index"
);
assert
(
!
_oops_are_stale
,
"oops are stale"
);
return
&
oops_begin
()[
index
-
1
];
return
&
oops_begin
()[
index
-
1
];
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录