Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
3459ce2e
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看板
提交
3459ce2e
编写于
7月 07, 2011
作者:
C
coleenp
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
153b0b58
0bfeae86
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
39 addition
and
17 deletion
+39
-17
make/jprt.gmk
make/jprt.gmk
+3
-3
src/share/vm/prims/jvmtiTagMap.cpp
src/share/vm/prims/jvmtiTagMap.cpp
+36
-14
未找到文件。
make/jprt.gmk
浏览文件 @
3459ce2e
...
@@ -34,13 +34,13 @@ else
...
@@ -34,13 +34,13 @@ else
endif
endif
jprt_build_productEmb:
jprt_build_productEmb:
$(MAKE) JAVASE_EMBEDDED=true jprt_build_product
$(MAKE) JAVASE_EMBEDDED=true
MINIMIZE_RAM_USAGE=true
jprt_build_product
jprt_build_debugEmb:
jprt_build_debugEmb:
$(MAKE) JAVASE_EMBEDDED=true jprt_build_debug
$(MAKE) JAVASE_EMBEDDED=true
MINIMIZE_RAM_USAGE=true
jprt_build_debug
jprt_build_fastdebugEmb:
jprt_build_fastdebugEmb:
$(MAKE) JAVASE_EMBEDDED=true jprt_build_fastdebug
$(MAKE) JAVASE_EMBEDDED=true
MINIMIZE_RAM_USAGE=true
jprt_build_fastdebug
jprt_build_productOpen:
jprt_build_productOpen:
$(MAKE) OPENJDK=true jprt_build_product
$(MAKE) OPENJDK=true jprt_build_product
...
...
src/share/vm/prims/jvmtiTagMap.cpp
浏览文件 @
3459ce2e
...
@@ -1647,6 +1647,7 @@ class ObjectMarker : AllStatic {
...
@@ -1647,6 +1647,7 @@ class ObjectMarker : AllStatic {
// saved headers
// saved headers
static
GrowableArray
<
oop
>*
_saved_oop_stack
;
static
GrowableArray
<
oop
>*
_saved_oop_stack
;
static
GrowableArray
<
markOop
>*
_saved_mark_stack
;
static
GrowableArray
<
markOop
>*
_saved_mark_stack
;
static
bool
_needs_reset
;
// do we need to reset mark bits?
public:
public:
static
void
init
();
// initialize
static
void
init
();
// initialize
...
@@ -1654,10 +1655,14 @@ class ObjectMarker : AllStatic {
...
@@ -1654,10 +1655,14 @@ class ObjectMarker : AllStatic {
static
inline
void
mark
(
oop
o
);
// mark an object
static
inline
void
mark
(
oop
o
);
// mark an object
static
inline
bool
visited
(
oop
o
);
// check if object has been visited
static
inline
bool
visited
(
oop
o
);
// check if object has been visited
static
inline
bool
needs_reset
()
{
return
_needs_reset
;
}
static
inline
void
set_needs_reset
(
bool
v
)
{
_needs_reset
=
v
;
}
};
};
GrowableArray
<
oop
>*
ObjectMarker
::
_saved_oop_stack
=
NULL
;
GrowableArray
<
oop
>*
ObjectMarker
::
_saved_oop_stack
=
NULL
;
GrowableArray
<
markOop
>*
ObjectMarker
::
_saved_mark_stack
=
NULL
;
GrowableArray
<
markOop
>*
ObjectMarker
::
_saved_mark_stack
=
NULL
;
bool
ObjectMarker
::
_needs_reset
=
true
;
// need to reset mark bits by default
// initialize ObjectMarker - prepares for object marking
// initialize ObjectMarker - prepares for object marking
void
ObjectMarker
::
init
()
{
void
ObjectMarker
::
init
()
{
...
@@ -1680,7 +1685,13 @@ void ObjectMarker::done() {
...
@@ -1680,7 +1685,13 @@ void ObjectMarker::done() {
// iterate over all objects and restore the mark bits to
// iterate over all objects and restore the mark bits to
// their initial value
// their initial value
RestoreMarksClosure
blk
;
RestoreMarksClosure
blk
;
if
(
needs_reset
())
{
Universe
::
heap
()
->
object_iterate
(
&
blk
);
Universe
::
heap
()
->
object_iterate
(
&
blk
);
}
else
{
// We don't need to reset mark bits on this call, but reset the
// flag to the default for the next call.
set_needs_reset
(
true
);
}
// When sharing is enabled we need to restore the headers of the objects
// When sharing is enabled we need to restore the headers of the objects
// in the readwrite space too.
// in the readwrite space too.
...
@@ -3023,7 +3034,8 @@ inline bool VM_HeapWalkOperation::iterate_over_object(oop o) {
...
@@ -3023,7 +3034,8 @@ inline bool VM_HeapWalkOperation::iterate_over_object(oop o) {
}
}
// collects all simple (non-stack) roots.
// Collects all simple (non-stack) roots except for threads;
// threads are handled in collect_stack_roots() as an optimization.
// if there's a heap root callback provided then the callback is
// if there's a heap root callback provided then the callback is
// invoked for each simple root.
// invoked for each simple root.
// if an object reference callback is provided then all simple
// if an object reference callback is provided then all simple
...
@@ -3054,16 +3066,7 @@ inline bool VM_HeapWalkOperation::collect_simple_roots() {
...
@@ -3054,16 +3066,7 @@ inline bool VM_HeapWalkOperation::collect_simple_roots() {
return
false
;
return
false
;
}
}
// Threads
// threads are now handled in collect_stack_roots()
for
(
JavaThread
*
thread
=
Threads
::
first
();
thread
!=
NULL
;
thread
=
thread
->
next
())
{
oop
threadObj
=
thread
->
threadObj
();
if
(
threadObj
!=
NULL
&&
!
thread
->
is_exiting
()
&&
!
thread
->
is_hidden_from_external_view
())
{
bool
cont
=
CallbackInvoker
::
report_simple_root
(
JVMTI_HEAP_REFERENCE_THREAD
,
threadObj
);
if
(
!
cont
)
{
return
false
;
}
}
}
// Other kinds of roots maintained by HotSpot
// Other kinds of roots maintained by HotSpot
// Many of these won't be visible but others (such as instances of important
// Many of these won't be visible but others (such as instances of important
...
@@ -3175,13 +3178,20 @@ inline bool VM_HeapWalkOperation::collect_stack_roots(JavaThread* java_thread,
...
@@ -3175,13 +3178,20 @@ inline bool VM_HeapWalkOperation::collect_stack_roots(JavaThread* java_thread,
}
}
// collects all stack roots - for each thread it walks the execution
// Collects the simple roots for all threads and collects all
// stack roots - for each thread it walks the execution
// stack to find all references and local JNI refs.
// stack to find all references and local JNI refs.
inline
bool
VM_HeapWalkOperation
::
collect_stack_roots
()
{
inline
bool
VM_HeapWalkOperation
::
collect_stack_roots
()
{
JNILocalRootsClosure
blk
;
JNILocalRootsClosure
blk
;
for
(
JavaThread
*
thread
=
Threads
::
first
();
thread
!=
NULL
;
thread
=
thread
->
next
())
{
for
(
JavaThread
*
thread
=
Threads
::
first
();
thread
!=
NULL
;
thread
=
thread
->
next
())
{
oop
threadObj
=
thread
->
threadObj
();
oop
threadObj
=
thread
->
threadObj
();
if
(
threadObj
!=
NULL
&&
!
thread
->
is_exiting
()
&&
!
thread
->
is_hidden_from_external_view
())
{
if
(
threadObj
!=
NULL
&&
!
thread
->
is_exiting
()
&&
!
thread
->
is_hidden_from_external_view
())
{
// Collect the simple root for this thread before we
// collect its stack roots
if
(
!
CallbackInvoker
::
report_simple_root
(
JVMTI_HEAP_REFERENCE_THREAD
,
threadObj
))
{
return
false
;
}
if
(
!
collect_stack_roots
(
thread
,
&
blk
))
{
if
(
!
collect_stack_roots
(
thread
,
&
blk
))
{
return
false
;
return
false
;
}
}
...
@@ -3235,8 +3245,20 @@ void VM_HeapWalkOperation::doit() {
...
@@ -3235,8 +3245,20 @@ void VM_HeapWalkOperation::doit() {
// the heap walk starts with an initial object or the heap roots
// the heap walk starts with an initial object or the heap roots
if
(
initial_object
().
is_null
())
{
if
(
initial_object
().
is_null
())
{
if
(
!
collect_simple_roots
())
return
;
// If either collect_stack_roots() or collect_simple_roots()
// returns false at this point, then there are no mark bits
// to reset.
ObjectMarker
::
set_needs_reset
(
false
);
// Calling collect_stack_roots() before collect_simple_roots()
// can result in a big performance boost for an agent that is
// focused on analyzing references in the thread stacks.
if
(
!
collect_stack_roots
())
return
;
if
(
!
collect_stack_roots
())
return
;
if
(
!
collect_simple_roots
())
return
;
// no early return so enable heap traversal to reset the mark bits
ObjectMarker
::
set_needs_reset
(
true
);
}
else
{
}
else
{
visit_stack
()
->
push
(
initial_object
()());
visit_stack
()
->
push
(
initial_object
()());
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录