Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
064d51d6
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看板
提交
064d51d6
编写于
9月 08, 2017
作者:
K
kevinw
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
83ac6b16
c96cd44d
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
144 addition
and
36 deletion
+144
-36
agent/src/share/classes/sun/jvm/hotspot/tools/ClassLoaderStats.java
...share/classes/sun/jvm/hotspot/tools/ClassLoaderStats.java
+4
-3
agent/src/share/classes/sun/jvm/hotspot/utilities/soql/sa.js
agent/src/share/classes/sun/jvm/hotspot/utilities/soql/sa.js
+11
-3
src/share/vm/compiler/oopMap.cpp
src/share/vm/compiler/oopMap.cpp
+9
-10
src/share/vm/opto/loopnode.cpp
src/share/vm/opto/loopnode.cpp
+7
-1
src/share/vm/opto/loopnode.hpp
src/share/vm/opto/loopnode.hpp
+14
-4
src/share/vm/opto/phaseX.cpp
src/share/vm/opto/phaseX.cpp
+41
-13
src/share/vm/opto/phaseX.hpp
src/share/vm/opto/phaseX.hpp
+2
-2
src/share/vm/runtime/arguments.cpp
src/share/vm/runtime/arguments.cpp
+5
-0
test/compiler/loopopts/TestImpossibleIV.java
test/compiler/loopopts/TestImpossibleIV.java
+51
-0
未找到文件。
agent/src/share/classes/sun/jvm/hotspot/tools/ClassLoaderStats.java
浏览文件 @
064d51d6
/*
* Copyright (c) 2003, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
7
, 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
...
...
@@ -103,11 +103,12 @@ public class ClassLoaderStats extends Tool {
}
SystemDictionary
dict
=
VM
.
getVM
().
getSystemDictionary
();
dict
.
classesDo
(
new
SystemDictionary
.
Class
AndLoader
Visitor
()
{
public
void
visit
(
Klass
k
,
Oop
loader
)
{
dict
.
classesDo
(
new
SystemDictionary
.
ClassVisitor
()
{
public
void
visit
(
Klass
k
)
{
if
(!
(
k
instanceof
InstanceKlass
))
{
return
;
}
Oop
loader
=
((
InstanceKlass
)
k
).
getClassLoader
();
LoaderData
ld
=
(
loader
!=
null
)
?
(
LoaderData
)
loaderMap
.
get
(
loader
)
:
bootstrapLoaderData
;
if
(
ld
!=
null
)
{
...
...
agent/src/share/classes/sun/jvm/hotspot/utilities/soql/sa.js
浏览文件 @
064d51d6
/*
* Copyright (c) 2004, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 201
7
, 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
...
...
@@ -804,6 +804,16 @@ delete tmp;
// VM type to SA class map
var
vmType2Class
=
new
Object
();
// C2 only classes
try
{
vmType2Class
[
"
ExceptionBlob
"
]
=
sapkg
.
code
.
ExceptionBlob
;
vmType2Class
[
"
UncommonTrapBlob
"
]
=
sapkg
.
code
.
UncommonTrapBlob
;
}
catch
(
e
)
{
// Ignore exception. C2 specific objects might be not
// available in client VM
}
// This is *not* exhaustive. Add more if needed.
// code blobs
vmType2Class
[
"
BufferBlob
"
]
=
sapkg
.
code
.
BufferBlob
;
...
...
@@ -812,10 +822,8 @@ vmType2Class["RuntimeStub"] = sapkg.code.RuntimeStub;
vmType2Class
[
"
SafepointBlob
"
]
=
sapkg
.
code
.
SafepointBlob
;
vmType2Class
[
"
C2IAdapter
"
]
=
sapkg
.
code
.
C2IAdapter
;
vmType2Class
[
"
DeoptimizationBlob
"
]
=
sapkg
.
code
.
DeoptimizationBlob
;
vmType2Class
[
"
ExceptionBlob
"
]
=
sapkg
.
code
.
ExceptionBlob
;
vmType2Class
[
"
I2CAdapter
"
]
=
sapkg
.
code
.
I2CAdapter
;
vmType2Class
[
"
OSRAdapter
"
]
=
sapkg
.
code
.
OSRAdapter
;
vmType2Class
[
"
UncommonTrapBlob
"
]
=
sapkg
.
code
.
UncommonTrapBlob
;
vmType2Class
[
"
PCDesc
"
]
=
sapkg
.
code
.
PCDesc
;
// interpreter
...
...
src/share/vm/compiler/oopMap.cpp
浏览文件 @
064d51d6
/*
* Copyright (c) 1998, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 201
7
, 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
...
...
@@ -389,17 +389,16 @@ void OopMapSet::all_do(const frame *fr, const RegisterMap *reg_map,
omv
=
oms
.
current
();
oop
*
loc
=
fr
->
oopmapreg_to_location
(
omv
.
reg
(),
reg_map
);
if
(
loc
!=
NULL
)
{
oop
*
base_loc
=
fr
->
oopmapreg_to_location
(
omv
.
content_reg
(),
reg_map
);
oop
*
derived_loc
=
loc
;
oop
val
=
*
base_loc
;
if
(
val
==
(
oop
)
NULL
||
Universe
::
is_narrow_oop_base
(
val
))
{
// Ignore NULL oops and decoded NULL narrow oops which
// equal to Universe::narrow_oop_base when a narrow oop
// implicit null check is used in compiled code.
// The narrow_oop_base could be NULL or be the address
// of the page below heap depending on compressed oops mode.
}
else
oop
*
base_loc
=
fr
->
oopmapreg_to_location
(
omv
.
content_reg
(),
reg_map
);
// Ignore NULL oops and decoded NULL narrow oops which
// equal to Universe::narrow_oop_base when a narrow oop
// implicit null check is used in compiled code.
// The narrow_oop_base could be NULL or be the address
// of the page below heap depending on compressed oops mode.
if
(
base_loc
!=
NULL
&&
*
base_loc
!=
(
oop
)
NULL
&&
!
Universe
::
is_narrow_oop_base
(
*
base_loc
))
{
derived_oop_fn
(
base_loc
,
derived_loc
);
}
}
oms
.
next
();
}
while
(
!
oms
.
is_done
());
...
...
src/share/vm/opto/loopnode.cpp
浏览文件 @
064d51d6
/*
* Copyright (c) 1998, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 201
7
, 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
...
...
@@ -1773,6 +1773,12 @@ void PhaseIdealLoop::replace_parallel_iv(IdealLoopTree *loop) {
Node
*
init2
=
phi2
->
in
(
LoopNode
::
EntryControl
);
int
stride_con2
=
incr2
->
in
(
2
)
->
get_int
();
// The ratio of the two strides cannot be represented as an int
// if stride_con2 is min_int and stride_con is -1.
if
(
stride_con2
==
min_jint
&&
stride_con
==
-
1
)
{
continue
;
}
// The general case here gets a little tricky. We want to find the
// GCD of all possible parallel IV's and make a new IV using this
// GCD for the loop. Then all possible IVs are simple multiples of
...
...
src/share/vm/opto/loopnode.hpp
浏览文件 @
064d51d6
/*
* Copyright (c) 1998, 201
5
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 201
7
, 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
...
...
@@ -257,19 +257,29 @@ public:
Node
*
incr
()
const
{
Node
*
tmp
=
cmp_node
();
return
(
tmp
&&
tmp
->
req
()
==
3
)
?
tmp
->
in
(
1
)
:
NULL
;
}
Node
*
limit
()
const
{
Node
*
tmp
=
cmp_node
();
return
(
tmp
&&
tmp
->
req
()
==
3
)
?
tmp
->
in
(
2
)
:
NULL
;
}
Node
*
stride
()
const
{
Node
*
tmp
=
incr
();
return
(
tmp
&&
tmp
->
req
()
==
3
)
?
tmp
->
in
(
2
)
:
NULL
;
}
Node
*
phi
()
const
{
Node
*
tmp
=
incr
();
return
(
tmp
&&
tmp
->
req
()
==
3
)
?
tmp
->
in
(
1
)
:
NULL
;
}
Node
*
init_trip
()
const
{
Node
*
tmp
=
phi
();
return
(
tmp
&&
tmp
->
req
()
==
3
)
?
tmp
->
in
(
1
)
:
NULL
;
}
int
stride_con
()
const
;
bool
stride_is_con
()
const
{
Node
*
tmp
=
stride
();
return
(
tmp
!=
NULL
&&
tmp
->
is_Con
());
}
BoolTest
::
mask
test_trip
()
const
{
return
in
(
TestValue
)
->
as_Bool
()
->
_test
.
_test
;
}
PhiNode
*
phi
()
const
{
Node
*
tmp
=
incr
();
if
(
tmp
&&
tmp
->
req
()
==
3
)
{
Node
*
phi
=
tmp
->
in
(
1
);
if
(
phi
->
is_Phi
())
{
return
phi
->
as_Phi
();
}
}
return
NULL
;
}
CountedLoopNode
*
loopnode
()
const
{
// The CountedLoopNode that goes with this CountedLoopEndNode may
// have been optimized out by the IGVN so be cautious with the
// pattern matching on the graph
if
(
phi
()
==
NULL
)
{
PhiNode
*
iv_phi
=
phi
();
if
(
iv_phi
==
NULL
)
{
return
NULL
;
}
Node
*
ln
=
phi
()
->
in
(
0
);
Node
*
ln
=
iv_phi
->
in
(
0
);
if
(
ln
->
is_CountedLoop
()
&&
ln
->
as_CountedLoop
()
->
loopexit
()
==
this
)
{
return
(
CountedLoopNode
*
)
ln
;
}
...
...
src/share/vm/opto/phaseX.cpp
浏览文件 @
064d51d6
/*
* Copyright (c) 1997, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
7
, 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
...
...
@@ -1416,6 +1416,27 @@ void PhaseIterGVN::add_users_to_worklist0( Node *n ) {
}
}
// Return counted loop Phi if as a counted loop exit condition, cmp
// compares the the induction variable with n
static
PhiNode
*
countedloop_phi_from_cmp
(
CmpINode
*
cmp
,
Node
*
n
)
{
for
(
DUIterator_Fast
imax
,
i
=
cmp
->
fast_outs
(
imax
);
i
<
imax
;
i
++
)
{
Node
*
bol
=
cmp
->
fast_out
(
i
);
for
(
DUIterator_Fast
i2max
,
i2
=
bol
->
fast_outs
(
i2max
);
i2
<
i2max
;
i2
++
)
{
Node
*
iff
=
bol
->
fast_out
(
i2
);
if
(
iff
->
is_CountedLoopEnd
())
{
CountedLoopEndNode
*
cle
=
iff
->
as_CountedLoopEnd
();
if
(
cle
->
limit
()
==
n
)
{
PhiNode
*
phi
=
cle
->
phi
();
if
(
phi
!=
NULL
)
{
return
phi
;
}
}
}
}
}
return
NULL
;
}
void
PhaseIterGVN
::
add_users_to_worklist
(
Node
*
n
)
{
add_users_to_worklist0
(
n
);
...
...
@@ -1445,18 +1466,7 @@ void PhaseIterGVN::add_users_to_worklist( Node *n ) {
Node
*
bol
=
use
->
raw_out
(
0
);
if
(
bol
->
outcnt
()
>
0
)
{
Node
*
iff
=
bol
->
raw_out
(
0
);
if
(
use_op
==
Op_CmpI
&&
iff
->
is_CountedLoopEnd
())
{
CountedLoopEndNode
*
cle
=
iff
->
as_CountedLoopEnd
();
if
(
cle
->
limit
()
==
n
&&
cle
->
phi
()
!=
NULL
)
{
// If an opaque node feeds into the limit condition of a
// CountedLoop, we need to process the Phi node for the
// induction variable when the opaque node is removed:
// the range of values taken by the Phi is now known and
// so its type is also known.
_worklist
.
push
(
cle
->
phi
());
}
}
else
if
(
iff
->
outcnt
()
==
2
)
{
if
(
iff
->
outcnt
()
==
2
)
{
// Look for the 'is_x2logic' pattern: "x ? : 0 : 1" and put the
// phi merging either 0 or 1 onto the worklist
Node
*
ifproj0
=
iff
->
raw_out
(
0
);
...
...
@@ -1471,6 +1481,15 @@ void PhaseIterGVN::add_users_to_worklist( Node *n ) {
}
}
if
(
use_op
==
Op_CmpI
)
{
Node
*
phi
=
countedloop_phi_from_cmp
((
CmpINode
*
)
use
,
n
);
if
(
phi
!=
NULL
)
{
// If an opaque node feeds into the limit condition of a
// CountedLoop, we need to process the Phi node for the
// induction variable when the opaque node is removed:
// the range of values taken by the Phi is now known and
// so its type is also known.
_worklist
.
push
(
phi
);
}
Node
*
in1
=
use
->
in
(
1
);
for
(
uint
i
=
0
;
i
<
in1
->
outcnt
();
i
++
)
{
if
(
in1
->
raw_out
(
i
)
->
Opcode
()
==
Op_CastII
)
{
...
...
@@ -1659,6 +1678,15 @@ void PhaseCCP::analyze() {
}
}
}
// If n is used in a counted loop exit condition then the type
// of the counted loop's Phi depends on the type of n. See
// PhiNode::Value().
if
(
m_op
==
Op_CmpI
)
{
PhiNode
*
phi
=
countedloop_phi_from_cmp
((
CmpINode
*
)
m
,
n
);
if
(
phi
!=
NULL
)
{
worklist
.
push
(
phi
);
}
}
}
}
}
...
...
src/share/vm/opto/phaseX.hpp
浏览文件 @
064d51d6
/*
* Copyright (c) 1997, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
7
, 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
...
...
@@ -417,7 +417,7 @@ public:
// Phase for iteratively performing local, pessimistic GVN-style optimizations.
// and ideal transformations on the graph.
class
PhaseIterGVN
:
public
PhaseGVN
{
private:
private:
bool
_delay_transform
;
// When true simply register the node when calling transform
// instead of actually optimizing it
...
...
src/share/vm/runtime/arguments.cpp
浏览文件 @
064d51d6
...
...
@@ -4156,6 +4156,11 @@ jint Arguments::apply_ergo() {
warning
(
"Setting CompressedClassSpaceSize has no effect when compressed class pointers are not used"
);
}
if
(
UseOnStackReplacement
&&
!
UseLoopCounter
)
{
warning
(
"On-stack-replacement requires loop counters; enabling loop counters"
);
FLAG_SET_DEFAULT
(
UseLoopCounter
,
true
);
}
#ifndef PRODUCT
if
(
CompileTheWorld
)
{
// Force NmethodSweeper to sweep whole CodeCache each time.
...
...
test/compiler/loopopts/TestImpossibleIV.java
0 → 100644
浏览文件 @
064d51d6
/*
* Copyright 2016 Google, Inc. 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.
*/
/*
* @test
* @bug 8166742
* @summary C2 IV elimination throws FPE
* @run main/othervm -XX:-TieredCompilation -XX:-BackgroundCompilation TestImpossibleIV
* @author Chuck Rasbold rasbold@google.com
*/
/*
* Use -XX:-TieredCompilation to get C2 only.
* Use -XX:-BackgroundCompilation to wait for compilation before test exit.
*/
public
class
TestImpossibleIV
{
static
private
void
testMethod
()
{
int
sum
=
0
;
// A unit count-down loop which has an induction variable with
// MIN_VALUE stride.
for
(
int
i
=
100000
;
i
>=
0
;
i
--)
{
sum
+=
Integer
.
MIN_VALUE
;
}
}
public
static
void
main
(
String
[]
args
)
{
testMethod
();
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录