Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
107f519f
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看板
提交
107f519f
编写于
10月 22, 2018
作者:
F
fmatte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8211909: JDWP Transport Listener: dt_socket thread crash
Reviewed-by: dholmes, jcbeyler
上级
fe27c361
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
20 addition
and
26 deletion
+20
-26
src/share/vm/prims/jvmtiEnv.cpp
src/share/vm/prims/jvmtiEnv.cpp
+20
-26
未找到文件。
src/share/vm/prims/jvmtiEnv.cpp
浏览文件 @
107f519f
/*
/*
* Copyright (c) 2003, 201
7
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
8
, Oracle and/or its affiliates. All rights reserved.
* 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
...
@@ -727,7 +727,7 @@ JvmtiEnv::GetAllThreads(jint* threads_count_ptr, jthread** threads_ptr) {
...
@@ -727,7 +727,7 @@ JvmtiEnv::GetAllThreads(jint* threads_count_ptr, jthread** threads_ptr) {
thread_objs
=
NEW_RESOURCE_ARRAY
(
Handle
,
nthreads
);
thread_objs
=
NEW_RESOURCE_ARRAY
(
Handle
,
nthreads
);
NULL_CHECK
(
thread_objs
,
JVMTI_ERROR_OUT_OF_MEMORY
);
NULL_CHECK
(
thread_objs
,
JVMTI_ERROR_OUT_OF_MEMORY
);
for
(
int
i
=
0
;
i
<
nthreads
;
i
++
)
{
for
(
int
i
=
0
;
i
<
nthreads
;
i
++
)
{
thread_objs
[
i
]
=
Handle
(
tle
.
get_threadObj
(
i
));
thread_objs
[
i
]
=
Handle
(
tle
.
get_threadObj
(
i
));
}
}
...
@@ -952,16 +952,14 @@ JvmtiEnv::GetThreadInfo(jthread thread, jvmtiThreadInfo* info_ptr) {
...
@@ -952,16 +952,14 @@ JvmtiEnv::GetThreadInfo(jthread thread, jvmtiThreadInfo* info_ptr) {
Handle
context_class_loader
;
Handle
context_class_loader
;
bool
is_daemon
;
bool
is_daemon
;
{
MutexLocker
mu
(
Threads_lock
);
name
=
Handle
(
current_thread
,
java_lang_Thread
::
name
(
thread_obj
()));
priority
=
java_lang_Thread
::
priority
(
thread_obj
());
thread_group
=
Handle
(
current_thread
,
java_lang_Thread
::
threadGroup
(
thread_obj
()));
is_daemon
=
java_lang_Thread
::
is_daemon
(
thread_obj
());
name
=
Handle
(
current_thread
,
java_lang_Thread
::
name
(
thread_obj
()));
oop
loader
=
java_lang_Thread
::
context_class_loader
(
thread_obj
());
priority
=
java_lang_Thread
::
priority
(
thread_obj
());
context_class_loader
=
Handle
(
current_thread
,
loader
);
thread_group
=
Handle
(
current_thread
,
java_lang_Thread
::
threadGroup
(
thread_obj
()));
is_daemon
=
java_lang_Thread
::
is_daemon
(
thread_obj
());
oop
loader
=
java_lang_Thread
::
context_class_loader
(
thread_obj
());
context_class_loader
=
Handle
(
current_thread
,
loader
);
}
{
const
char
*
n
;
{
const
char
*
n
;
if
(
name
()
!=
NULL
)
{
if
(
name
()
!=
NULL
)
{
...
@@ -1193,14 +1191,11 @@ JvmtiEnv::GetThreadGroupInfo(jthreadGroup group, jvmtiThreadGroupInfo* info_ptr)
...
@@ -1193,14 +1191,11 @@ JvmtiEnv::GetThreadGroupInfo(jthreadGroup group, jvmtiThreadGroupInfo* info_ptr)
bool
is_daemon
;
bool
is_daemon
;
ThreadPriority
max_priority
;
ThreadPriority
max_priority
;
{
MutexLocker
mu
(
Threads_lock
);
name
=
typeArrayHandle
(
current_thread
,
java_lang_ThreadGroup
::
name
(
group_obj
()));
name
=
typeArrayHandle
(
current_thread
,
parent_group
=
Handle
(
current_thread
,
java_lang_ThreadGroup
::
parent
(
group_obj
()));
java_lang_ThreadGroup
::
name
(
group_obj
()));
is_daemon
=
java_lang_ThreadGroup
::
is_daemon
(
group_obj
());
parent_group
=
Handle
(
current_thread
,
java_lang_ThreadGroup
::
parent
(
group_obj
()));
max_priority
=
java_lang_ThreadGroup
::
maxPriority
(
group_obj
());
is_daemon
=
java_lang_ThreadGroup
::
is_daemon
(
group_obj
());
max_priority
=
java_lang_ThreadGroup
::
maxPriority
(
group_obj
());
}
info_ptr
->
is_daemon
=
is_daemon
;
info_ptr
->
is_daemon
=
is_daemon
;
info_ptr
->
max_priority
=
max_priority
;
info_ptr
->
max_priority
=
max_priority
;
...
@@ -1240,8 +1235,8 @@ JvmtiEnv::GetThreadGroupChildren(jthreadGroup group, jint* thread_count_ptr, jth
...
@@ -1240,8 +1235,8 @@ JvmtiEnv::GetThreadGroupChildren(jthreadGroup group, jint* thread_count_ptr, jth
Handle
group_hdl
(
current_thread
,
group_obj
);
Handle
group_hdl
(
current_thread
,
group_obj
);
{
MutexLocker
mu
(
Threads_lock
);
{
ObjectLocker
ol
(
group_hdl
,
current_thread
);
nthreads
=
java_lang_ThreadGroup
::
nthreads
(
group_hdl
());
nthreads
=
java_lang_ThreadGroup
::
nthreads
(
group_hdl
());
ngroups
=
java_lang_ThreadGroup
::
ngroups
(
group_hdl
());
ngroups
=
java_lang_ThreadGroup
::
ngroups
(
group_hdl
());
...
@@ -1249,7 +1244,7 @@ JvmtiEnv::GetThreadGroupChildren(jthreadGroup group, jint* thread_count_ptr, jth
...
@@ -1249,7 +1244,7 @@ JvmtiEnv::GetThreadGroupChildren(jthreadGroup group, jint* thread_count_ptr, jth
objArrayOop
threads
=
java_lang_ThreadGroup
::
threads
(
group_hdl
());
objArrayOop
threads
=
java_lang_ThreadGroup
::
threads
(
group_hdl
());
assert
(
nthreads
<=
threads
->
length
(),
"too many threads"
);
assert
(
nthreads
<=
threads
->
length
(),
"too many threads"
);
thread_objs
=
NEW_RESOURCE_ARRAY
(
Handle
,
nthreads
);
thread_objs
=
NEW_RESOURCE_ARRAY
(
Handle
,
nthreads
);
for
(
int
i
=
0
,
j
=
0
;
i
<
nthreads
;
i
++
)
{
for
(
int
i
=
0
,
j
=
0
;
i
<
nthreads
;
i
++
)
{
oop
thread_obj
=
threads
->
obj_at
(
i
);
oop
thread_obj
=
threads
->
obj_at
(
i
);
assert
(
thread_obj
!=
NULL
,
"thread_obj is NULL"
);
assert
(
thread_obj
!=
NULL
,
"thread_obj is NULL"
);
JavaThread
*
javathread
=
java_lang_Thread
::
thread
(
thread_obj
);
JavaThread
*
javathread
=
java_lang_Thread
::
thread
(
thread_obj
);
...
@@ -1266,15 +1261,14 @@ JvmtiEnv::GetThreadGroupChildren(jthreadGroup group, jint* thread_count_ptr, jth
...
@@ -1266,15 +1261,14 @@ JvmtiEnv::GetThreadGroupChildren(jthreadGroup group, jint* thread_count_ptr, jth
objArrayOop
groups
=
java_lang_ThreadGroup
::
groups
(
group_hdl
());
objArrayOop
groups
=
java_lang_ThreadGroup
::
groups
(
group_hdl
());
assert
(
ngroups
<=
groups
->
length
(),
"too many threads"
);
assert
(
ngroups
<=
groups
->
length
(),
"too many threads"
);
group_objs
=
NEW_RESOURCE_ARRAY
(
Handle
,
ngroups
);
group_objs
=
NEW_RESOURCE_ARRAY
(
Handle
,
ngroups
);
for
(
int
i
=
0
;
i
<
ngroups
;
i
++
)
{
for
(
int
i
=
0
;
i
<
ngroups
;
i
++
)
{
oop
group_obj
=
groups
->
obj_at
(
i
);
oop
group_obj
=
groups
->
obj_at
(
i
);
assert
(
group_obj
!=
NULL
,
"group_obj != NULL"
);
assert
(
group_obj
!=
NULL
,
"group_obj != NULL"
);
group_objs
[
i
]
=
Handle
(
current_thread
,
group_obj
);
group_objs
[
i
]
=
Handle
(
current_thread
,
group_obj
);
}
}
}
}
}
}
// ThreadGroup unlocked here
// have to make global handles outside of Threads_lock
*
group_count_ptr
=
ngroups
;
*
group_count_ptr
=
ngroups
;
*
thread_count_ptr
=
nthreads
;
*
thread_count_ptr
=
nthreads
;
*
threads_ptr
=
new_jthreadArray
(
nthreads
,
thread_objs
);
*
threads_ptr
=
new_jthreadArray
(
nthreads
,
thread_objs
);
...
@@ -2979,7 +2973,7 @@ JvmtiEnv::DestroyRawMonitor(JvmtiRawMonitor * rmonitor) {
...
@@ -2979,7 +2973,7 @@ JvmtiEnv::DestroyRawMonitor(JvmtiRawMonitor * rmonitor) {
// objects that are locked.
// objects that are locked.
int
r
;
int
r
;
intptr_t
recursion
=
rmonitor
->
recursions
();
intptr_t
recursion
=
rmonitor
->
recursions
();
for
(
intptr_t
i
=
0
;
i
<=
recursion
;
i
++
)
{
for
(
intptr_t
i
=
0
;
i
<=
recursion
;
i
++
)
{
r
=
rmonitor
->
raw_exit
(
thread
);
r
=
rmonitor
->
raw_exit
(
thread
);
assert
(
r
==
ObjectMonitor
::
OM_OK
,
"raw_exit should have worked"
);
assert
(
r
==
ObjectMonitor
::
OM_OK
,
"raw_exit should have worked"
);
if
(
r
!=
ObjectMonitor
::
OM_OK
)
{
// robustness
if
(
r
!=
ObjectMonitor
::
OM_OK
)
{
// robustness
...
@@ -3395,7 +3389,7 @@ JvmtiEnv::GetSystemProperties(jint* count_ptr, char*** property_ptr) {
...
@@ -3395,7 +3389,7 @@ JvmtiEnv::GetSystemProperties(jint* count_ptr, char*** property_ptr) {
strcpy
(
*
tmp_value
,
key
);
strcpy
(
*
tmp_value
,
key
);
}
else
{
}
else
{
// clean up previously allocated memory.
// clean up previously allocated memory.
for
(
int
j
=
0
;
j
<
i
;
j
++
)
{
for
(
int
j
=
0
;
j
<
i
;
j
++
)
{
Deallocate
((
unsigned
char
*
)
*
property_ptr
+
j
);
Deallocate
((
unsigned
char
*
)
*
property_ptr
+
j
);
}
}
Deallocate
((
unsigned
char
*
)
property_ptr
);
Deallocate
((
unsigned
char
*
)
property_ptr
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录