Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
32a94c91
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,发现更多精彩内容 >>
提交
32a94c91
编写于
12月 04, 2013
作者:
S
sla
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8029395: SA: jstack throws WrongTypeException
Summary: SA missed some TLABs Reviewed-by: dsamersoff, mgerdin, brutisso
上级
ea490ec2
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
38 addition
and
22 deletion
+38
-22
agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java
agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java
+37
-21
agent/src/share/classes/sun/jvm/hotspot/runtime/ThreadLocalAllocBuffer.java
...asses/sun/jvm/hotspot/runtime/ThreadLocalAllocBuffer.java
+1
-1
未找到文件。
agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java
浏览文件 @
32a94c91
...
...
@@ -364,7 +364,7 @@ public class ObjectHeap {
}
catch
(
AddressException
e
)
{
// This is okay at the top of these regions
}
}
catch
(
UnknownOopException
e
)
{
// This is okay at the top of these regions
}
...
...
@@ -373,7 +373,7 @@ public class ObjectHeap {
visitor
.
epilogue
();
}
private
void
addLiveRegions
(
List
input
,
List
output
)
{
private
void
addLiveRegions
(
String
name
,
List
input
,
List
output
)
{
for
(
Iterator
itr
=
input
.
iterator
();
itr
.
hasNext
();)
{
MemRegion
reg
=
(
MemRegion
)
itr
.
next
();
Address
top
=
reg
.
end
();
...
...
@@ -386,6 +386,9 @@ public class ObjectHeap {
}
output
.
add
(
top
);
output
.
add
(
bottom
);
if
(
DEBUG
)
{
System
.
err
.
println
(
"Live region: "
+
name
+
": "
+
bottom
+
", "
+
top
);
}
}
}
...
...
@@ -395,7 +398,7 @@ public class ObjectHeap {
}
public
void
doSpace
(
Space
s
)
{
addLiveRegions
(
s
.
getLiveRegions
(),
liveRegions
);
addLiveRegions
(
s
.
toString
(),
s
.
getLiveRegions
(),
liveRegions
);
}
private
List
liveRegions
;
}
...
...
@@ -426,11 +429,11 @@ public class ObjectHeap {
ParallelScavengeHeap
psh
=
(
ParallelScavengeHeap
)
heap
;
PSYoungGen
youngGen
=
psh
.
youngGen
();
// Add eden space
addLiveRegions
(
youngGen
.
edenSpace
().
getLiveRegions
(),
liveRegions
);
addLiveRegions
(
"eden"
,
youngGen
.
edenSpace
().
getLiveRegions
(),
liveRegions
);
// Add from-space but not to-space
addLiveRegions
(
youngGen
.
fromSpace
().
getLiveRegions
(),
liveRegions
);
addLiveRegions
(
"from"
,
youngGen
.
fromSpace
().
getLiveRegions
(),
liveRegions
);
PSOldGen
oldGen
=
psh
.
oldGen
();
addLiveRegions
(
oldGen
.
objectSpace
().
getLiveRegions
(),
liveRegions
);
addLiveRegions
(
"old "
,
oldGen
.
objectSpace
().
getLiveRegions
(),
liveRegions
);
}
else
if
(
heap
instanceof
G1CollectedHeap
)
{
G1CollectedHeap
g1h
=
(
G1CollectedHeap
)
heap
;
g1h
.
heapRegionIterate
(
lrc
);
...
...
@@ -451,23 +454,27 @@ public class ObjectHeap {
if
(
VM
.
getVM
().
getUseTLAB
())
{
for
(
JavaThread
thread
=
VM
.
getVM
().
getThreads
().
first
();
thread
!=
null
;
thread
=
thread
.
next
())
{
if
(
thread
.
isJavaThread
())
{
ThreadLocalAllocBuffer
tlab
=
thread
.
tlab
();
if
(
tlab
.
start
()
!=
null
)
{
if
((
tlab
.
top
()
==
null
)
||
(
tlab
.
end
()
==
null
))
{
System
.
err
.
print
(
"Warning: skipping invalid TLAB for thread "
);
ThreadLocalAllocBuffer
tlab
=
thread
.
tlab
();
if
(
tlab
.
start
()
!=
null
)
{
if
((
tlab
.
top
()
==
null
)
||
(
tlab
.
end
()
==
null
))
{
System
.
err
.
print
(
"Warning: skipping invalid TLAB for thread "
);
thread
.
printThreadIDOn
(
System
.
err
);
System
.
err
.
println
();
}
else
{
if
(
DEBUG
)
{
System
.
err
.
print
(
"TLAB for "
+
thread
.
getThreadName
()
+
", #"
);
thread
.
printThreadIDOn
(
System
.
err
);
System
.
err
.
println
();
}
else
{
// Go from:
// - below start() to start()
// - start() to top()
// - end() and above
liveRegions
.
add
(
tlab
.
start
());
liveRegions
.
add
(
tlab
.
start
());
liveRegions
.
add
(
tlab
.
top
());
liveRegions
.
add
(
tlab
.
hardEnd
());
System
.
err
.
print
(
": "
);
tlab
.
printOn
(
System
.
err
);
}
// Go from:
// - below start() to start()
// - start() to top()
// - end() and above
liveRegions
.
add
(
tlab
.
start
());
liveRegions
.
add
(
tlab
.
start
());
liveRegions
.
add
(
tlab
.
top
());
liveRegions
.
add
(
tlab
.
hardEnd
());
}
}
}
...
...
@@ -480,6 +487,15 @@ public class ObjectHeap {
Assert
.
that
(
liveRegions
.
size
()
%
2
==
0
,
"Must have even number of region boundaries"
);
}
if
(
DEBUG
)
{
System
.
err
.
println
(
"liveRegions:"
);
for
(
int
i
=
0
;
i
<
liveRegions
.
size
();
i
+=
2
)
{
Address
bottom
=
(
Address
)
liveRegions
.
get
(
i
);
Address
top
=
(
Address
)
liveRegions
.
get
(
i
+
1
);
System
.
err
.
println
(
" "
+
bottom
+
" - "
+
top
);
}
}
return
liveRegions
;
}
...
...
agent/src/share/classes/sun/jvm/hotspot/runtime/ThreadLocalAllocBuffer.java
浏览文件 @
32a94c91
...
...
@@ -109,6 +109,6 @@ public class ThreadLocalAllocBuffer extends VMObject {
public
void
printOn
(
PrintStream
tty
)
{
tty
.
println
(
" ["
+
start
()
+
","
+
top
()
+
","
+
end
()
+
")"
);
top
()
+
","
+
end
()
+
"
,{"
+
hardEnd
()
+
"}
)"
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录