Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
c1942f3d
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,发现更多精彩内容 >>
提交
c1942f3d
编写于
6月 25, 2018
作者:
K
kevinw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8069124: runtime/NMT/MallocSiteHashOverflow.java failing in nightlies
Reviewed-by: ctornqvi, coleenp, gtriantafill, dholmes
上级
a5ed4e7f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
12 addition
and
15 deletion
+12
-15
src/share/vm/services/mallocSiteTable.cpp
src/share/vm/services/mallocSiteTable.cpp
+1
-1
src/share/vm/services/mallocSiteTable.hpp
src/share/vm/services/mallocSiteTable.hpp
+1
-2
src/share/vm/utilities/nativeCallStack.cpp
src/share/vm/utilities/nativeCallStack.cpp
+7
-9
src/share/vm/utilities/nativeCallStack.hpp
src/share/vm/utilities/nativeCallStack.hpp
+3
-3
未找到文件。
src/share/vm/services/mallocSiteTable.cpp
浏览文件 @
c1942f3d
...
...
@@ -136,7 +136,7 @@ bool MallocSiteTable::walk(MallocSiteWalker* walker) {
MallocSite
*
MallocSiteTable
::
lookup_or_add
(
const
NativeCallStack
&
key
,
size_t
*
bucket_idx
,
size_t
*
pos_idx
,
MEMFLAGS
flags
)
{
assert
(
flags
!=
mtNone
,
"Should have a real memory type"
);
int
index
=
hash_to_index
(
key
.
hash
());
unsigned
int
index
=
hash_to_index
(
key
.
hash
());
assert
(
index
>=
0
,
"Negative index"
);
*
bucket_idx
=
(
size_t
)
index
;
*
pos_idx
=
0
;
...
...
src/share/vm/services/mallocSiteTable.hpp
浏览文件 @
c1942f3d
...
...
@@ -245,8 +245,7 @@ class MallocSiteTable : AllStatic {
static
MallocSite
*
malloc_site
(
size_t
bucket_idx
,
size_t
pos_idx
);
static
bool
walk
(
MallocSiteWalker
*
walker
);
static
inline
int
hash_to_index
(
int
hash
)
{
hash
=
(
hash
>
0
)
?
hash
:
(
-
hash
);
static
inline
unsigned
int
hash_to_index
(
unsigned
int
hash
)
{
return
(
hash
%
table_size
);
}
...
...
src/share/vm/utilities/nativeCallStack.cpp
浏览文件 @
c1942f3d
...
...
@@ -55,6 +55,7 @@ NativeCallStack::NativeCallStack(address* pc, int frameCount) {
for
(;
index
<
NMT_TrackingStackDepth
;
index
++
)
{
_stack
[
index
]
=
NULL
;
}
_hash_value
=
0
;
}
// number of stack frames captured
...
...
@@ -69,19 +70,16 @@ int NativeCallStack::frames() const {
}
// Hash code. Any better algorithm?
int
NativeCallStack
::
hash
()
const
{
long
hash_val
=
_hash_value
;
unsigned
int
NativeCallStack
::
hash
()
const
{
uintptr_t
hash_val
=
_hash_value
;
if
(
hash_val
==
0
)
{
long
pc
;
int
index
;
for
(
index
=
0
;
index
<
NMT_TrackingStackDepth
;
index
++
)
{
pc
=
(
long
)
_stack
[
index
];
if
(
pc
==
0
)
break
;
hash_val
+=
pc
;
for
(
int
index
=
0
;
index
<
NMT_TrackingStackDepth
;
index
++
)
{
if
(
_stack
[
index
]
==
NULL
)
break
;
hash_val
+=
(
uintptr_t
)
_stack
[
index
];
}
NativeCallStack
*
p
=
const_cast
<
NativeCallStack
*>
(
this
);
p
->
_hash_value
=
(
int
)(
hash_val
&
0xFFFFFFFF
);
p
->
_hash_value
=
(
unsigned
int
)(
hash_val
&
0xFFFFFFFF
);
}
return
_hash_value
;
}
...
...
src/share/vm/utilities/nativeCallStack.hpp
浏览文件 @
c1942f3d
...
...
@@ -56,8 +56,8 @@ class NativeCallStack : public StackObj {
static
const
NativeCallStack
EMPTY_STACK
;
private:
address
_stack
[
NMT_TrackingStackDepth
];
int
_hash_value
;
address
_stack
[
NMT_TrackingStackDepth
];
unsigned
int
_hash_value
;
public:
NativeCallStack
(
int
toSkip
=
0
,
bool
fillStack
=
false
);
...
...
@@ -89,7 +89,7 @@ class NativeCallStack : public StackObj {
}
// Hash code. Any better algorithm?
int
hash
()
const
;
unsigned
int
hash
()
const
;
void
print_on
(
outputStream
*
out
)
const
;
void
print_on
(
outputStream
*
out
,
int
indent
)
const
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录