Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
aae2813b
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看板
提交
aae2813b
编写于
4月 23, 2018
作者:
M
mchinnathamb
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8158012: Use SW prefetch instructions instead of BIS for allocation prefetches on SPARC Core C4
Reviewed-by: kvn, dholmes, poonam
上级
a14567db
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
21 addition
and
7 deletion
+21
-7
src/cpu/sparc/vm/vm_version_sparc.cpp
src/cpu/sparc/vm/vm_version_sparc.cpp
+17
-5
src/share/vm/opto/macro.cpp
src/share/vm/opto/macro.cpp
+4
-2
未找到文件。
src/cpu/sparc/vm/vm_version_sparc.cpp
浏览文件 @
aae2813b
/*
/*
* Copyright (c) 1997, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
...
@@ -140,10 +140,17 @@ void VM_Version::initialize() {
...
@@ -140,10 +140,17 @@ void VM_Version::initialize() {
if
(
is_niagara_plus
())
{
if
(
is_niagara_plus
())
{
if
(
has_blk_init
()
&&
(
cache_line_size
>
0
)
&&
UseTLAB
&&
if
(
has_blk_init
()
&&
(
cache_line_size
>
0
)
&&
UseTLAB
&&
FLAG_IS_DEFAULT
(
AllocatePrefetchInstr
))
{
FLAG_IS_DEFAULT
(
AllocatePrefetchInstr
))
{
// Use BIS instruction for TLAB allocation prefetch.
if
(
!
has_sparc5_instr
())
{
FLAG_SET_ERGO
(
intx
,
AllocatePrefetchInstr
,
1
);
// Use BIS instruction for TLAB allocation prefetch
// on Niagara plus processors other than those based on CoreS4.
FLAG_SET_DEFAULT
(
AllocatePrefetchInstr
,
1
);
}
else
{
// On CoreS4 processors use prefetch instruction
// to avoid partial RAW issue, also use prefetch style 3.
FLAG_SET_DEFAULT
(
AllocatePrefetchInstr
,
0
);
if
(
FLAG_IS_DEFAULT
(
AllocatePrefetchStyle
))
{
if
(
FLAG_IS_DEFAULT
(
AllocatePrefetchStyle
))
{
FLAG_SET_ERGO
(
intx
,
AllocatePrefetchStyle
,
3
);
FLAG_SET_DEFAULT
(
AllocatePrefetchStyle
,
3
);
}
}
}
if
(
FLAG_IS_DEFAULT
(
AllocatePrefetchDistance
))
{
if
(
FLAG_IS_DEFAULT
(
AllocatePrefetchDistance
))
{
// Use smaller prefetch distance with BIS
// Use smaller prefetch distance with BIS
...
@@ -165,6 +172,11 @@ void VM_Version::initialize() {
...
@@ -165,6 +172,11 @@ void VM_Version::initialize() {
FLAG_SET_DEFAULT
(
AllocatePrefetchDistance
,
256
);
FLAG_SET_DEFAULT
(
AllocatePrefetchDistance
,
256
);
}
}
if
(
AllocatePrefetchInstr
==
1
)
{
if
(
AllocatePrefetchInstr
==
1
)
{
// Use allocation prefetch style 3 because BIS instructions
// require aligned memory addresses.
FLAG_SET_DEFAULT
(
AllocatePrefetchStyle
,
3
);
// Need a space at the end of TLAB for BIS since it
// Need a space at the end of TLAB for BIS since it
// will fault when accessing memory outside of heap.
// will fault when accessing memory outside of heap.
...
...
src/share/vm/opto/macro.cpp
浏览文件 @
aae2813b
/*
/*
* Copyright (c) 2005, 201
5
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 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
...
@@ -1775,7 +1775,7 @@ Node* PhaseMacroExpand::prefetch_allocation(Node* i_o, Node*& needgc_false,
...
@@ -1775,7 +1775,7 @@ Node* PhaseMacroExpand::prefetch_allocation(Node* i_o, Node*& needgc_false,
i_o
=
pf_phi_abio
;
i_o
=
pf_phi_abio
;
}
else
if
(
UseTLAB
&&
AllocatePrefetchStyle
==
3
)
{
}
else
if
(
UseTLAB
&&
AllocatePrefetchStyle
==
3
)
{
// Insert a prefetch for each allocation.
// Insert a prefetch for each allocation.
// This code is used
for Sparc with BIS
.
// This code is used
to generate 1 prefetch instruction per cache line
.
Node
*
pf_region
=
new
(
C
)
RegionNode
(
3
);
Node
*
pf_region
=
new
(
C
)
RegionNode
(
3
);
Node
*
pf_phi_rawmem
=
new
(
C
)
PhiNode
(
pf_region
,
Type
::
MEMORY
,
Node
*
pf_phi_rawmem
=
new
(
C
)
PhiNode
(
pf_region
,
Type
::
MEMORY
,
TypeRawPtr
::
BOTTOM
);
TypeRawPtr
::
BOTTOM
);
...
@@ -1791,6 +1791,8 @@ Node* PhaseMacroExpand::prefetch_allocation(Node* i_o, Node*& needgc_false,
...
@@ -1791,6 +1791,8 @@ Node* PhaseMacroExpand::prefetch_allocation(Node* i_o, Node*& needgc_false,
transform_later
(
cache_adr
);
transform_later
(
cache_adr
);
cache_adr
=
new
(
C
)
CastP2XNode
(
needgc_false
,
cache_adr
);
cache_adr
=
new
(
C
)
CastP2XNode
(
needgc_false
,
cache_adr
);
transform_later
(
cache_adr
);
transform_later
(
cache_adr
);
// Address is aligned to execute prefetch to the beginning of cache line size
// (it is important when BIS instruction is used on SPARC as prefetch).
Node
*
mask
=
_igvn
.
MakeConX
(
~
(
intptr_t
)(
step_size
-
1
));
Node
*
mask
=
_igvn
.
MakeConX
(
~
(
intptr_t
)(
step_size
-
1
));
cache_adr
=
new
(
C
)
AndXNode
(
cache_adr
,
mask
);
cache_adr
=
new
(
C
)
AndXNode
(
cache_adr
,
mask
);
transform_later
(
cache_adr
);
transform_later
(
cache_adr
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录