Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
b7d3c341
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看板
提交
b7d3c341
编写于
12月 18, 2010
作者:
T
twisti
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
c42cdb52
83e07231
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
72 addition
and
1 deletion
+72
-1
src/share/vm/c1/c1_LinearScan.cpp
src/share/vm/c1/c1_LinearScan.cpp
+22
-1
src/share/vm/c1/c1_LinearScan.hpp
src/share/vm/c1/c1_LinearScan.hpp
+1
-0
test/compiler/6579789/Test6579789.java
test/compiler/6579789/Test6579789.java
+49
-0
未找到文件。
src/share/vm/c1/c1_LinearScan.cpp
浏览文件 @
b7d3c341
...
@@ -90,6 +90,7 @@ LinearScan::LinearScan(IR* ir, LIRGenerator* gen, FrameMap* frame_map)
...
@@ -90,6 +90,7 @@ LinearScan::LinearScan(IR* ir, LIRGenerator* gen, FrameMap* frame_map)
,
_intervals
(
0
)
// initialized later with correct length
,
_intervals
(
0
)
// initialized later with correct length
,
_new_intervals_from_allocation
(
new
IntervalList
())
,
_new_intervals_from_allocation
(
new
IntervalList
())
,
_sorted_intervals
(
NULL
)
,
_sorted_intervals
(
NULL
)
,
_needs_full_resort
(
false
)
,
_lir_ops
(
0
)
// initialized later with correct length
,
_lir_ops
(
0
)
// initialized later with correct length
,
_block_of_op
(
0
)
// initialized later with correct length
,
_block_of_op
(
0
)
// initialized later with correct length
,
_has_info
(
0
)
,
_has_info
(
0
)
...
@@ -1520,6 +1521,14 @@ void LinearScan::create_unhandled_lists(Interval** list1, Interval** list2, bool
...
@@ -1520,6 +1521,14 @@ void LinearScan::create_unhandled_lists(Interval** list1, Interval** list2, bool
void
LinearScan
::
sort_intervals_before_allocation
()
{
void
LinearScan
::
sort_intervals_before_allocation
()
{
TIME_LINEAR_SCAN
(
timer_sort_intervals_before
);
TIME_LINEAR_SCAN
(
timer_sort_intervals_before
);
if
(
_needs_full_resort
)
{
// There is no known reason why this should occur but just in case...
assert
(
false
,
"should never occur"
);
// Re-sort existing interval list because an Interval::from() has changed
_sorted_intervals
->
sort
(
interval_cmp
);
_needs_full_resort
=
false
;
}
IntervalList
*
unsorted_list
=
&
_intervals
;
IntervalList
*
unsorted_list
=
&
_intervals
;
int
unsorted_len
=
unsorted_list
->
length
();
int
unsorted_len
=
unsorted_list
->
length
();
int
sorted_len
=
0
;
int
sorted_len
=
0
;
...
@@ -1559,11 +1568,18 @@ void LinearScan::sort_intervals_before_allocation() {
...
@@ -1559,11 +1568,18 @@ void LinearScan::sort_intervals_before_allocation() {
}
}
}
}
_sorted_intervals
=
sorted_list
;
_sorted_intervals
=
sorted_list
;
assert
(
is_sorted
(
_sorted_intervals
),
"intervals unsorted"
);
}
}
void
LinearScan
::
sort_intervals_after_allocation
()
{
void
LinearScan
::
sort_intervals_after_allocation
()
{
TIME_LINEAR_SCAN
(
timer_sort_intervals_after
);
TIME_LINEAR_SCAN
(
timer_sort_intervals_after
);
if
(
_needs_full_resort
)
{
// Re-sort existing interval list because an Interval::from() has changed
_sorted_intervals
->
sort
(
interval_cmp
);
_needs_full_resort
=
false
;
}
IntervalArray
*
old_list
=
_sorted_intervals
;
IntervalArray
*
old_list
=
_sorted_intervals
;
IntervalList
*
new_list
=
_new_intervals_from_allocation
;
IntervalList
*
new_list
=
_new_intervals_from_allocation
;
int
old_len
=
old_list
->
length
();
int
old_len
=
old_list
->
length
();
...
@@ -1571,6 +1587,7 @@ void LinearScan::sort_intervals_after_allocation() {
...
@@ -1571,6 +1587,7 @@ void LinearScan::sort_intervals_after_allocation() {
if
(
new_len
==
0
)
{
if
(
new_len
==
0
)
{
// no intervals have been added during allocation, so sorted list is already up to date
// no intervals have been added during allocation, so sorted list is already up to date
assert
(
is_sorted
(
_sorted_intervals
),
"intervals unsorted"
);
return
;
return
;
}
}
...
@@ -1593,6 +1610,7 @@ void LinearScan::sort_intervals_after_allocation() {
...
@@ -1593,6 +1610,7 @@ void LinearScan::sort_intervals_after_allocation() {
}
}
_sorted_intervals
=
combined_list
;
_sorted_intervals
=
combined_list
;
assert
(
is_sorted
(
_sorted_intervals
),
"intervals unsorted"
);
}
}
...
@@ -1825,6 +1843,8 @@ void LinearScan::resolve_exception_entry(BlockBegin* block, int reg_num, MoveRes
...
@@ -1825,6 +1843,8 @@ void LinearScan::resolve_exception_entry(BlockBegin* block, int reg_num, MoveRes
interval
=
interval
->
split
(
from_op_id
);
interval
=
interval
->
split
(
from_op_id
);
interval
->
assign_reg
(
reg
,
regHi
);
interval
->
assign_reg
(
reg
,
regHi
);
append_interval
(
interval
);
append_interval
(
interval
);
}
else
{
_needs_full_resort
=
true
;
}
}
assert
(
interval
->
from
()
==
from_op_id
,
"must be true now"
);
assert
(
interval
->
from
()
==
from_op_id
,
"must be true now"
);
...
@@ -4492,7 +4512,8 @@ void Interval::print(outputStream* out) const {
...
@@ -4492,7 +4512,8 @@ void Interval::print(outputStream* out) const {
}
}
}
else
{
}
else
{
type_name
=
type2name
(
type
());
type_name
=
type2name
(
type
());
if
(
assigned_reg
()
!=
-
1
)
{
if
(
assigned_reg
()
!=
-
1
&&
(
LinearScan
::
num_physical_regs
(
type
())
==
1
||
assigned_regHi
()
!=
-
1
))
{
opr
=
LinearScan
::
calc_operand_for_interval
(
this
);
opr
=
LinearScan
::
calc_operand_for_interval
(
this
);
}
}
}
}
...
...
src/share/vm/c1/c1_LinearScan.hpp
浏览文件 @
b7d3c341
...
@@ -148,6 +148,7 @@ class LinearScan : public CompilationResourceObj {
...
@@ -148,6 +148,7 @@ class LinearScan : public CompilationResourceObj {
IntervalList
_intervals
;
// mapping from register number to interval
IntervalList
_intervals
;
// mapping from register number to interval
IntervalList
*
_new_intervals_from_allocation
;
// list with all intervals created during allocation when an existing interval is split
IntervalList
*
_new_intervals_from_allocation
;
// list with all intervals created during allocation when an existing interval is split
IntervalArray
*
_sorted_intervals
;
// intervals sorted by Interval::from()
IntervalArray
*
_sorted_intervals
;
// intervals sorted by Interval::from()
bool
_needs_full_resort
;
// set to true if an Interval::from() is changed and _sorted_intervals must be resorted
LIR_OpArray
_lir_ops
;
// mapping from LIR_Op id to LIR_Op node
LIR_OpArray
_lir_ops
;
// mapping from LIR_Op id to LIR_Op node
BlockBeginArray
_block_of_op
;
// mapping from LIR_Op id to the BlockBegin containing this instruction
BlockBeginArray
_block_of_op
;
// mapping from LIR_Op id to the BlockBegin containing this instruction
...
...
test/compiler/6579789/Test6579789.java
0 → 100644
浏览文件 @
b7d3c341
/*
* Copyright (c) 2010, 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.
*
*/
/**
* @test
* @bug 6579789
* @summary Internal error "c1_LinearScan.cpp:1429 Error: assert(false,"")" in debuggee with fastdebug VM
* @run main/othervm -Xcomp -XX:UseSSE=0 -XX:CompileOnly=Test6579789.bug Test6579789
*/
public
class
Test6579789
{
public
static
void
main
(
String
[]
args
)
{
bug
(
4
);
}
public
static
void
bug
(
int
n
)
{
float
f
=
1
;
int
i
=
1
;
try
{
int
x
=
1
/
n
;
// instruction that can trap
f
=
2
;
i
=
2
;
int
y
=
2
/
n
;
// instruction that can trap
}
catch
(
Exception
ex
)
{
f
++;
i
++;
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录