Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
91ec1b72
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看板
提交
91ec1b72
编写于
9月 11, 2019
作者:
J
jbachorik
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8230707: JFR related tests are failing
Reviewed-by: neugens
上级
e6acda66
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
54 addition
and
6 deletion
+54
-6
src/share/vm/prims/whitebox.cpp
src/share/vm/prims/whitebox.cpp
+53
-6
src/share/vm/prims/whitebox.hpp
src/share/vm/prims/whitebox.hpp
+1
-0
未找到文件。
src/share/vm/prims/whitebox.cpp
浏览文件 @
91ec1b72
...
...
@@ -569,13 +569,53 @@ WB_ENTRY(jboolean, WB_TestSetForceInlineMethod(JNIEnv* env, jobject o, jobject m
return
result
;
WB_END
bool
WhiteBox
::
compile_method
(
Method
*
method
,
int
comp_level
,
int
bci
,
Thread
*
THREAD
)
{
// Screen for unavailable/bad comp level or null method
AbstractCompiler
*
comp
=
CompileBroker
::
compiler
(
comp_level
);
if
(
method
==
NULL
)
{
tty
->
print_cr
(
"WB error: request to compile NULL method"
);
return
false
;
}
if
(
comp_level
>
MIN2
((
CompLevel
)
TieredStopAtLevel
,
CompLevel_highest_tier
))
{
tty
->
print_cr
(
"WB error: invalid compilation level %d"
,
comp_level
);
return
false
;
}
if
(
comp
==
NULL
)
{
tty
->
print_cr
(
"WB error: no compiler for requested compilation level %d"
,
comp_level
);
return
false
;
}
methodHandle
mh
(
THREAD
,
method
);
// Compile method and check result
nmethod
*
nm
=
CompileBroker
::
compile_method
(
mh
,
bci
,
comp_level
,
mh
,
mh
->
invocation_count
(),
"Whitebox"
,
THREAD
);
MutexLocker
mu
(
Compile_lock
);
bool
is_queued
=
mh
->
queued_for_compilation
();
if
(
is_queued
||
nm
!=
NULL
)
{
return
true
;
}
tty
->
print
(
"WB error: failed to compile at level %d method "
,
comp_level
);
mh
->
print_short_name
(
tty
);
tty
->
cr
();
if
(
is_queued
)
{
tty
->
print_cr
(
"WB error: blocking compilation is still in queue!"
);
}
return
false
;
}
WB_ENTRY
(
jboolean
,
WB_EnqueueMethodForCompilation
(
JNIEnv
*
env
,
jobject
o
,
jobject
method
,
jint
comp_level
,
jint
bci
))
jmethodID
jmid
=
reflected_method_to_jmid
(
thread
,
env
,
method
);
CHECK_JNI_EXCEPTION_
(
env
,
JNI_FALSE
);
methodHandle
mh
(
THREAD
,
Method
::
checked_resolve_jmethod_id
(
jmid
));
nmethod
*
nm
=
CompileBroker
::
compile_method
(
mh
,
bci
,
comp_level
,
mh
,
mh
->
invocation_count
(),
"WhiteBox"
,
THREAD
);
MutexLockerEx
mu
(
Compile_lock
);
return
(
mh
->
queued_for_compilation
()
||
nm
!=
NULL
);
return
WhiteBox
::
compile_method
(
Method
::
checked_resolve_jmethod_id
(
jmid
),
comp_level
,
bci
,
THREAD
);
WB_END
WB_ENTRY
(
jboolean
,
WB_EnqueueInitializerForCompilation
(
JNIEnv
*
env
,
jobject
o
,
jclass
klass
,
jint
comp_level
))
InstanceKlass
*
ik
=
InstanceKlass
::
cast
(
java_lang_Class
::
as_Klass
(
JNIHandles
::
resolve
(
klass
)));
Method
*
clinit
=
ik
->
class_initializer
();
if
(
clinit
==
NULL
)
{
return
false
;
}
return
WhiteBox
::
compile_method
(
clinit
,
comp_level
,
InvocationEntryBci
,
THREAD
);
WB_END
class
VM_WhiteBoxOperation
:
public
VM_Operation
{
...
...
@@ -805,7 +845,6 @@ WB_ENTRY(void, WB_SetStringVMFlag(JNIEnv* env, jobject o, jstring name, jstring
}
WB_END
WB_ENTRY
(
jboolean
,
WB_IsInStringTable
(
JNIEnv
*
env
,
jobject
o
,
jstring
javaString
))
ResourceMark
rm
(
THREAD
);
int
len
;
...
...
@@ -1042,6 +1081,11 @@ WB_ENTRY(void, WB_ForceSafepoint(JNIEnv* env, jobject wb))
VMThread
::
execute
(
&
force_safepoint_op
);
WB_END
WB_ENTRY
(
jlong
,
WB_GetHeapAlignment
(
JNIEnv
*
env
,
jobject
o
))
size_t
alignment
=
Universe
::
heap
()
->
collector_policy
()
->
heap_alignment
();
return
(
jlong
)
alignment
;
WB_END
//Some convenience methods to deal with objects from java
int
WhiteBox
::
offset_for_field
(
const
char
*
field_name
,
oop
object
,
Symbol
*
signature_symbol
)
{
...
...
@@ -1156,6 +1200,7 @@ static JNINativeMethod methods[] = {
{
CC
"getHeapOopSize"
,
CC
"()I"
,
(
void
*
)
&
WB_GetHeapOopSize
},
{
CC
"getVMPageSize"
,
CC
"()I"
,
(
void
*
)
&
WB_GetVMPageSize
},
{
CC
"getVMLargePageSize"
,
CC
"()J"
,
(
void
*
)
&
WB_GetVMLargePageSize
},
{
CC
"getHeapAlignment"
,
CC
"()J"
,
(
void
*
)
&
WB_GetHeapAlignment
},
{
CC
"isClassAlive0"
,
CC
"(Ljava/lang/String;)Z"
,
(
void
*
)
&
WB_IsClassAlive
},
{
CC
"classKnownToNotExist"
,
CC
"(Ljava/lang/ClassLoader;Ljava/lang/String;)Z"
,(
void
*
)
&
WB_ClassKnownToNotExist
},
...
...
@@ -1221,8 +1266,10 @@ static JNINativeMethod methods[] = {
CC
"(I)I"
,
(
void
*
)
&
WB_GetCompileQueueSize
},
{
CC
"testSetForceInlineMethod"
,
CC
"(Ljava/lang/reflect/Executable;Z)Z"
,
(
void
*
)
&
WB_TestSetForceInlineMethod
},
{
CC
"enqueueMethodForCompilation"
,
{
CC
"enqueueMethodForCompilation
0
"
,
CC
"(Ljava/lang/reflect/Executable;II)Z"
,
(
void
*
)
&
WB_EnqueueMethodForCompilation
},
{
CC
"enqueueInitializerForCompilation0"
,
CC
"(Ljava/lang/Class;I)Z"
,
(
void
*
)
&
WB_EnqueueInitializerForCompilation
},
{
CC
"clearMethodState"
,
CC
"(Ljava/lang/reflect/Executable;)V"
,
(
void
*
)
&
WB_ClearMethodState
},
{
CC
"markMethodProfiled"
,
...
...
src/share/vm/prims/whitebox.hpp
浏览文件 @
91ec1b72
...
...
@@ -70,6 +70,7 @@ class WhiteBox : public AllStatic {
static
void
register_methods
(
JNIEnv
*
env
,
jclass
wbclass
,
JavaThread
*
thread
,
JNINativeMethod
*
method_array
,
int
method_count
);
static
void
register_extended
(
JNIEnv
*
env
,
jclass
wbclass
,
JavaThread
*
thread
);
static
bool
compile_method
(
Method
*
method
,
int
comp_level
,
int
bci
,
Thread
*
THREAD
);
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录