Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
be25833b
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看板
提交
be25833b
编写于
1月 31, 2017
作者:
A
aefimov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8173631: Backout three hotspot fixes from 8u121-bpr repo
Reviewed-by: vkempik, shshahma
上级
f6e72756
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
16 addition
and
183 deletion
+16
-183
src/cpu/sparc/vm/macroAssembler_sparc.cpp
src/cpu/sparc/vm/macroAssembler_sparc.cpp
+0
-1
src/cpu/sparc/vm/vm_version_sparc.cpp
src/cpu/sparc/vm/vm_version_sparc.cpp
+2
-2
src/os/linux/vm/globals_linux.hpp
src/os/linux/vm/globals_linux.hpp
+2
-5
src/os/linux/vm/os_linux.cpp
src/os/linux/vm/os_linux.cpp
+6
-44
src/share/vm/opto/cfgnode.hpp
src/share/vm/opto/cfgnode.hpp
+1
-9
src/share/vm/opto/macro.cpp
src/share/vm/opto/macro.cpp
+2
-2
src/share/vm/opto/memnode.cpp
src/share/vm/opto/memnode.cpp
+2
-2
src/share/vm/opto/phaseX.cpp
src/share/vm/opto/phaseX.cpp
+0
-14
src/share/vm/opto/type.hpp
src/share/vm/opto/type.hpp
+1
-1
test/runtime/os/AvailableProcessors.java
test/runtime/os/AvailableProcessors.java
+0
-103
未找到文件。
src/cpu/sparc/vm/macroAssembler_sparc.cpp
浏览文件 @
be25833b
...
...
@@ -4261,7 +4261,6 @@ void MacroAssembler::bis_zeroing(Register to, Register count, Register temp, Lab
assert
(
UseBlockZeroing
&&
VM_Version
::
has_block_zeroing
(),
"only works with BIS zeroing"
);
Register
end
=
count
;
int
cache_line_size
=
VM_Version
::
prefetch_data_size
();
assert
(
cache_line_size
>
0
,
"cache line size should be known for this code"
);
// Minimum count when BIS zeroing can be used since
// it needs membar which is expensive.
int
block_zero_size
=
MAX2
(
cache_line_size
*
3
,
(
int
)
BlockZeroingLowLimit
);
...
...
src/cpu/sparc/vm/vm_version_sparc.cpp
浏览文件 @
be25833b
...
...
@@ -74,7 +74,7 @@ void VM_Version::initialize() {
AllocatePrefetchDistance
=
AllocatePrefetchStepSize
;
}
if
(
AllocatePrefetchStyle
==
3
&&
(
!
has_blk_init
()
||
cache_line_size
<=
0
))
{
if
(
AllocatePrefetchStyle
==
3
&&
!
has_blk_init
(
))
{
warning
(
"BIS instructions are not available on this CPU"
);
FLAG_SET_DEFAULT
(
AllocatePrefetchStyle
,
1
);
}
...
...
@@ -138,7 +138,7 @@ void VM_Version::initialize() {
FLAG_SET_DEFAULT
(
InteriorEntryAlignment
,
4
);
}
if
(
is_niagara_plus
())
{
if
(
has_blk_init
()
&&
(
cache_line_size
>
0
)
&&
UseTLAB
&&
if
(
has_blk_init
()
&&
UseTLAB
&&
FLAG_IS_DEFAULT
(
AllocatePrefetchInstr
))
{
// Use BIS instruction for TLAB allocation prefetch.
FLAG_SET_ERGO
(
intx
,
AllocatePrefetchInstr
,
1
);
...
...
src/os/linux/vm/globals_linux.hpp
浏览文件 @
be25833b
/*
* Copyright (c) 2005, 201
6
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -47,10 +47,7 @@
"Load DLLs with executable-stack attribute in the VM Thread") \
\
product(bool, UseSHM, false, \
"Use SYSV shared memory for large pages") \
\
diagnostic(bool, PrintActiveCpus, false, \
"Print the number of CPUs detected in os::active_processor_count")
"Use SYSV shared memory for large pages")
//
// Defines Linux-specific default values. The flags are available on all
...
...
src/os/linux/vm/os_linux.cpp
浏览文件 @
be25833b
/*
* Copyright (c) 1999, 201
6
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
5
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -104,14 +104,6 @@
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#include <sched.h>
#undef _GNU_SOURCE
#else
#include <sched.h>
#endif
// if RUSAGE_THREAD for getrusage() has not been defined, do it here. The code calling
// getrusage() is prepared to handle the associated failure.
#ifndef RUSAGE_THREAD
...
...
@@ -5024,42 +5016,12 @@ void os::make_polling_page_readable(void) {
}
};
static
int
os_cpu_count
(
const
cpu_set_t
*
cpus
)
{
int
count
=
0
;
// only look up to the number of configured processors
for
(
int
i
=
0
;
i
<
os
::
processor_count
();
i
++
)
{
if
(
CPU_ISSET
(
i
,
cpus
))
{
count
++
;
}
}
return
count
;
}
// Get the current number of available processors for this process.
// This value can change at any time during a process's lifetime.
// sched_getaffinity gives an accurate answer as it accounts for cpusets.
// If anything goes wrong we fallback to returning the number of online
// processors - which can be greater than the number available to the process.
int
os
::
active_processor_count
()
{
cpu_set_t
cpus
;
// can represent at most 1024 (CPU_SETSIZE) processors
int
cpus_size
=
sizeof
(
cpu_set_t
);
int
cpu_count
=
0
;
// pid 0 means the current thread - which we have to assume represents the process
if
(
sched_getaffinity
(
0
,
cpus_size
,
&
cpus
)
==
0
)
{
cpu_count
=
os_cpu_count
(
&
cpus
);
if
(
PrintActiveCpus
)
{
tty
->
print_cr
(
"active_processor_count: sched_getaffinity processor count: %d"
,
cpu_count
);
}
}
else
{
cpu_count
=
::
sysconf
(
_SC_NPROCESSORS_ONLN
);
warning
(
"sched_getaffinity failed (%s)- using online processor count (%d) "
"which may exceed available processors"
,
strerror
(
errno
),
cpu_count
);
}
assert
(
cpu_count
>
0
&&
cpu_count
<=
processor_count
(),
"sanity check"
);
return
cpu_count
;
// Linux doesn't yet have a (official) notion of processor sets,
// so just return the number of online processors.
int
online_cpus
=
::
sysconf
(
_SC_NPROCESSORS_ONLN
);
assert
(
online_cpus
>
0
&&
online_cpus
<=
processor_count
(),
"sanity check"
);
return
online_cpus
;
}
void
os
::
set_native_thread_name
(
const
char
*
name
)
{
...
...
src/share/vm/opto/cfgnode.hpp
浏览文件 @
be25833b
...
...
@@ -119,9 +119,6 @@ class JProjNode : public ProjNode {
// input in slot 0.
class
PhiNode
:
public
TypeNode
{
const
TypePtr
*
const
_adr_type
;
// non-null only for Type::MEMORY nodes.
// The following fields are only used for data PhiNodes to indicate
// that the PhiNode represents the value of a known instance field.
int
_inst_mem_id
;
// Instance memory id (node index of the memory Phi)
const
int
_inst_id
;
// Instance id of the memory slice.
const
int
_inst_index
;
// Alias index of the instance memory slice.
// Array elements references have the same alias_idx but different offset.
...
...
@@ -141,13 +138,11 @@ public:
};
PhiNode
(
Node
*
r
,
const
Type
*
t
,
const
TypePtr
*
at
=
NULL
,
const
int
imid
=
-
1
,
const
int
iid
=
TypeOopPtr
::
InstanceTop
,
const
int
iidx
=
Compile
::
AliasIdxTop
,
const
int
ioffs
=
Type
::
OffsetTop
)
:
TypeNode
(
t
,
r
->
req
()),
_adr_type
(
at
),
_inst_mem_id
(
imid
),
_inst_id
(
iid
),
_inst_index
(
iidx
),
_inst_offset
(
ioffs
)
...
...
@@ -192,14 +187,11 @@ public:
virtual
bool
pinned
()
const
{
return
in
(
0
)
!=
0
;
}
virtual
const
TypePtr
*
adr_type
()
const
{
verify_adr_type
(
true
);
return
_adr_type
;
}
void
set_inst_mem_id
(
int
inst_mem_id
)
{
_inst_mem_id
=
inst_mem_id
;
}
const
int
inst_mem_id
()
const
{
return
_inst_mem_id
;
}
const
int
inst_id
()
const
{
return
_inst_id
;
}
const
int
inst_index
()
const
{
return
_inst_index
;
}
const
int
inst_offset
()
const
{
return
_inst_offset
;
}
bool
is_same_inst_field
(
const
Type
*
tp
,
int
mem_id
,
int
id
,
int
index
,
int
offset
)
{
bool
is_same_inst_field
(
const
Type
*
tp
,
int
id
,
int
index
,
int
offset
)
{
return
type
()
->
basic_type
()
==
tp
->
basic_type
()
&&
inst_mem_id
()
==
mem_id
&&
inst_id
()
==
id
&&
inst_index
()
==
index
&&
inst_offset
()
==
offset
&&
...
...
src/share/vm/opto/macro.cpp
浏览文件 @
be25833b
...
...
@@ -401,7 +401,7 @@ Node *PhaseMacroExpand::value_from_mem_phi(Node *mem, BasicType ft, const Type *
for
(
DUIterator_Fast
kmax
,
k
=
region
->
fast_outs
(
kmax
);
k
<
kmax
;
k
++
)
{
Node
*
phi
=
region
->
fast_out
(
k
);
if
(
phi
->
is_Phi
()
&&
phi
!=
mem
&&
phi
->
as_Phi
()
->
is_same_inst_field
(
phi_type
,
(
int
)
mem
->
_idx
,
instance_id
,
alias_idx
,
offset
))
{
phi
->
as_Phi
()
->
is_same_inst_field
(
phi_type
,
instance_id
,
alias_idx
,
offset
))
{
return
phi
;
}
}
...
...
@@ -420,7 +420,7 @@ Node *PhaseMacroExpand::value_from_mem_phi(Node *mem, BasicType ft, const Type *
GrowableArray
<
Node
*>
values
(
length
,
length
,
NULL
,
false
);
// create a new Phi for the value
PhiNode
*
phi
=
new
(
C
)
PhiNode
(
mem
->
in
(
0
),
phi_type
,
NULL
,
mem
->
_idx
,
instance_id
,
alias_idx
,
offset
);
PhiNode
*
phi
=
new
(
C
)
PhiNode
(
mem
->
in
(
0
),
phi_type
,
NULL
,
instance_id
,
alias_idx
,
offset
);
transform_later
(
phi
);
value_phis
->
push
(
phi
,
mem
->
_idx
);
...
...
src/share/vm/opto/memnode.cpp
浏览文件 @
be25833b
...
...
@@ -1155,7 +1155,7 @@ Node *LoadNode::Identity( PhaseTransform *phase ) {
for
(
DUIterator_Fast
imax
,
i
=
region
->
fast_outs
(
imax
);
i
<
imax
;
i
++
)
{
Node
*
phi
=
region
->
fast_out
(
i
);
if
(
phi
->
is_Phi
()
&&
phi
!=
mem
&&
phi
->
as_Phi
()
->
is_same_inst_field
(
this_type
,
(
int
)
mem
->
_idx
,
this_iid
,
this_index
,
this_offset
))
{
phi
->
as_Phi
()
->
is_same_inst_field
(
this_type
,
this_iid
,
this_index
,
this_offset
))
{
return
phi
;
}
}
...
...
@@ -1400,7 +1400,7 @@ Node *LoadNode::split_through_phi(PhaseGVN *phase) {
this_iid
=
base
->
_idx
;
}
PhaseIterGVN
*
igvn
=
phase
->
is_IterGVN
();
Node
*
phi
=
new
(
C
)
PhiNode
(
region
,
this_type
,
NULL
,
mem
->
_idx
,
this_iid
,
this_index
,
this_offset
);
Node
*
phi
=
new
(
C
)
PhiNode
(
region
,
this_type
,
NULL
,
this_iid
,
this_index
,
this_offset
);
for
(
uint
i
=
1
;
i
<
region
->
req
();
i
++
)
{
Node
*
x
;
Node
*
the_clone
=
NULL
;
...
...
src/share/vm/opto/phaseX.cpp
浏览文件 @
be25833b
...
...
@@ -481,8 +481,6 @@ PhaseRenumberLive::PhaseRenumberLive(PhaseGVN* gvn,
uint
current_idx
=
0
;
// The current new node ID. Incremented after every assignment.
for
(
uint
i
=
0
;
i
<
_useful
.
size
();
i
++
)
{
Node
*
n
=
_useful
.
at
(
i
);
// Sanity check that fails if we ever decide to execute this phase after EA
assert
(
!
n
->
is_Phi
()
||
n
->
as_Phi
()
->
inst_mem_id
()
==
-
1
,
"should not be linked to data Phi"
);
const
Type
*
type
=
gvn
->
type_or_null
(
n
);
new_type_array
.
map
(
current_idx
,
type
);
...
...
@@ -1380,18 +1378,6 @@ void PhaseIterGVN::subsume_node( Node *old, Node *nn ) {
i
-=
num_edges
;
// we deleted 1 or more copies of this edge
}
// Search for instance field data PhiNodes in the same region pointing to the old
// memory PhiNode and update their instance memory ids to point to the new node.
if
(
old
->
is_Phi
()
&&
old
->
as_Phi
()
->
type
()
->
has_memory
()
&&
old
->
in
(
0
)
!=
NULL
)
{
Node
*
region
=
old
->
in
(
0
);
for
(
DUIterator_Fast
imax
,
i
=
region
->
fast_outs
(
imax
);
i
<
imax
;
i
++
)
{
PhiNode
*
phi
=
region
->
fast_out
(
i
)
->
isa_Phi
();
if
(
phi
!=
NULL
&&
phi
->
inst_mem_id
()
==
(
int
)
old
->
_idx
)
{
phi
->
set_inst_mem_id
((
int
)
nn
->
_idx
);
}
}
}
// Smash all inputs to 'old', isolating him completely
Node
*
temp
=
new
(
C
)
Node
(
1
);
temp
->
init_req
(
0
,
nn
);
// Add a use to nn to prevent him from dying
...
...
src/share/vm/opto/type.hpp
浏览文件 @
be25833b
...
...
@@ -882,7 +882,7 @@ protected:
// If not InstanceTop or InstanceBot, indicates that this is
// a particular instance of this type which is distinct.
// This is the node index of the allocation node creating this instance.
// This is the
the
node index of the allocation node creating this instance.
int
_instance_id
;
// Extra type information profiling gave us. We propagate it the
...
...
test/runtime/os/AvailableProcessors.java
已删除
100644 → 0
浏览文件 @
f6e72756
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import
java.io.File
;
import
com.oracle.java.testlibrary.ProcessTools
;
import
com.oracle.java.testlibrary.OutputAnalyzer
;
import
java.util.ArrayList
;
/*
* @test
* @bug 6515172
* @summary Check that availableProcessors reports the correct value when running in a cpuset on linux
* @requires os.family == "linux"
* @library /testlibrary
* @build com.oracle.java.testlibrary.*
* @run driver AvailableProcessors
*/
public
class
AvailableProcessors
{
static
final
String
SUCCESS_STRING
=
"Found expected processors: "
;
public
static
void
main
(
String
[]
args
)
throws
Throwable
{
if
(
args
.
length
>
0
)
checkProcessors
(
Integer
.
parseInt
(
args
[
0
]));
else
{
// run ourselves under different cpu configurations
// using the taskset command
String
taskset
;
final
String
taskset1
=
"/bin/taskset"
;
final
String
taskset2
=
"/usr/bin/taskset"
;
if
(
new
File
(
taskset1
).
exists
())
taskset
=
taskset1
;
else
if
(
new
File
(
taskset2
).
exists
())
taskset
=
taskset2
;
else
{
System
.
out
.
println
(
"Skipping test: could not find taskset command"
);
return
;
}
int
available
=
Runtime
.
getRuntime
().
availableProcessors
();
if
(
available
==
1
)
{
System
.
out
.
println
(
"Skipping test: only one processor available"
);
return
;
}
// Get the java command we want to execute
// Enable logging for easier failure diagnosis
ProcessBuilder
master
=
ProcessTools
.
createJavaProcessBuilder
(
false
,
"-XX:+UnlockDiagnosticVMOptions"
,
"-XX:+PrintActiveCpus"
,
"AvailableProcessors"
);
int
[]
expected
=
new
int
[]
{
1
,
available
/
2
,
available
-
1
,
available
};
for
(
int
i
:
expected
)
{
System
.
out
.
println
(
"Testing for "
+
i
+
" processors ..."
);
int
max
=
i
-
1
;
ArrayList
<
String
>
cmdline
=
new
ArrayList
<>(
master
.
command
());
// prepend taskset command
cmdline
.
add
(
0
,
"0-"
+
max
);
cmdline
.
add
(
0
,
"-c"
);
cmdline
.
add
(
0
,
taskset
);
// append expected processor count
cmdline
.
add
(
String
.
valueOf
(
i
));
ProcessBuilder
pb
=
new
ProcessBuilder
(
cmdline
);
System
.
out
.
println
(
"Final command line: "
+
ProcessTools
.
getCommandLine
(
pb
));
OutputAnalyzer
output
=
ProcessTools
.
executeProcess
(
pb
);
output
.
shouldContain
(
SUCCESS_STRING
);
}
}
}
static
void
checkProcessors
(
int
expected
)
{
int
available
=
Runtime
.
getRuntime
().
availableProcessors
();
if
(
available
!=
expected
)
throw
new
Error
(
"Expected "
+
expected
+
" processors, but found "
+
available
);
else
System
.
out
.
println
(
SUCCESS_STRING
+
available
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录