Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
12e10e67
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看板
提交
12e10e67
编写于
7月 07, 2009
作者:
K
kvn
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
ebdea31c
1e8e3953
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
253 addition
and
191 deletion
+253
-191
agent/src/share/classes/sun/jvm/hotspot/ui/tree/OopTreeNodeAdapter.java
...e/classes/sun/jvm/hotspot/ui/tree/OopTreeNodeAdapter.java
+2
-0
make/solaris/makefiles/optimized.make
make/solaris/makefiles/optimized.make
+1
-1
src/share/vm/opto/block.cpp
src/share/vm/opto/block.cpp
+3
-0
src/share/vm/opto/block.hpp
src/share/vm/opto/block.hpp
+4
-0
src/share/vm/opto/buildOopMap.cpp
src/share/vm/opto/buildOopMap.cpp
+17
-8
src/share/vm/opto/gcm.cpp
src/share/vm/opto/gcm.cpp
+3
-0
src/share/vm/opto/library_call.cpp
src/share/vm/opto/library_call.cpp
+160
-176
src/share/vm/opto/loopopts.cpp
src/share/vm/opto/loopopts.cpp
+8
-6
test/compiler/6855164/Test.java
test/compiler/6855164/Test.java
+55
-0
未找到文件。
agent/src/share/classes/sun/jvm/hotspot/ui/tree/OopTreeNodeAdapter.java
浏览文件 @
12e10e67
...
@@ -161,6 +161,8 @@ public class OopTreeNodeAdapter extends FieldTreeNodeAdapter {
...
@@ -161,6 +161,8 @@ public class OopTreeNodeAdapter extends FieldTreeNodeAdapter {
child
=
new
OopTreeNodeAdapter
(
field
.
getValue
(
getObj
()),
field
.
getID
(),
getTreeTableMode
());
child
=
new
OopTreeNodeAdapter
(
field
.
getValue
(
getObj
()),
field
.
getID
(),
getTreeTableMode
());
}
catch
(
AddressException
e
)
{
}
catch
(
AddressException
e
)
{
child
=
new
BadOopTreeNodeAdapter
(
field
.
getValueAsOopHandle
(
getObj
()),
field
.
getID
(),
getTreeTableMode
());
child
=
new
BadOopTreeNodeAdapter
(
field
.
getValueAsOopHandle
(
getObj
()),
field
.
getID
(),
getTreeTableMode
());
}
catch
(
UnknownOopException
e
)
{
child
=
new
BadOopTreeNodeAdapter
(
field
.
getValueAsOopHandle
(
getObj
()),
field
.
getID
(),
getTreeTableMode
());
}
}
}
}
++
curField
;
++
curField
;
...
...
make/solaris/makefiles/optimized.make
浏览文件 @
12e10e67
...
@@ -41,7 +41,7 @@ ifeq ($(COMPILER_REV_NUMERIC),509)
...
@@ -41,7 +41,7 @@ ifeq ($(COMPILER_REV_NUMERIC),509)
endif
endif
# Workaround SS11 bug 6345274 (all platforms) (Fixed in SS11 patch and SS12)
# Workaround SS11 bug 6345274 (all platforms) (Fixed in SS11 patch and SS12)
ifeq
($(COMPILER_REV_NUMERIC),508)
)
ifeq
($(COMPILER_REV_NUMERIC),508)
OPT_CFLAGS/
ciTypeFlow.o
=
$
(
OPT_CFLAGS/O2
)
OPT_CFLAGS/
ciTypeFlow.o
=
$
(
OPT_CFLAGS/O2
)
endif
# COMPILER_REV_NUMERIC == 508
endif
# COMPILER_REV_NUMERIC == 508
...
...
src/share/vm/opto/block.cpp
浏览文件 @
12e10e67
...
@@ -357,6 +357,9 @@ PhaseCFG::PhaseCFG( Arena *a, RootNode *r, Matcher &m ) :
...
@@ -357,6 +357,9 @@ PhaseCFG::PhaseCFG( Arena *a, RootNode *r, Matcher &m ) :
#ifndef PRODUCT
#ifndef PRODUCT
,
_trace_opto_pipelining
(
TraceOptoPipelining
||
C
->
method_has_option
(
"TraceOptoPipelining"
))
,
_trace_opto_pipelining
(
TraceOptoPipelining
||
C
->
method_has_option
(
"TraceOptoPipelining"
))
#endif
#endif
#ifdef ASSERT
,
_raw_oops
(
a
)
#endif
{
{
ResourceMark
rm
;
ResourceMark
rm
;
// I'll need a few machine-specific GotoNodes. Make an Ideal GotoNode,
// I'll need a few machine-specific GotoNodes. Make an Ideal GotoNode,
...
...
src/share/vm/opto/block.hpp
浏览文件 @
12e10e67
...
@@ -380,6 +380,10 @@ class PhaseCFG : public Phase {
...
@@ -380,6 +380,10 @@ class PhaseCFG : public Phase {
bool
_trace_opto_pipelining
;
// tracing flag
bool
_trace_opto_pipelining
;
// tracing flag
#endif
#endif
#ifdef ASSERT
Unique_Node_List
_raw_oops
;
#endif
// Build dominators
// Build dominators
void
Dominators
();
void
Dominators
();
...
...
src/share/vm/opto/buildOopMap.cpp
浏览文件 @
12e10e67
...
@@ -74,9 +74,11 @@ struct OopFlow : public ResourceObj {
...
@@ -74,9 +74,11 @@ struct OopFlow : public ResourceObj {
// this block.
// this block.
Block
*
_b
;
// Block for this struct
Block
*
_b
;
// Block for this struct
OopFlow
*
_next
;
// Next free OopFlow
OopFlow
*
_next
;
// Next free OopFlow
// or NULL if dead/conflict
Compile
*
C
;
OopFlow
(
short
*
callees
,
Node
**
defs
)
:
_callees
(
callees
),
_defs
(
defs
),
OopFlow
(
short
*
callees
,
Node
**
defs
,
Compile
*
c
)
:
_callees
(
callees
),
_defs
(
defs
),
_b
(
NULL
),
_next
(
NULL
)
{
}
_b
(
NULL
),
_next
(
NULL
)
,
C
(
c
)
{
}
// Given reaching-defs for this block start, compute it for this block end
// Given reaching-defs for this block start, compute it for this block end
void
compute_reach
(
PhaseRegAlloc
*
regalloc
,
int
max_reg
,
Dict
*
safehash
);
void
compute_reach
(
PhaseRegAlloc
*
regalloc
,
int
max_reg
,
Dict
*
safehash
);
...
@@ -88,7 +90,7 @@ struct OopFlow : public ResourceObj {
...
@@ -88,7 +90,7 @@ struct OopFlow : public ResourceObj {
void
clone
(
OopFlow
*
flow
,
int
max_size
);
void
clone
(
OopFlow
*
flow
,
int
max_size
);
// Make a new OopFlow from scratch
// Make a new OopFlow from scratch
static
OopFlow
*
make
(
Arena
*
A
,
int
max_size
);
static
OopFlow
*
make
(
Arena
*
A
,
int
max_size
,
Compile
*
C
);
// Build an oopmap from the current flow info
// Build an oopmap from the current flow info
OopMap
*
build_oop_map
(
Node
*
n
,
int
max_reg
,
PhaseRegAlloc
*
regalloc
,
int
*
live
);
OopMap
*
build_oop_map
(
Node
*
n
,
int
max_reg
,
PhaseRegAlloc
*
regalloc
,
int
*
live
);
...
@@ -180,11 +182,11 @@ void OopFlow::clone( OopFlow *flow, int max_size ) {
...
@@ -180,11 +182,11 @@ void OopFlow::clone( OopFlow *flow, int max_size ) {
}
}
//------------------------------make-------------------------------------------
//------------------------------make-------------------------------------------
OopFlow
*
OopFlow
::
make
(
Arena
*
A
,
int
max_size
)
{
OopFlow
*
OopFlow
::
make
(
Arena
*
A
,
int
max_size
,
Compile
*
C
)
{
short
*
callees
=
NEW_ARENA_ARRAY
(
A
,
short
,
max_size
+
1
);
short
*
callees
=
NEW_ARENA_ARRAY
(
A
,
short
,
max_size
+
1
);
Node
**
defs
=
NEW_ARENA_ARRAY
(
A
,
Node
*
,
max_size
+
1
);
Node
**
defs
=
NEW_ARENA_ARRAY
(
A
,
Node
*
,
max_size
+
1
);
debug_only
(
memset
(
defs
,
0
,(
max_size
+
1
)
*
sizeof
(
Node
*
))
);
debug_only
(
memset
(
defs
,
0
,(
max_size
+
1
)
*
sizeof
(
Node
*
))
);
OopFlow
*
flow
=
new
(
A
)
OopFlow
(
callees
+
1
,
defs
+
1
);
OopFlow
*
flow
=
new
(
A
)
OopFlow
(
callees
+
1
,
defs
+
1
,
C
);
assert
(
&
flow
->
_callees
[
OptoReg
::
Bad
]
==
callees
,
"Ok to index at OptoReg::Bad"
);
assert
(
&
flow
->
_callees
[
OptoReg
::
Bad
]
==
callees
,
"Ok to index at OptoReg::Bad"
);
assert
(
&
flow
->
_defs
[
OptoReg
::
Bad
]
==
defs
,
"Ok to index at OptoReg::Bad"
);
assert
(
&
flow
->
_defs
[
OptoReg
::
Bad
]
==
defs
,
"Ok to index at OptoReg::Bad"
);
return
flow
;
return
flow
;
...
@@ -288,7 +290,7 @@ OopMap *OopFlow::build_oop_map( Node *n, int max_reg, PhaseRegAlloc *regalloc, i
...
@@ -288,7 +290,7 @@ OopMap *OopFlow::build_oop_map( Node *n, int max_reg, PhaseRegAlloc *regalloc, i
m
=
m
->
in
(
idx
);
m
=
m
->
in
(
idx
);
}
}
}
}
guarantee
(
0
,
"must find derived/base pair"
);
guarantee
(
0
,
"must find derived/base pair"
);
}
}
found:
;
found:
;
Node
*
base
=
n
->
in
(
i
+
1
);
// Base is other half of pair
Node
*
base
=
n
->
in
(
i
+
1
);
// Base is other half of pair
...
@@ -347,6 +349,13 @@ OopMap *OopFlow::build_oop_map( Node *n, int max_reg, PhaseRegAlloc *regalloc, i
...
@@ -347,6 +349,13 @@ OopMap *OopFlow::build_oop_map( Node *n, int max_reg, PhaseRegAlloc *regalloc, i
}
else
{
}
else
{
// Other - some reaching non-oop value
// Other - some reaching non-oop value
omap
->
set_value
(
r
);
omap
->
set_value
(
r
);
#ifdef ASSERT
if
(
t
->
isa_rawptr
()
&&
C
->
cfg
()
->
_raw_oops
.
member
(
def
)
)
{
def
->
dump
();
n
->
dump
();
assert
(
false
,
"there should be a oop in OopMap instead of a live raw oop at safepoint"
);
}
#endif
}
}
}
}
...
@@ -562,7 +571,7 @@ void Compile::BuildOopMaps() {
...
@@ -562,7 +571,7 @@ void Compile::BuildOopMaps() {
// Do the first block 'by hand' to prime the worklist
// Do the first block 'by hand' to prime the worklist
Block
*
entry
=
_cfg
->
_blocks
[
1
];
Block
*
entry
=
_cfg
->
_blocks
[
1
];
OopFlow
*
rootflow
=
OopFlow
::
make
(
A
,
max_reg
);
OopFlow
*
rootflow
=
OopFlow
::
make
(
A
,
max_reg
,
this
);
// Initialize to 'bottom' (not 'top')
// Initialize to 'bottom' (not 'top')
memset
(
rootflow
->
_callees
,
OptoReg
::
Bad
,
max_reg
*
sizeof
(
short
)
);
memset
(
rootflow
->
_callees
,
OptoReg
::
Bad
,
max_reg
*
sizeof
(
short
)
);
memset
(
rootflow
->
_defs
,
0
,
max_reg
*
sizeof
(
Node
*
)
);
memset
(
rootflow
->
_defs
,
0
,
max_reg
*
sizeof
(
Node
*
)
);
...
@@ -628,7 +637,7 @@ void Compile::BuildOopMaps() {
...
@@ -628,7 +637,7 @@ void Compile::BuildOopMaps() {
// Carry it forward.
// Carry it forward.
}
else
{
// Draw a new OopFlow from the freelist
}
else
{
// Draw a new OopFlow from the freelist
if
(
!
free_list
)
if
(
!
free_list
)
free_list
=
OopFlow
::
make
(
A
,
max_reg
);
free_list
=
OopFlow
::
make
(
A
,
max_reg
,
C
);
flow
=
free_list
;
flow
=
free_list
;
assert
(
flow
->
_b
==
NULL
,
"oopFlow is not free"
);
assert
(
flow
->
_b
==
NULL
,
"oopFlow is not free"
);
free_list
=
flow
->
_next
;
free_list
=
flow
->
_next
;
...
...
src/share/vm/opto/gcm.cpp
浏览文件 @
12e10e67
...
@@ -1130,6 +1130,9 @@ void PhaseCFG::schedule_late(VectorSet &visited, Node_List &stack) {
...
@@ -1130,6 +1130,9 @@ void PhaseCFG::schedule_late(VectorSet &visited, Node_List &stack) {
Node
*
def
=
self
->
in
(
1
);
Node
*
def
=
self
->
in
(
1
);
if
(
def
!=
NULL
&&
def
->
bottom_type
()
->
base
()
==
Type
::
RawPtr
)
{
if
(
def
!=
NULL
&&
def
->
bottom_type
()
->
base
()
==
Type
::
RawPtr
)
{
early
->
add_inst
(
self
);
early
->
add_inst
(
self
);
#ifdef ASSERT
_raw_oops
.
push
(
def
);
#endif
continue
;
continue
;
}
}
break
;
break
;
...
...
src/share/vm/opto/library_call.cpp
浏览文件 @
12e10e67
此差异已折叠。
点击以展开。
src/share/vm/opto/loopopts.cpp
浏览文件 @
12e10e67
...
@@ -667,7 +667,6 @@ static bool merge_point_too_heavy(Compile* C, Node* region) {
...
@@ -667,7 +667,6 @@ static bool merge_point_too_heavy(Compile* C, Node* region) {
}
}
}
}
#ifdef _LP64
static
bool
merge_point_safe
(
Node
*
region
)
{
static
bool
merge_point_safe
(
Node
*
region
)
{
// 4799512: Stop split_if_with_blocks from splitting a block with a ConvI2LNode
// 4799512: Stop split_if_with_blocks from splitting a block with a ConvI2LNode
// having a PhiNode input. This sidesteps the dangerous case where the split
// having a PhiNode input. This sidesteps the dangerous case where the split
...
@@ -676,20 +675,25 @@ static bool merge_point_safe(Node* region) {
...
@@ -676,20 +675,25 @@ static bool merge_point_safe(Node* region) {
// uses.
// uses.
// A better fix for this problem can be found in the BugTraq entry, but
// A better fix for this problem can be found in the BugTraq entry, but
// expediency for Mantis demands this hack.
// expediency for Mantis demands this hack.
// 6855164: If the merge point has a FastLockNode with a PhiNode input, we stop
// split_if_with_blocks from splitting a block because we could not move around
// the FastLockNode.
for
(
DUIterator_Fast
imax
,
i
=
region
->
fast_outs
(
imax
);
i
<
imax
;
i
++
)
{
for
(
DUIterator_Fast
imax
,
i
=
region
->
fast_outs
(
imax
);
i
<
imax
;
i
++
)
{
Node
*
n
=
region
->
fast_out
(
i
);
Node
*
n
=
region
->
fast_out
(
i
);
if
(
n
->
is_Phi
())
{
if
(
n
->
is_Phi
())
{
for
(
DUIterator_Fast
jmax
,
j
=
n
->
fast_outs
(
jmax
);
j
<
jmax
;
j
++
)
{
for
(
DUIterator_Fast
jmax
,
j
=
n
->
fast_outs
(
jmax
);
j
<
jmax
;
j
++
)
{
Node
*
m
=
n
->
fast_out
(
j
);
Node
*
m
=
n
->
fast_out
(
j
);
if
(
m
->
Opcode
()
==
Op_ConvI2L
)
{
if
(
m
->
is_FastLock
())
return
false
;
return
false
;
}
#ifdef _LP64
if
(
m
->
Opcode
()
==
Op_ConvI2L
)
return
false
;
#endif
}
}
}
}
}
}
return
true
;
return
true
;
}
}
#endif
//------------------------------place_near_use---------------------------------
//------------------------------place_near_use---------------------------------
...
@@ -771,12 +775,10 @@ void PhaseIdealLoop::split_if_with_blocks_post( Node *n ) {
...
@@ -771,12 +775,10 @@ void PhaseIdealLoop::split_if_with_blocks_post( Node *n ) {
if
(
get_loop
(
n_ctrl
->
in
(
j
))
!=
n_loop
)
if
(
get_loop
(
n_ctrl
->
in
(
j
))
!=
n_loop
)
return
;
return
;
#ifdef _LP64
// Check for safety of the merge point.
// Check for safety of the merge point.
if
(
!
merge_point_safe
(
n_ctrl
)
)
{
if
(
!
merge_point_safe
(
n_ctrl
)
)
{
return
;
return
;
}
}
#endif
// Split compare 'n' through the merge point if it is profitable
// Split compare 'n' through the merge point if it is profitable
Node
*
phi
=
split_thru_phi
(
n
,
n_ctrl
,
policy
);
Node
*
phi
=
split_thru_phi
(
n
,
n_ctrl
,
policy
);
...
...
test/compiler/6855164/Test.java
0 → 100644
浏览文件 @
12e10e67
/*
* Copyright 2009 Sun Microsystems, 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
/*
* @test
* @bug 6855164
* @summary SIGSEGV during compilation of method involving loop over CharSequence
* @run main/othervm -Xbatch Test
*/
public
class
Test
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
StringBuffer
builder
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
100
;
i
++)
builder
.
append
(
"I am the very model of a modern major general\n"
);
for
(
int
j
=
0
;
j
<
builder
.
length
();
j
++){
previousSpaceIndex
(
builder
,
j
);
}
}
private
static
final
int
previousSpaceIndex
(
CharSequence
sb
,
int
seek
)
{
seek
--;
while
(
seek
>
0
)
{
if
(
sb
.
charAt
(
seek
)
==
' '
)
{
while
(
seek
>
0
&&
sb
.
charAt
(
seek
-
1
)
==
' '
)
seek
--;
return
seek
;
}
seek
--;
}
return
0
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录