Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
9ddc0bcc
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9ddc0bcc
编写于
4月 30, 2009
作者:
K
kvn
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
cecdafa5
4a3dd894
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
103 addition
and
81 deletion
+103
-81
src/share/vm/runtime/dtraceJSDT.cpp
src/share/vm/runtime/dtraceJSDT.cpp
+5
-0
src/share/vm/runtime/sharedRuntime.cpp
src/share/vm/runtime/sharedRuntime.cpp
+96
-80
src/share/vm/runtime/sharedRuntime.hpp
src/share/vm/runtime/sharedRuntime.hpp
+2
-1
未找到文件。
src/share/vm/runtime/dtraceJSDT.cpp
浏览文件 @
9ddc0bcc
...
...
@@ -60,6 +60,11 @@ jlong DTraceJSDT::activate(
methodHandle
h_method
=
methodHandle
(
THREAD
,
JNIHandles
::
resolve_jmethod_id
(
probe
->
method
));
nmethod
*
nm
=
AdapterHandlerLibrary
::
create_dtrace_nmethod
(
h_method
);
if
(
nm
==
NULL
)
{
delete
probes
;
THROW_MSG_0
(
vmSymbols
::
java_lang_RuntimeException
(),
"Unable to register DTrace probes (CodeCache: no room for DTrace nmethods)."
);
}
h_method
()
->
set_not_compilable
(
CompLevel_highest_tier
);
h_method
()
->
set_code
(
h_method
,
nm
);
probes
->
nmethod_at_put
(
count
++
,
nm
);
...
...
src/share/vm/runtime/sharedRuntime.cpp
浏览文件 @
9ddc0bcc
...
...
@@ -1776,7 +1776,14 @@ const char* AdapterHandlerEntry::name = "I2C/C2I adapters";
GrowableArray
<
uint64_t
>*
AdapterHandlerLibrary
::
_fingerprints
=
NULL
;
GrowableArray
<
AdapterHandlerEntry
*
>*
AdapterHandlerLibrary
::
_handlers
=
NULL
;
const
int
AdapterHandlerLibrary_size
=
16
*
K
;
u_char
AdapterHandlerLibrary
::
_buffer
[
AdapterHandlerLibrary_size
+
32
];
BufferBlob
*
AdapterHandlerLibrary
::
_buffer
=
NULL
;
BufferBlob
*
AdapterHandlerLibrary
::
buffer_blob
()
{
// Should be called only when AdapterHandlerLibrary_lock is active.
if
(
_buffer
==
NULL
)
// Initialize lazily
_buffer
=
BufferBlob
::
create
(
"adapters"
,
AdapterHandlerLibrary_size
);
return
_buffer
;
}
void
AdapterHandlerLibrary
::
initialize
()
{
if
(
_fingerprints
!=
NULL
)
return
;
...
...
@@ -1812,7 +1819,9 @@ int AdapterHandlerLibrary::get_create_adapter_index(methodHandle method) {
assert
(
ic_miss
!=
NULL
,
"must have handler"
);
int
result
;
NOT_PRODUCT
(
int
code_size
);
BufferBlob
*
B
=
NULL
;
AdapterHandlerEntry
*
entry
=
NULL
;
uint64_t
fingerprint
;
{
MutexLocker
mu
(
AdapterHandlerLibrary_lock
);
...
...
@@ -1850,9 +1859,10 @@ int AdapterHandlerLibrary::get_create_adapter_index(methodHandle method) {
// Create I2C & C2I handlers
ResourceMark
rm
;
// Improve alignment slightly
u_char
*
buf
=
(
u_char
*
)(((
intptr_t
)
_buffer
+
CodeEntryAlignment
-
1
)
&
~
(
CodeEntryAlignment
-
1
));
CodeBuffer
buffer
(
buf
,
AdapterHandlerLibrary_size
);
BufferBlob
*
buf
=
buffer_blob
();
// the temporary code buffer in CodeCache
if
(
buf
!=
NULL
)
{
CodeBuffer
buffer
(
buf
->
instructions_begin
(),
buf
->
instructions_size
());
short
buffer_locs
[
20
];
buffer
.
insts
()
->
initialize_shared_locs
((
relocInfo
*
)
buffer_locs
,
sizeof
(
buffer_locs
)
/
sizeof
(
relocInfo
));
...
...
@@ -1879,13 +1889,15 @@ int AdapterHandlerLibrary::get_create_adapter_index(methodHandle method) {
// Get a description of the compiled java calling convention and the largest used (VMReg) stack slot usage
comp_args_on_stack
=
SharedRuntime
::
java_calling_convention
(
sig_bt
,
regs
,
total_args_passed
,
false
);
AdapterHandlerEntry
*
entry
=
SharedRuntime
::
generate_i2c2i_adapters
(
&
_masm
,
entry
=
SharedRuntime
::
generate_i2c2i_adapters
(
&
_masm
,
total_args_passed
,
comp_args_on_stack
,
sig_bt
,
regs
);
B
=
BufferBlob
::
create
(
AdapterHandlerEntry
::
name
,
&
buffer
);
NOT_PRODUCT
(
code_size
=
buffer
.
code_size
());
}
if
(
B
==
NULL
)
{
// CodeCache is full, disable compilation
// Ought to log this but compile log is only per compile thread
...
...
@@ -1912,9 +1924,9 @@ int AdapterHandlerLibrary::get_create_adapter_index(methodHandle method) {
tty
->
cr
();
tty
->
print_cr
(
"i2c argument handler #%d for: %s %s (fingerprint = 0x%llx, %d bytes generated)"
,
_handlers
->
length
(),
(
method
->
is_static
()
?
"static"
:
"receiver"
),
method
->
signature
()
->
as_C_string
(),
fingerprint
,
buffer
.
code_size
()
);
method
->
signature
()
->
as_C_string
(),
fingerprint
,
code_size
);
tty
->
print_cr
(
"c2i argument handler starts at %p"
,
entry
->
get_c2i_entry
());
Disassembler
::
decode
(
entry
->
get_i2c_entry
(),
entry
->
get_i2c_entry
()
+
buffer
.
code_size
()
);
Disassembler
::
decode
(
entry
->
get_i2c_entry
(),
entry
->
get_i2c_entry
()
+
code_size
);
}
#endif
...
...
@@ -1982,10 +1994,11 @@ nmethod *AdapterHandlerLibrary::create_native_wrapper(methodHandle method) {
return
nm
;
}
// Improve alignment slightly
u_char
*
buf
=
(
u_char
*
)(((
intptr_t
)
_buffer
+
CodeEntryAlignment
-
1
)
&
~
(
CodeEntryAlignment
-
1
));
CodeBuffer
buffer
(
buf
,
AdapterHandlerLibrary_size
);
// Need a few relocation entries
ResourceMark
rm
;
BufferBlob
*
buf
=
buffer_blob
();
// the temporary code buffer in CodeCache
if
(
buf
!=
NULL
)
{
CodeBuffer
buffer
(
buf
->
instructions_begin
(),
buf
->
instructions_size
());
double
locs_buf
[
20
];
buffer
.
insts
()
->
initialize_shared_locs
((
relocInfo
*
)
locs_buf
,
sizeof
(
locs_buf
)
/
sizeof
(
relocInfo
));
MacroAssembler
_masm
(
&
buffer
);
...
...
@@ -1994,7 +2007,7 @@ nmethod *AdapterHandlerLibrary::create_native_wrapper(methodHandle method) {
int
total_args_passed
=
method
->
size_of_parameters
();
BasicType
*
sig_bt
=
NEW_RESOURCE_ARRAY
(
BasicType
,
total_args_passed
);
VMRegPair
*
regs
=
NEW_RESOURCE_ARRAY
(
VMRegPair
,
total_args_passed
);
VMRegPair
*
regs
=
NEW_RESOURCE_ARRAY
(
VMRegPair
,
total_args_passed
);
int
i
=
0
;
if
(
!
method
->
is_static
()
)
// Pass in receiver first
sig_bt
[
i
++
]
=
T_OBJECT
;
...
...
@@ -2019,6 +2032,7 @@ nmethod *AdapterHandlerLibrary::create_native_wrapper(methodHandle method) {
sig_bt
,
regs
,
ret_type
);
}
}
// Must unlock before calling set_code
// Install the generated code.
...
...
@@ -2077,10 +2091,11 @@ nmethod *AdapterHandlerLibrary::create_dtrace_nmethod(methodHandle method) {
return
nm
;
}
// Improve alignment slightly
u_char
*
buf
=
(
u_char
*
)
(((
intptr_t
)
_buffer
+
CodeEntryAlignment
-
1
)
&
~
(
CodeEntryAlignment
-
1
));
CodeBuffer
buffer
(
buf
,
AdapterHandlerLibrary_size
);
ResourceMark
rm
;
BufferBlob
*
buf
=
buffer_blob
();
// the temporary code buffer in CodeCache
if
(
buf
!=
NULL
)
{
CodeBuffer
buffer
(
buf
->
instructions_begin
(),
buf
->
instructions_size
());
// Need a few relocation entries
double
locs_buf
[
20
];
buffer
.
insts
()
->
initialize_shared_locs
(
...
...
@@ -2090,6 +2105,7 @@ nmethod *AdapterHandlerLibrary::create_dtrace_nmethod(methodHandle method) {
// Generate the compiled-to-native wrapper code
nm
=
SharedRuntime
::
generate_dtrace_nmethod
(
&
_masm
,
method
);
}
}
return
nm
;
}
...
...
src/share/vm/runtime/sharedRuntime.hpp
浏览文件 @
9ddc0bcc
...
...
@@ -557,12 +557,13 @@ class AdapterHandlerEntry : public CHeapObj {
class
AdapterHandlerLibrary
:
public
AllStatic
{
private:
static
u_char
_buffer
[];
// the temporary code buffer
static
BufferBlob
*
_buffer
;
// the temporary code buffer in CodeCache
static
GrowableArray
<
uint64_t
>*
_fingerprints
;
// the fingerprint collection
static
GrowableArray
<
AdapterHandlerEntry
*>
*
_handlers
;
// the corresponding handlers
enum
{
AbstractMethodHandler
=
1
// special handler for abstract methods
};
static
BufferBlob
*
buffer_blob
();
static
void
initialize
();
static
int
get_create_adapter_index
(
methodHandle
method
);
static
address
get_i2c_entry
(
int
index
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录