Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
9948d281
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看板
提交
9948d281
编写于
9月 11, 2014
作者:
I
iveresov
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
31dc0399
dad6315d
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
67 addition
and
26 deletion
+67
-26
src/share/vm/classfile/systemDictionary.cpp
src/share/vm/classfile/systemDictionary.cpp
+7
-2
src/share/vm/oops/method.cpp
src/share/vm/oops/method.cpp
+12
-12
src/share/vm/oops/methodCounters.cpp
src/share/vm/oops/methodCounters.cpp
+36
-0
src/share/vm/oops/methodCounters.hpp
src/share/vm/oops/methodCounters.hpp
+9
-0
src/share/vm/oops/methodData.cpp
src/share/vm/oops/methodData.cpp
+0
-2
src/share/vm/oops/methodData.hpp
src/share/vm/oops/methodData.hpp
+0
-9
src/share/vm/runtime/arguments.hpp
src/share/vm/runtime/arguments.hpp
+3
-1
未找到文件。
src/share/vm/classfile/systemDictionary.cpp
浏览文件 @
9948d281
...
...
@@ -51,6 +51,7 @@
#include "oops/typeArrayKlass.hpp"
#include "prims/jvmtiEnvBase.hpp"
#include "prims/methodHandles.hpp"
#include "runtime/arguments.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/fieldType.hpp"
#include "runtime/handles.inline.hpp"
...
...
@@ -2277,7 +2278,11 @@ methodHandle SystemDictionary::find_method_handle_intrinsic(vmIntrinsics::ID iid
m
=
Method
::
make_method_handle_intrinsic
(
iid
,
signature
,
CHECK_
(
empty
));
CompileBroker
::
compile_method
(
m
,
InvocationEntryBci
,
CompLevel_highest_tier
,
methodHandle
(),
CompileThreshold
,
"MH"
,
CHECK_
(
empty
));
// Check if we need to have compiled code but we don't.
if
(
!
Arguments
::
is_interpreter_only
()
&&
!
m
->
has_compiled_code
())
{
THROW_MSG_
(
vmSymbols
::
java_lang_VirtualMachineError
(),
"out of space in CodeCache for method handle intrinsic"
,
empty
);
}
// Now grab the lock. We might have to throw away the new method,
// if a racing thread has managed to install one at the same time.
{
...
...
@@ -2291,7 +2296,7 @@ methodHandle SystemDictionary::find_method_handle_intrinsic(vmIntrinsics::ID iid
}
assert
(
spe
!=
NULL
&&
spe
->
method
()
!=
NULL
,
""
);
assert
(
!
UseCompiler
||
(
spe
->
method
()
->
has_compiled_code
()
&&
assert
(
Arguments
::
is_interpreter_only
()
||
(
spe
->
method
()
->
has_compiled_code
()
&&
spe
->
method
()
->
code
()
->
entry_point
()
==
spe
->
method
()
->
from_compiled_entry
()),
"MH intrinsic invariant"
);
return
spe
->
method
();
...
...
src/share/vm/oops/method.cpp
浏览文件 @
9948d281
...
...
@@ -1636,34 +1636,34 @@ int Method::backedge_count() {
}
int
Method
::
highest_comp_level
()
const
{
const
Method
Data
*
mdo
=
method_data
();
if
(
m
do
!=
NULL
)
{
return
m
do
->
highest_comp_level
();
const
Method
Counters
*
mcs
=
method_counters
();
if
(
m
cs
!=
NULL
)
{
return
m
cs
->
highest_comp_level
();
}
else
{
return
CompLevel_none
;
}
}
int
Method
::
highest_osr_comp_level
()
const
{
const
Method
Data
*
mdo
=
method_data
();
if
(
m
do
!=
NULL
)
{
return
m
do
->
highest_osr_comp_level
();
const
Method
Counters
*
mcs
=
method_counters
();
if
(
m
cs
!=
NULL
)
{
return
m
cs
->
highest_osr_comp_level
();
}
else
{
return
CompLevel_none
;
}
}
void
Method
::
set_highest_comp_level
(
int
level
)
{
Method
Data
*
mdo
=
method_data
();
if
(
m
do
!=
NULL
)
{
m
do
->
set_highest_comp_level
(
level
);
Method
Counters
*
mcs
=
method_counters
();
if
(
m
cs
!=
NULL
)
{
m
cs
->
set_highest_comp_level
(
level
);
}
}
void
Method
::
set_highest_osr_comp_level
(
int
level
)
{
Method
Data
*
mdo
=
method_data
();
if
(
m
do
!=
NULL
)
{
m
do
->
set_highest_osr_comp_level
(
level
);
Method
Counters
*
mcs
=
method_counters
();
if
(
m
cs
!=
NULL
)
{
m
cs
->
set_highest_osr_comp_level
(
level
);
}
}
...
...
src/share/vm/oops/methodCounters.cpp
浏览文件 @
9948d281
...
...
@@ -34,4 +34,40 @@ void MethodCounters::clear_counters() {
backedge_counter
()
->
reset
();
set_interpreter_throwout_count
(
0
);
set_interpreter_invocation_count
(
0
);
#ifdef TIERED
set_prev_time
(
0
);
set_rate
(
0
);
set_highest_comp_level
(
0
);
set_highest_osr_comp_level
(
0
);
#endif
}
int
MethodCounters
::
highest_comp_level
()
const
{
#ifdef TIERED
return
_highest_comp_level
;
#else
return
CompLevel_none
;
#endif
}
void
MethodCounters
::
set_highest_comp_level
(
int
level
)
{
#ifdef TIERED
_highest_comp_level
=
level
;
#endif
}
int
MethodCounters
::
highest_osr_comp_level
()
const
{
#ifdef TIERED
return
_highest_osr_comp_level
;
#else
return
CompLevel_none
;
#endif
}
void
MethodCounters
::
set_highest_osr_comp_level
(
int
level
)
{
#ifdef TIERED
_highest_osr_comp_level
=
level
;
#endif
}
src/share/vm/oops/methodCounters.hpp
浏览文件 @
9948d281
...
...
@@ -39,6 +39,8 @@ class MethodCounters: public MetaspaceObj {
#ifdef TIERED
float
_rate
;
// Events (invocation and backedge counter increments) per millisecond
u1
_highest_comp_level
;
// Highest compile level this method has ever seen.
u1
_highest_osr_comp_level
;
// Same for OSR level
jlong
_prev_time
;
// Previous time the rate was acquired
#endif
...
...
@@ -47,6 +49,8 @@ class MethodCounters: public MetaspaceObj {
_number_of_breakpoints
(
0
)
#ifdef TIERED
,
_rate
(
0
),
_highest_comp_level
(
0
),
_highest_osr_comp_level
(
0
),
_prev_time
(
0
)
#endif
{
...
...
@@ -100,6 +104,11 @@ class MethodCounters: public MetaspaceObj {
void
set_rate
(
float
rate
)
{
_rate
=
rate
;
}
#endif
int
highest_comp_level
()
const
;
void
set_highest_comp_level
(
int
level
);
int
highest_osr_comp_level
()
const
;
void
set_highest_osr_comp_level
(
int
level
);
// invocation counter
InvocationCounter
*
invocation_counter
()
{
return
&
_invocation_counter
;
}
InvocationCounter
*
backedge_counter
()
{
return
&
_backedge_counter
;
}
...
...
src/share/vm/oops/methodData.cpp
浏览文件 @
9948d281
...
...
@@ -1153,8 +1153,6 @@ void MethodData::init() {
_backedge_counter_start
=
0
;
_num_loops
=
0
;
_num_blocks
=
0
;
_highest_comp_level
=
0
;
_highest_osr_comp_level
=
0
;
_would_profile
=
true
;
#if INCLUDE_RTM_OPT
...
...
src/share/vm/oops/methodData.hpp
浏览文件 @
9948d281
...
...
@@ -2098,10 +2098,6 @@ private:
// time with C1. It is used to determine if method is trivial.
short
_num_loops
;
short
_num_blocks
;
// Highest compile level this method has ever seen.
u1
_highest_comp_level
;
// Same for OSR level
u1
_highest_osr_comp_level
;
// Does this method contain anything worth profiling?
bool
_would_profile
;
...
...
@@ -2275,11 +2271,6 @@ public:
void
set_would_profile
(
bool
p
)
{
_would_profile
=
p
;
}
bool
would_profile
()
const
{
return
_would_profile
;
}
int
highest_comp_level
()
const
{
return
_highest_comp_level
;
}
void
set_highest_comp_level
(
int
level
)
{
_highest_comp_level
=
level
;
}
int
highest_osr_comp_level
()
const
{
return
_highest_osr_comp_level
;
}
void
set_highest_osr_comp_level
(
int
level
)
{
_highest_osr_comp_level
=
level
;
}
int
num_loops
()
const
{
return
_num_loops
;
}
void
set_num_loops
(
int
n
)
{
_num_loops
=
n
;
}
int
num_blocks
()
const
{
return
_num_blocks
;
}
...
...
src/share/vm/runtime/arguments.hpp
浏览文件 @
9948d281
...
...
@@ -601,7 +601,9 @@ class Arguments : AllStatic {
static
void
fix_appclasspath
();
// Operation modi
static
Mode
mode
()
{
return
_mode
;
}
static
Mode
mode
()
{
return
_mode
;
}
static
bool
is_interpreter_only
()
{
return
mode
()
==
_int
;
}
// Utility: copies src into buf, replacing "%%" with "%" and "%p" with pid.
static
bool
copy_expand_pid
(
const
char
*
src
,
size_t
srclen
,
char
*
buf
,
size_t
buflen
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录