Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
0183fc12
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看板
提交
0183fc12
编写于
8月 13, 2010
作者:
D
dcubed
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
0519458f
f892bd1e
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
16 addition
and
5 deletion
+16
-5
src/share/vm/runtime/thread.cpp
src/share/vm/runtime/thread.cpp
+16
-5
未找到文件。
src/share/vm/runtime/thread.cpp
浏览文件 @
0183fc12
...
...
@@ -3281,12 +3281,18 @@ static OnLoadEntry_t lookup_on_load(AgentLibrary* agent, const char *on_load_sym
char
buffer
[
JVM_MAXPATHLEN
];
char
ebuf
[
1024
];
const
char
*
name
=
agent
->
name
();
const
char
*
msg
=
"Could not find agent library "
;
if
(
agent
->
is_absolute_path
())
{
library
=
hpi
::
dll_load
(
name
,
ebuf
,
sizeof
ebuf
);
if
(
library
==
NULL
)
{
const
char
*
sub_msg
=
" in absolute path, with error: "
;
size_t
len
=
strlen
(
msg
)
+
strlen
(
name
)
+
strlen
(
sub_msg
)
+
strlen
(
ebuf
)
+
1
;
char
*
buf
=
NEW_C_HEAP_ARRAY
(
char
,
len
);
jio_snprintf
(
buf
,
len
,
"%s%s%s%s"
,
msg
,
name
,
sub_msg
,
ebuf
);
// If we can't find the agent, exit.
vm_exit_during_initialization
(
"Could not find agent library in absolute path"
,
name
);
vm_exit_during_initialization
(
buf
,
NULL
);
FREE_C_HEAP_ARRAY
(
char
,
buf
);
}
}
else
{
// Try to load the agent from the standard dll directory
...
...
@@ -3299,17 +3305,17 @@ static OnLoadEntry_t lookup_on_load(AgentLibrary* agent, const char *on_load_sym
char
*
home
=
Arguments
::
get_java_home
();
const
char
*
fmt
=
"%s/bin/java %s -Dkernel.background.download=false"
" sun.jkernel.DownloadManager -download client_jvm"
;
in
t
length
=
strlen
(
props
)
+
strlen
(
home
)
+
strlen
(
fmt
)
+
1
;
char
*
cmd
=
AllocateHeap
(
length
);
size_
t
length
=
strlen
(
props
)
+
strlen
(
home
)
+
strlen
(
fmt
)
+
1
;
char
*
cmd
=
NEW_C_HEAP_ARRAY
(
char
,
length
);
jio_snprintf
(
cmd
,
length
,
fmt
,
home
,
props
);
int
status
=
os
::
fork_and_exec
(
cmd
);
FreeHeap
(
props
);
FreeHeap
(
cmd
);
if
(
status
==
-
1
)
{
warning
(
cmd
);
vm_exit_during_initialization
(
"fork_and_exec failed: %s"
,
strerror
(
errno
));
}
FREE_C_HEAP_ARRAY
(
char
,
cmd
);
// when this comes back the instrument.dll should be where it belongs.
library
=
hpi
::
dll_load
(
buffer
,
ebuf
,
sizeof
ebuf
);
}
...
...
@@ -3319,8 +3325,13 @@ static OnLoadEntry_t lookup_on_load(AgentLibrary* agent, const char *on_load_sym
hpi
::
dll_build_name
(
buffer
,
sizeof
(
buffer
),
ns
,
name
);
library
=
hpi
::
dll_load
(
buffer
,
ebuf
,
sizeof
ebuf
);
if
(
library
==
NULL
)
{
const
char
*
sub_msg
=
" on the library path, with error: "
;
size_t
len
=
strlen
(
msg
)
+
strlen
(
name
)
+
strlen
(
sub_msg
)
+
strlen
(
ebuf
)
+
1
;
char
*
buf
=
NEW_C_HEAP_ARRAY
(
char
,
len
);
jio_snprintf
(
buf
,
len
,
"%s%s%s%s"
,
msg
,
name
,
sub_msg
,
ebuf
);
// If we can't find the agent, exit.
vm_exit_during_initialization
(
"Could not find agent library on the library path or in the local directory"
,
name
);
vm_exit_during_initialization
(
buf
,
NULL
);
FREE_C_HEAP_ARRAY
(
char
,
buf
);
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录