Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
3598b6e4
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3598b6e4
编写于
12月 17, 2019
作者:
Z
zgu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8225141: Better handling of classes in error state in fast class initialization checks
Reviewed-by: andrew
上级
015fea98
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
5 addition
and
1 deletion
+5
-1
src/share/vm/oops/instanceKlass.cpp
src/share/vm/oops/instanceKlass.cpp
+4
-0
src/share/vm/oops/instanceKlass.hpp
src/share/vm/oops/instanceKlass.hpp
+1
-1
未找到文件。
src/share/vm/oops/instanceKlass.cpp
浏览文件 @
3598b6e4
...
...
@@ -294,6 +294,7 @@ InstanceKlass::InstanceKlass(int vtable_len,
set_has_unloaded_dependent
(
false
);
set_init_state
(
InstanceKlass
::
allocated
);
set_init_thread
(
NULL
);
set_init_state
(
allocated
);
set_reference_type
(
rt
);
set_oop_map_cache
(
NULL
);
set_jni_ids
(
NULL
);
...
...
@@ -978,11 +979,13 @@ void InstanceKlass::set_initialization_state_and_notify_impl(instanceKlassHandle
oop
init_lock
=
this_oop
->
init_lock
();
if
(
init_lock
!=
NULL
)
{
ObjectLocker
ol
(
init_lock
,
THREAD
);
this_oop
->
set_init_thread
(
NULL
);
// reset _init_thread before changing _init_state
this_oop
->
set_init_state
(
state
);
this_oop
->
fence_and_clear_init_lock
();
ol
.
notify_all
(
CHECK
);
}
else
{
assert
(
init_lock
!=
NULL
,
"The initialization state should never be set twice"
);
this_oop
->
set_init_thread
(
NULL
);
// reset _init_thread before changing _init_state
this_oop
->
set_init_state
(
state
);
}
}
...
...
@@ -3602,6 +3605,7 @@ void InstanceKlass::set_init_state(ClassState state) {
bool
good_state
=
is_shared
()
?
(
_init_state
<=
state
)
:
(
_init_state
<
state
);
assert
(
good_state
||
state
==
allocated
,
"illegal state transition"
);
set_initialization_state_and_notify_implassert
(
_init_thread
==
NULL
,
"should be cleared before state change"
);
_init_state
=
(
u1
)
state
;
}
#endif
...
...
src/share/vm/oops/instanceKlass.hpp
浏览文件 @
3598b6e4
...
...
@@ -241,7 +241,7 @@ class InstanceKlass: public Klass {
u2
_misc_flags
;
u2
_minor_version
;
// minor version number of class file
u2
_major_version
;
// major version number of class file
Thread
*
_init_thread
;
// Pointer to current thread doing initialization (to handle recusive initialization)
Thread
*
_init_thread
;
// Pointer to current thread doing initialization (to handle recu
r
sive initialization)
int
_vtable_len
;
// length of Java vtable (in words)
int
_itable_len
;
// length of Java itable (in words)
OopMapCache
*
volatile
_oop_map_cache
;
// OopMapCache for all methods in the klass (allocated lazily)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录