Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
Dragonwell11
提交
38a0228a
D
Dragonwell11
项目概览
LinuxSuRen
/
Dragonwell11
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Dragonwell11
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
38a0228a
编写于
3月 18, 2019
作者:
M
mbaesken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8220355: Improve assertion texts and exception messages in eventHandlerVMInit
Reviewed-by: alanb, sspitsyn, jcbeyler
上级
21a97da2
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
28 addition
and
27 deletion
+28
-27
src/java.instrument/share/native/libinstrument/InvocationAdapter.c
...instrument/share/native/libinstrument/InvocationAdapter.c
+22
-22
src/java.instrument/share/native/libinstrument/JPLISAgent.c
src/java.instrument/share/native/libinstrument/JPLISAgent.c
+6
-5
未找到文件。
src/java.instrument/share/native/libinstrument/InvocationAdapter.c
浏览文件 @
38a0228a
/*
* Copyright (c) 2003, 201
7
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
9
, 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
...
...
@@ -558,32 +558,32 @@ eventHandlerVMInit( jvmtiEnv * jvmtienv,
environment
=
getJPLISEnvironment
(
jvmtienv
);
/* process the premain calls on the all the JPL agents */
if
(
environment
!=
NULL
)
{
jthrowable
outstandingException
=
NULL
;
/*
* Add the jarfile to the system class path
*/
JPLISAgent
*
agent
=
environment
->
mAgent
;
if
(
appendClassPath
(
agent
,
agent
->
mJarfile
))
{
fprintf
(
stderr
,
"Unable to add %s to system class path - "
"the system class loader does not define the "
"appendToClassPathForInstrumentation method or the method failed
\n
"
,
agent
->
mJarfile
);
free
((
void
*
)
agent
->
mJarfile
);
abortJVM
(
jnienv
,
JPLIS_ERRORMESSAGE_CANNOTSTART
);
}
if
(
environment
==
NULL
)
{
abortJVM
(
jnienv
,
JPLIS_ERRORMESSAGE_CANNOTSTART
", getting JPLIS environment failed"
);
}
jthrowable
outstandingException
=
NULL
;
/*
* Add the jarfile to the system class path
*/
JPLISAgent
*
agent
=
environment
->
mAgent
;
if
(
appendClassPath
(
agent
,
agent
->
mJarfile
))
{
fprintf
(
stderr
,
"Unable to add %s to system class path - "
"the system class loader does not define the "
"appendToClassPathForInstrumentation method or the method failed
\n
"
,
agent
->
mJarfile
);
free
((
void
*
)
agent
->
mJarfile
);
agent
->
mJarfile
=
NULL
;
outstandingException
=
preserveThrowable
(
jnienv
);
success
=
processJavaStart
(
environment
->
mAgent
,
jnienv
);
restoreThrowable
(
jnienv
,
outstandingException
);
abortJVM
(
jnienv
,
JPLIS_ERRORMESSAGE_CANNOTSTART
", appending to system class path failed"
);
}
free
((
void
*
)
agent
->
mJarfile
);
agent
->
mJarfile
=
NULL
;
outstandingException
=
preserveThrowable
(
jnienv
);
success
=
processJavaStart
(
environment
->
mAgent
,
jnienv
);
restoreThrowable
(
jnienv
,
outstandingException
);
/* if we fail to start cleanly, bring down the JVM */
if
(
!
success
)
{
abortJVM
(
jnienv
,
JPLIS_ERRORMESSAGE_CANNOTSTART
);
abortJVM
(
jnienv
,
JPLIS_ERRORMESSAGE_CANNOTSTART
", processJavaStart failed"
);
}
}
...
...
src/java.instrument/share/native/libinstrument/JPLISAgent.c
浏览文件 @
38a0228a
/*
* Copyright (c) 2003, 201
7
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
9
, 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
...
...
@@ -389,17 +389,17 @@ processJavaStart( JPLISAgent * agent,
*/
/*
* First make our
emergency
fallback InternalError throwable.
* First make our fallback InternalError throwable.
*/
result
=
initializeFallbackError
(
jnienv
);
jplis_assert
(
result
);
jplis_assert
_msg
(
result
,
"fallback init failed"
);
/*
* Now make the InstrumentationImpl instance.
*/
if
(
result
)
{
result
=
createInstrumentationImpl
(
jnienv
,
agent
);
jplis_assert
(
result
);
jplis_assert
_msg
(
result
,
"instrumentation instance creation failed"
);
}
...
...
@@ -409,7 +409,7 @@ processJavaStart( JPLISAgent * agent,
*/
if
(
result
)
{
result
=
setLivePhaseEventHandlers
(
agent
);
jplis_assert
(
result
);
jplis_assert
_msg
(
result
,
"setting of live phase VM handlers failed"
);
}
/*
...
...
@@ -419,6 +419,7 @@ processJavaStart( JPLISAgent * agent,
result
=
startJavaAgent
(
agent
,
jnienv
,
agent
->
mAgentClassName
,
agent
->
mOptionsString
,
agent
->
mPremainCaller
);
jplis_assert_msg
(
result
,
"agent load/premain call failed"
);
}
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录