Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
353a41de
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看板
提交
353a41de
编写于
3月 06, 2012
作者:
N
never
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7150390: JFR test crashed on assert(_jni_lock_count == count) failed: must be equal
Reviewed-by: dholmes, minqi, kvn, coleenp
上级
9e433d39
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
29 addition
and
5 deletion
+29
-5
src/share/vm/runtime/safepoint.cpp
src/share/vm/runtime/safepoint.cpp
+16
-5
src/share/vm/runtime/thread.cpp
src/share/vm/runtime/thread.cpp
+4
-0
src/share/vm/runtime/thread.hpp
src/share/vm/runtime/thread.hpp
+9
-0
未找到文件。
src/share/vm/runtime/safepoint.cpp
浏览文件 @
353a41de
...
...
@@ -219,6 +219,8 @@ void SafepointSynchronize::begin() {
#ifdef ASSERT
for
(
JavaThread
*
cur
=
Threads
::
first
();
cur
!=
NULL
;
cur
=
cur
->
next
())
{
assert
(
cur
->
safepoint_state
()
->
is_running
(),
"Illegal initial state"
);
// Clear the visited flag to ensure that the critical counts are collected properly.
cur
->
set_visited_for_critical_count
(
false
);
}
#endif // ASSERT
...
...
@@ -378,6 +380,13 @@ void SafepointSynchronize::begin() {
OrderAccess
::
fence
();
#ifdef ASSERT
for
(
JavaThread
*
cur
=
Threads
::
first
();
cur
!=
NULL
;
cur
=
cur
->
next
())
{
// make sure all the threads were visited
assert
(
cur
->
was_visited_for_critical_count
(),
"missed a thread"
);
}
#endif // ASSERT
// Update the count of active JNI critical regions
GC_locker
::
set_jni_lock_count
(
_current_jni_active_count
);
...
...
@@ -626,6 +635,7 @@ void SafepointSynchronize::block(JavaThread *thread) {
_waiting_to_block
--
;
thread
->
safepoint_state
()
->
set_has_called_back
(
true
);
DEBUG_ONLY
(
thread
->
set_visited_for_critical_count
(
true
));
if
(
thread
->
in_critical
())
{
// Notice that this thread is in a critical section
increment_jni_active_count
();
...
...
@@ -907,12 +917,8 @@ void ThreadSafepointState::examine_state_of_thread() {
// running, but are actually at a safepoint. We will happily
// agree and update the safepoint state here.
if
(
SafepointSynchronize
::
safepoint_safe
(
_thread
,
state
))
{
roll_forward
(
_at_safepoint
);
SafepointSynchronize
::
check_for_lazy_critical_native
(
_thread
,
state
);
if
(
_thread
->
in_critical
())
{
// Notice that this thread is in a critical section
SafepointSynchronize
::
increment_jni_active_count
();
}
roll_forward
(
_at_safepoint
);
return
;
}
...
...
@@ -937,6 +943,11 @@ void ThreadSafepointState::roll_forward(suspend_type type) {
switch
(
_type
)
{
case
_at_safepoint
:
SafepointSynchronize
::
signal_thread_at_safepoint
();
DEBUG_ONLY
(
_thread
->
set_visited_for_critical_count
(
true
));
if
(
_thread
->
in_critical
())
{
// Notice that this thread is in a critical section
SafepointSynchronize
::
increment_jni_active_count
();
}
break
;
case
_call_back
:
...
...
src/share/vm/runtime/thread.cpp
浏览文件 @
353a41de
...
...
@@ -247,6 +247,10 @@ Thread::Thread() {
omInUseList
=
NULL
;
omInUseCount
=
0
;
#ifdef ASSERT
_visited_for_critical_count
=
false
;
#endif
_SR_lock
=
new
Monitor
(
Mutex
::
suspend_resume
,
"SR_lock"
,
true
);
_suspend_flags
=
0
;
...
...
src/share/vm/runtime/thread.hpp
浏览文件 @
353a41de
...
...
@@ -268,6 +268,15 @@ class Thread: public ThreadShadow {
ObjectMonitor
*
omInUseList
;
// SLL to track monitors in circulation
int
omInUseCount
;
// length of omInUseList
#ifdef ASSERT
private:
bool
_visited_for_critical_count
;
public:
void
set_visited_for_critical_count
(
bool
z
)
{
_visited_for_critical_count
=
z
;
}
bool
was_visited_for_critical_count
()
const
{
return
_visited_for_critical_count
;
}
#endif
public:
enum
{
is_definitely_current_thread
=
true
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录