Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
7e1332b2
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看板
提交
7e1332b2
编写于
1月 21, 2011
作者:
N
never
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
a6dcefda
92b1c17c
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
104 addition
and
11 deletion
+104
-11
src/share/vm/c1/c1_Canonicalizer.cpp
src/share/vm/c1/c1_Canonicalizer.cpp
+2
-2
src/share/vm/c1/c1_Canonicalizer.hpp
src/share/vm/c1/c1_Canonicalizer.hpp
+2
-1
src/share/vm/c1/c1_GraphBuilder.cpp
src/share/vm/c1/c1_GraphBuilder.cpp
+19
-0
src/share/vm/c1/c1_Instruction.hpp
src/share/vm/c1/c1_Instruction.hpp
+35
-1
src/share/vm/c1/c1_InstructionPrinter.cpp
src/share/vm/c1/c1_InstructionPrinter.cpp
+10
-1
src/share/vm/c1/c1_InstructionPrinter.hpp
src/share/vm/c1/c1_InstructionPrinter.hpp
+2
-1
src/share/vm/c1/c1_LIRGenerator.cpp
src/share/vm/c1/c1_LIRGenerator.cpp
+26
-1
src/share/vm/c1/c1_LIRGenerator.hpp
src/share/vm/c1/c1_LIRGenerator.hpp
+2
-1
src/share/vm/c1/c1_Optimizer.cpp
src/share/vm/c1/c1_Optimizer.cpp
+3
-1
src/share/vm/c1/c1_ValueMap.hpp
src/share/vm/c1/c1_ValueMap.hpp
+3
-2
未找到文件。
src/share/vm/c1/c1_Canonicalizer.cpp
浏览文件 @
7e1332b2
/*
* Copyright (c) 1999, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
1
, 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
...
...
@@ -898,4 +898,4 @@ void Canonicalizer::do_UnsafePrefetchRead (UnsafePrefetchRead* x) {}
void
Canonicalizer
::
do_UnsafePrefetchWrite
(
UnsafePrefetchWrite
*
x
)
{}
void
Canonicalizer
::
do_ProfileCall
(
ProfileCall
*
x
)
{}
void
Canonicalizer
::
do_ProfileInvoke
(
ProfileInvoke
*
x
)
{}
void
Canonicalizer
::
do_RuntimeCall
(
RuntimeCall
*
x
)
{}
src/share/vm/c1/c1_Canonicalizer.hpp
浏览文件 @
7e1332b2
/*
* Copyright (c) 1999, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
1
, 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
...
...
@@ -102,6 +102,7 @@ class Canonicalizer: InstructionVisitor {
virtual
void
do_UnsafePrefetchWrite
(
UnsafePrefetchWrite
*
x
);
virtual
void
do_ProfileCall
(
ProfileCall
*
x
);
virtual
void
do_ProfileInvoke
(
ProfileInvoke
*
x
);
virtual
void
do_RuntimeCall
(
RuntimeCall
*
x
);
};
#endif // SHARE_VM_C1_C1_CANONICALIZER_HPP
src/share/vm/c1/c1_GraphBuilder.cpp
浏览文件 @
7e1332b2
...
...
@@ -1396,6 +1396,13 @@ void GraphBuilder::method_return(Value x) {
if
(
continuation
()
!=
NULL
)
{
assert
(
!
method
()
->
is_synchronized
()
||
InlineSynchronizedMethods
,
"can not inline synchronized methods yet"
);
if
(
compilation
()
->
env
()
->
dtrace_method_probes
())
{
// Report exit from inline methods
Values
*
args
=
new
Values
(
1
);
args
->
push
(
append
(
new
Constant
(
new
ObjectConstant
(
method
()))));
append
(
new
RuntimeCall
(
voidType
,
"dtrace_method_exit"
,
CAST_FROM_FN_PTR
(
address
,
SharedRuntime
::
dtrace_method_exit
),
args
));
}
// If the inlined method is synchronized, the monitor must be
// released before we jump to the continuation block.
if
(
method
()
->
is_synchronized
())
{
...
...
@@ -3301,6 +3308,13 @@ void GraphBuilder::fill_sync_handler(Value lock, BlockBegin* sync_handler, bool
Value
exception
=
append_with_bci
(
new
ExceptionObject
(),
SynchronizationEntryBCI
);
assert
(
exception
->
is_pinned
(),
"must be"
);
if
(
compilation
()
->
env
()
->
dtrace_method_probes
())
{
// Report exit from inline methods
Values
*
args
=
new
Values
(
1
);
args
->
push
(
append
(
new
Constant
(
new
ObjectConstant
(
method
()))));
append
(
new
RuntimeCall
(
voidType
,
"dtrace_method_exit"
,
CAST_FROM_FN_PTR
(
address
,
SharedRuntime
::
dtrace_method_exit
),
args
));
}
int
bci
=
SynchronizationEntryBCI
;
if
(
lock
)
{
assert
(
state
()
->
locks_size
()
>
0
&&
state
()
->
lock_at
(
state
()
->
locks_size
()
-
1
)
==
lock
,
"lock is missing"
);
...
...
@@ -3486,6 +3500,11 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known) {
inline_sync_entry
(
lock
,
sync_handler
);
}
if
(
compilation
()
->
env
()
->
dtrace_method_probes
())
{
Values
*
args
=
new
Values
(
1
);
args
->
push
(
append
(
new
Constant
(
new
ObjectConstant
(
method
()))));
append
(
new
RuntimeCall
(
voidType
,
"dtrace_method_entry"
,
CAST_FROM_FN_PTR
(
address
,
SharedRuntime
::
dtrace_method_entry
),
args
));
}
BlockBegin
*
callee_start_block
=
block_at
(
0
);
if
(
callee_start_block
!=
NULL
)
{
...
...
src/share/vm/c1/c1_Instruction.hpp
浏览文件 @
7e1332b2
/*
* Copyright (c) 1999, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
1
, 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
...
...
@@ -106,6 +106,7 @@ class UnsafePrefetchRead;
class
UnsafePrefetchWrite
;
class
ProfileCall
;
class
ProfileInvoke
;
class
RuntimeCall
;
// A Value is a reference to the instruction creating the value
typedef
Instruction
*
Value
;
...
...
@@ -202,6 +203,7 @@ class InstructionVisitor: public StackObj {
virtual
void
do_UnsafePrefetchWrite
(
UnsafePrefetchWrite
*
x
)
=
0
;
virtual
void
do_ProfileCall
(
ProfileCall
*
x
)
=
0
;
virtual
void
do_ProfileInvoke
(
ProfileInvoke
*
x
)
=
0
;
virtual
void
do_RuntimeCall
(
RuntimeCall
*
x
)
=
0
;
};
...
...
@@ -2267,6 +2269,38 @@ LEAF(ProfileCall, Instruction)
virtual
void
input_values_do
(
ValueVisitor
*
f
)
{
if
(
_recv
!=
NULL
)
f
->
visit
(
&
_recv
);
}
}
;
// Call some C runtime function that doesn't safepoint,
// optionally passing the current thread as the first argument.
LEAF
(
RuntimeCall
,
Instruction
)
private
:
const
char
*
_entry_name
;
address
_entry
;
Values
*
_args
;
bool
_pass_thread
;
// Pass the JavaThread* as an implicit first argument
public
:
RuntimeCall
(
ValueType
*
type
,
const
char
*
entry_name
,
address
entry
,
Values
*
args
,
bool
pass_thread
=
true
)
:
Instruction
(
type
)
,
_entry
(
entry
)
,
_args
(
args
)
,
_entry_name
(
entry_name
)
,
_pass_thread
(
pass_thread
)
{
ASSERT_VALUES
pin
();
}
const
char
*
entry_name
()
const
{
return
_entry_name
;
}
address
entry
()
const
{
return
_entry
;
}
int
number_of_arguments
()
const
{
return
_args
->
length
();
}
Value
argument_at
(
int
i
)
const
{
return
_args
->
at
(
i
);
}
bool
pass_thread
()
const
{
return
_pass_thread
;
}
virtual
void
input_values_do
(
ValueVisitor
*
f
)
{
for
(
int
i
=
0
;
i
<
_args
->
length
();
i
++
)
f
->
visit
(
_args
->
adr_at
(
i
));
}
}
;
// Use to trip invocation counter of an inlined method
LEAF
(
ProfileInvoke
,
Instruction
)
...
...
src/share/vm/c1/c1_InstructionPrinter.cpp
浏览文件 @
7e1332b2
/*
* Copyright (c) 1999, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
1
, 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
...
...
@@ -841,4 +841,13 @@ void InstructionPrinter::do_ProfileInvoke(ProfileInvoke* x) {
}
void
InstructionPrinter
::
do_RuntimeCall
(
RuntimeCall
*
x
)
{
output
()
->
print
(
"call_rt %s("
,
x
->
entry_name
());
for
(
int
i
=
0
;
i
<
x
->
number_of_arguments
();
i
++
)
{
if
(
i
>
0
)
output
()
->
print
(
", "
);
print_value
(
x
->
argument_at
(
i
));
}
output
()
->
put
(
')'
);
}
#endif // PRODUCT
src/share/vm/c1/c1_InstructionPrinter.hpp
浏览文件 @
7e1332b2
/*
* Copyright (c) 1999, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
1
, 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
...
...
@@ -131,6 +131,7 @@ class InstructionPrinter: public InstructionVisitor {
virtual
void
do_UnsafePrefetchWrite
(
UnsafePrefetchWrite
*
x
);
virtual
void
do_ProfileCall
(
ProfileCall
*
x
);
virtual
void
do_ProfileInvoke
(
ProfileInvoke
*
x
);
virtual
void
do_RuntimeCall
(
RuntimeCall
*
x
);
};
#endif // PRODUCT
...
...
src/share/vm/c1/c1_LIRGenerator.cpp
浏览文件 @
7e1332b2
/*
* Copyright (c) 2005, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 201
1
, 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
...
...
@@ -2741,6 +2741,31 @@ void LIRGenerator::increment_event_counter_impl(CodeEmitInfo* info,
}
}
void
LIRGenerator
::
do_RuntimeCall
(
RuntimeCall
*
x
)
{
LIR_OprList
*
args
=
new
LIR_OprList
(
x
->
number_of_arguments
());
BasicTypeList
*
signature
=
new
BasicTypeList
(
x
->
number_of_arguments
());
if
(
x
->
pass_thread
())
{
signature
->
append
(
T_ADDRESS
);
args
->
append
(
getThreadPointer
());
}
for
(
int
i
=
0
;
i
<
x
->
number_of_arguments
();
i
++
)
{
Value
a
=
x
->
argument_at
(
i
);
LIRItem
*
item
=
new
LIRItem
(
a
,
this
);
item
->
load_item
();
args
->
append
(
item
->
result
());
signature
->
append
(
as_BasicType
(
a
->
type
()));
}
LIR_Opr
result
=
call_runtime
(
signature
,
args
,
x
->
entry
(),
x
->
type
(),
NULL
);
if
(
x
->
type
()
==
voidType
)
{
set_no_result
(
x
);
}
else
{
__
move
(
result
,
rlock_result
(
x
));
}
}
LIR_Opr
LIRGenerator
::
call_runtime
(
Value
arg1
,
address
entry
,
ValueType
*
result_type
,
CodeEmitInfo
*
info
)
{
LIRItemList
args
(
1
);
LIRItem
value
(
arg1
,
this
);
...
...
src/share/vm/c1/c1_LIRGenerator.hpp
浏览文件 @
7e1332b2
/*
* Copyright (c) 2005, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 201
1
, 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
...
...
@@ -522,6 +522,7 @@ class LIRGenerator: public InstructionVisitor, public BlockClosure {
virtual
void
do_UnsafePrefetchWrite
(
UnsafePrefetchWrite
*
x
);
virtual
void
do_ProfileCall
(
ProfileCall
*
x
);
virtual
void
do_ProfileInvoke
(
ProfileInvoke
*
x
);
virtual
void
do_RuntimeCall
(
RuntimeCall
*
x
);
};
...
...
src/share/vm/c1/c1_Optimizer.cpp
浏览文件 @
7e1332b2
/*
* Copyright (c) 1999, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
1
, 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
...
...
@@ -496,6 +496,7 @@ public:
void
do_UnsafePrefetchWrite
(
UnsafePrefetchWrite
*
x
);
void
do_ProfileCall
(
ProfileCall
*
x
);
void
do_ProfileInvoke
(
ProfileInvoke
*
x
);
void
do_RuntimeCall
(
RuntimeCall
*
x
);
};
...
...
@@ -664,6 +665,7 @@ void NullCheckVisitor::do_UnsafePrefetchRead (UnsafePrefetchRead* x) {}
void
NullCheckVisitor
::
do_UnsafePrefetchWrite
(
UnsafePrefetchWrite
*
x
)
{}
void
NullCheckVisitor
::
do_ProfileCall
(
ProfileCall
*
x
)
{
nce
()
->
clear_last_explicit_null_check
();
}
void
NullCheckVisitor
::
do_ProfileInvoke
(
ProfileInvoke
*
x
)
{}
void
NullCheckVisitor
::
do_RuntimeCall
(
RuntimeCall
*
x
)
{}
void
NullCheckEliminator
::
visit
(
Value
*
p
)
{
...
...
src/share/vm/c1/c1_ValueMap.hpp
浏览文件 @
7e1332b2
/*
* Copyright (c) 1999, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
1
, 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
...
...
@@ -192,11 +192,12 @@ class ValueNumberingVisitor: public InstructionVisitor {
void
do_ExceptionObject
(
ExceptionObject
*
x
)
{
/* nothing to do */
}
void
do_RoundFP
(
RoundFP
*
x
)
{
/* nothing to do */
}
void
do_UnsafeGetRaw
(
UnsafeGetRaw
*
x
)
{
/* nothing to do */
}
void
do_ProfileInvoke
(
ProfileInvoke
*
x
)
{
/* nothing to do */
};
void
do_UnsafeGetObject
(
UnsafeGetObject
*
x
)
{
/* nothing to do */
}
void
do_UnsafePrefetchRead
(
UnsafePrefetchRead
*
x
)
{
/* nothing to do */
}
void
do_UnsafePrefetchWrite
(
UnsafePrefetchWrite
*
x
)
{
/* nothing to do */
}
void
do_ProfileCall
(
ProfileCall
*
x
)
{
/* nothing to do */
}
void
do_ProfileInvoke
(
ProfileInvoke
*
x
)
{
/* nothing to do */
};
void
do_RuntimeCall
(
RuntimeCall
*
x
)
{
/* nothing to do */
};
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录