Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
d87964c4
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看板
提交
d87964c4
编写于
3月 31, 2017
作者:
K
kevinw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8165482: java in ldoms, with cpu-arch=generic has problems
Reviewed-by: dholmes, alanbur
上级
2aa938b9
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
38 addition
and
33 deletion
+38
-33
src/cpu/sparc/vm/vm_version_sparc.cpp
src/cpu/sparc/vm/vm_version_sparc.cpp
+6
-8
src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp
src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp
+32
-25
未找到文件。
src/cpu/sparc/vm/vm_version_sparc.cpp
浏览文件 @
d87964c4
...
@@ -236,7 +236,7 @@ void VM_Version::initialize() {
...
@@ -236,7 +236,7 @@ void VM_Version::initialize() {
assert
((
OptoLoopAlignment
%
relocInfo
::
addr_unit
())
==
0
,
"alignment is not a multiple of NOP size"
);
assert
((
OptoLoopAlignment
%
relocInfo
::
addr_unit
())
==
0
,
"alignment is not a multiple of NOP size"
);
char
buf
[
512
];
char
buf
[
512
];
jio_snprintf
(
buf
,
sizeof
(
buf
),
"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s"
,
jio_snprintf
(
buf
,
sizeof
(
buf
),
"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s
%s
"
,
(
has_v9
()
?
", v9"
:
(
has_v8
()
?
", v8"
:
""
)),
(
has_v9
()
?
", v9"
:
(
has_v8
()
?
", v8"
:
""
)),
(
has_hardware_popc
()
?
", popc"
:
""
),
(
has_hardware_popc
()
?
", popc"
:
""
),
(
has_vis1
()
?
", vis1"
:
""
),
(
has_vis1
()
?
", vis1"
:
""
),
...
@@ -249,6 +249,7 @@ void VM_Version::initialize() {
...
@@ -249,6 +249,7 @@ void VM_Version::initialize() {
(
has_sha256
()
?
", sha256"
:
""
),
(
has_sha256
()
?
", sha256"
:
""
),
(
has_sha512
()
?
", sha512"
:
""
),
(
has_sha512
()
?
", sha512"
:
""
),
(
is_ultra3
()
?
", ultra3"
:
""
),
(
is_ultra3
()
?
", ultra3"
:
""
),
(
has_sparc5_instr
()
?
", sparc5"
:
""
),
(
is_sun4v
()
?
", sun4v"
:
""
),
(
is_sun4v
()
?
", sun4v"
:
""
),
(
is_niagara_plus
()
?
", niagara_plus"
:
(
is_niagara
()
?
", niagara"
:
""
)),
(
is_niagara_plus
()
?
", niagara_plus"
:
(
is_niagara
()
?
", niagara"
:
""
)),
(
is_sparc64
()
?
", sparc64"
:
""
),
(
is_sparc64
()
?
", sparc64"
:
""
),
...
@@ -479,16 +480,13 @@ int VM_Version::parse_features(const char* implementation) {
...
@@ -479,16 +480,13 @@ int VM_Version::parse_features(const char* implementation) {
if
(
strstr
(
impl
,
"SPARC-T1"
)
!=
NULL
)
{
if
(
strstr
(
impl
,
"SPARC-T1"
)
!=
NULL
)
{
features
|=
T1_model_m
;
features
|=
T1_model_m
;
}
}
}
else
if
(
strstr
(
impl
,
"SUN4V-CPU"
)
!=
NULL
)
{
// Generic or migration class LDOM
features
|=
T_family_m
;
}
else
{
}
else
{
if
(
strstr
(
impl
,
"SPARC"
)
==
NULL
)
{
#ifndef PRODUCT
#ifndef PRODUCT
// kstat on Solaris 8 virtual machines (branded zones)
warning
(
"Failed to parse CPU implementation = '%s'"
,
impl
);
// returns "(unsupported)" implementation. Solaris 8 is not
// supported anymore, but include this check to be on the
// safe side.
warning
(
"Can't parse CPU implementation = '%s', assume generic SPARC"
,
impl
);
#endif
#endif
}
}
}
os
::
free
((
void
*
)
impl
);
os
::
free
((
void
*
)
impl
);
return
features
;
return
features
;
...
...
src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp
浏览文件 @
d87964c4
...
@@ -438,40 +438,47 @@ int VM_Version::platform_features(int features) {
...
@@ -438,40 +438,47 @@ int VM_Version::platform_features(int features) {
features
|=
sun4v_m
;
features
|=
sun4v_m
;
}
}
bool
use_solaris_12_api
=
false
;
// If SI_CPUBRAND works, that means Solaris 12 API to get the cache line sizes
Sysinfo
impl
(
SI_CPUBRAND
);
// is available to us as well
if
(
impl
.
valid
())
{
Sysinfo
cpu_info
(
SI_CPUBRAND
);
// If SI_CPUBRAND works, that means Solaris 12 API to get the cache line sizes
bool
use_solaris_12_api
=
cpu_info
.
valid
();
// is available to us as well
const
char
*
impl
;
use_solaris_12_api
=
true
;
int
impl_m
=
0
;
features
|=
parse_features
(
impl
.
value
());
if
(
use_solaris_12_api
)
{
impl
=
cpu_info
.
value
();
#ifndef PRODUCT
if
(
PrintMiscellaneous
&&
Verbose
)
{
tty
->
print_cr
(
"Parsing CPU implementation from %s"
,
impl
);
}
#endif
impl_m
=
parse_features
(
impl
);
}
else
{
}
else
{
// Otherwise use kstat to determine the machine type.
// Otherwise use kstat to determine the machine type.
kstat_ctl_t
*
kc
=
kstat_open
();
kstat_ctl_t
*
kc
=
kstat_open
();
kstat_t
*
ksp
=
kstat_lookup
(
kc
,
(
char
*
)
"cpu_info"
,
-
1
,
NULL
);
if
(
kc
!=
NULL
)
{
const
char
*
implementation
;
kstat_t
*
ksp
=
kstat_lookup
(
kc
,
(
char
*
)
"cpu_info"
,
-
1
,
NULL
);
bool
has_implementation
=
false
;
if
(
ksp
!=
NULL
)
{
if
(
ksp
!=
NULL
)
{
if
(
kstat_read
(
kc
,
ksp
,
NULL
)
!=
-
1
&&
ksp
->
ks_data
!=
NULL
)
{
if
(
kstat_read
(
kc
,
ksp
,
NULL
)
!=
-
1
&&
ksp
->
ks_data
!=
NULL
)
{
kstat_named_t
*
knm
=
(
kstat_named_t
*
)
ksp
->
ks_data
;
kstat_named_t
*
knm
=
(
kstat_named_t
*
)
ksp
->
ks_data
;
for
(
int
i
=
0
;
i
<
ksp
->
ks_ndata
;
i
++
)
{
for
(
int
i
=
0
;
i
<
ksp
->
ks_ndata
;
i
++
)
{
if
(
strcmp
((
const
char
*
)
&
(
knm
[
i
].
name
),
"implementation"
)
==
0
)
{
if
(
strcmp
((
const
char
*
)
&
(
knm
[
i
].
name
),
"implementation"
)
==
0
)
{
impl
=
KSTAT_NAMED_STR_PTR
(
&
knm
[
i
]);
implementation
=
KSTAT_NAMED_STR_PTR
(
&
knm
[
i
]);
has_implementation
=
true
;
#ifndef PRODUCT
#ifndef PRODUCT
if
(
PrintMiscellaneous
&&
Verbose
)
{
if
(
PrintMiscellaneous
&&
Verbose
)
{
tty
->
print_cr
(
"cpu_info.implementation: %s"
,
implementation
);
tty
->
print_cr
(
"Parsing CPU implementation from %s"
,
impl
);
}
}
#endif
#endif
features
|=
parse_features
(
implementation
);
impl_m
=
parse_features
(
impl
);
break
;
break
;
}
}
}
}
// for(
}
}
}
kstat_close
(
kc
);
}
}
assert
(
has_implementation
,
"unknown cpu info (changed kstat interface?)"
);
kstat_close
(
kc
);
}
}
assert
(
impl_m
!=
0
,
err_msg
(
"Unknown CPU implementation %s"
,
impl
));
features
|=
impl_m
;
bool
is_sun4v
=
(
features
&
sun4v_m
)
!=
0
;
bool
is_sun4v
=
(
features
&
sun4v_m
)
!=
0
;
if
(
use_solaris_12_api
&&
is_sun4v
)
{
if
(
use_solaris_12_api
&&
is_sun4v
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录