Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
36411c2c
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看板
提交
36411c2c
编写于
7月 07, 2010
作者:
M
mchung
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6967423: Hotspot support for modules image
Summary: Add hotspot support for modules image Reviewed-by: acorn
上级
c6e5c8a3
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
43 addition
and
8 deletion
+43
-8
make/linux/makefiles/sa.make
make/linux/makefiles/sa.make
+4
-1
make/solaris/makefiles/sa.make
make/solaris/makefiles/sa.make
+4
-1
src/os/linux/vm/os_linux.cpp
src/os/linux/vm/os_linux.cpp
+17
-4
src/os/solaris/vm/os_solaris.cpp
src/os/solaris/vm/os_solaris.cpp
+13
-2
src/share/vm/runtime/os.cpp
src/share/vm/runtime/os.cpp
+5
-0
未找到文件。
make/linux/makefiles/sa.make
浏览文件 @
36411c2c
...
@@ -40,6 +40,9 @@ GENERATED = $(TOPDIR)/../generated
...
@@ -40,6 +40,9 @@ GENERATED = $(TOPDIR)/../generated
# tools.jar is needed by the JDI - SA binding
# tools.jar is needed by the JDI - SA binding
SA_CLASSPATH
=
$(BOOT_JAVA_HOME)
/lib/tools.jar
SA_CLASSPATH
=
$(BOOT_JAVA_HOME)
/lib/tools.jar
# TODO: if it's a modules image, check if SA module is installed.
MODULELIB_PATH
=
$(BOOT_JAVA_HOME)
/lib/modules
# gnumake 3.78.1 does not accept the *s that
# gnumake 3.78.1 does not accept the *s that
# are in AGENT_FILES1 and AGENT_FILES2, so use the shell to expand them
# are in AGENT_FILES1 and AGENT_FILES2, so use the shell to expand them
AGENT_FILES1
:=
$(
shell
/usr/bin/test
-d
$(AGENT_DIR)
&&
/bin/ls
$(AGENT_FILES1)
)
AGENT_FILES1
:=
$(
shell
/usr/bin/test
-d
$(AGENT_DIR)
&&
/bin/ls
$(AGENT_FILES1)
)
...
@@ -65,7 +68,7 @@ $(GENERATED)/sa-jdi.jar: $(AGENT_FILES1) $(AGENT_FILES2)
...
@@ -65,7 +68,7 @@ $(GENERATED)/sa-jdi.jar: $(AGENT_FILES1) $(AGENT_FILES2)
echo
"ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"
;
\
echo
"ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"
;
\
exit
1
;
\
exit
1
;
\
fi
fi
$(QUIETLY)
if
[
!
-f
$(SA_CLASSPATH)
]
;
then
\
$(QUIETLY)
if
[
!
-f
$(SA_CLASSPATH)
-a
!
-d
$(MODULELIB_PATH)
]
;
then
\
echo
"Missing
$(SA_CLASSPATH)
file. Use 1.6.0 or later version of JDK"
;
\
echo
"Missing
$(SA_CLASSPATH)
file. Use 1.6.0 or later version of JDK"
;
\
echo
""
;
\
echo
""
;
\
exit
1
;
\
exit
1
;
\
...
...
make/solaris/makefiles/sa.make
浏览文件 @
36411c2c
...
@@ -36,6 +36,9 @@ GENERATED = ../generated
...
@@ -36,6 +36,9 @@ GENERATED = ../generated
# tools.jar is needed by the JDI - SA binding
# tools.jar is needed by the JDI - SA binding
SA_CLASSPATH
=
$(BOOT_JAVA_HOME)
/lib/tools.jar
SA_CLASSPATH
=
$(BOOT_JAVA_HOME)
/lib/tools.jar
# TODO: if it's a modules image, check if SA module is installed.
MODULELIB_PATH
=
$(BOOT_JAVA_HOME)
/lib/modules
# gnumake 3.78.1 does not accept the *s that
# gnumake 3.78.1 does not accept the *s that
# are in AGENT_FILES1 and AGENT_FILES2, so use the shell to expand them
# are in AGENT_FILES1 and AGENT_FILES2, so use the shell to expand them
AGENT_FILES1
:=
$(
shell
/usr/bin/test
-d
$(AGENT_DIR)
&&
/bin/ls
$(AGENT_FILES1)
)
AGENT_FILES1
:=
$(
shell
/usr/bin/test
-d
$(AGENT_DIR)
&&
/bin/ls
$(AGENT_FILES1)
)
...
@@ -59,7 +62,7 @@ $(GENERATED)/sa-jdi.jar: $(AGENT_FILES1) $(AGENT_FILES2)
...
@@ -59,7 +62,7 @@ $(GENERATED)/sa-jdi.jar: $(AGENT_FILES1) $(AGENT_FILES2)
echo
"ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"
;
\
echo
"ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"
;
\
exit
1
;
\
exit
1
;
\
fi
fi
$(QUIETLY)
if
[
!
-f
$(SA_CLASSPATH)
]
;
then
\
$(QUIETLY)
if
[
!
-f
$(SA_CLASSPATH)
-a
!
-d
$(MODULELIB_PATH)
]
;
then
\
echo
"Missing
$(SA_CLASSPATH)
file. Use 1.6.0 or later version of JDK"
;
\
echo
"Missing
$(SA_CLASSPATH)
file. Use 1.6.0 or later version of JDK"
;
\
echo
""
;
\
echo
""
;
\
exit
1
;
\
exit
1
;
\
...
...
src/os/linux/vm/os_linux.cpp
浏览文件 @
36411c2c
...
@@ -2079,9 +2079,9 @@ void os::print_signal_handlers(outputStream* st, char* buf, size_t buflen) {
...
@@ -2079,9 +2079,9 @@ void os::print_signal_handlers(outputStream* st, char* buf, size_t buflen) {
static
char
saved_jvm_path
[
MAXPATHLEN
]
=
{
0
};
static
char
saved_jvm_path
[
MAXPATHLEN
]
=
{
0
};
// Find the full path to the current module, libjvm.so or libjvm_g.so
// Find the full path to the current module, libjvm.so or libjvm_g.so
void
os
::
jvm_path
(
char
*
buf
,
jint
len
)
{
void
os
::
jvm_path
(
char
*
buf
,
jint
buf
len
)
{
// Error checking.
// Error checking.
if
(
len
<
MAXPATHLEN
)
{
if
(
buf
len
<
MAXPATHLEN
)
{
assert
(
false
,
"must use a large-enough buffer"
);
assert
(
false
,
"must use a large-enough buffer"
);
buf
[
0
]
=
'\0'
;
buf
[
0
]
=
'\0'
;
return
;
return
;
...
@@ -2117,6 +2117,9 @@ void os::jvm_path(char *buf, jint len) {
...
@@ -2117,6 +2117,9 @@ void os::jvm_path(char *buf, jint len) {
// Look for JAVA_HOME in the environment.
// Look for JAVA_HOME in the environment.
char
*
java_home_var
=
::
getenv
(
"JAVA_HOME"
);
char
*
java_home_var
=
::
getenv
(
"JAVA_HOME"
);
if
(
java_home_var
!=
NULL
&&
java_home_var
[
0
]
!=
0
)
{
if
(
java_home_var
!=
NULL
&&
java_home_var
[
0
]
!=
0
)
{
char
*
jrelib_p
;
int
len
;
// Check the current module name "libjvm.so" or "libjvm_g.so".
// Check the current module name "libjvm.so" or "libjvm_g.so".
p
=
strrchr
(
buf
,
'/'
);
p
=
strrchr
(
buf
,
'/'
);
assert
(
strstr
(
p
,
"/libjvm"
)
==
p
,
"invalid library name"
);
assert
(
strstr
(
p
,
"/libjvm"
)
==
p
,
"invalid library name"
);
...
@@ -2124,14 +2127,24 @@ void os::jvm_path(char *buf, jint len) {
...
@@ -2124,14 +2127,24 @@ void os::jvm_path(char *buf, jint len) {
if
(
realpath
(
java_home_var
,
buf
)
==
NULL
)
if
(
realpath
(
java_home_var
,
buf
)
==
NULL
)
return
;
return
;
sprintf
(
buf
+
strlen
(
buf
),
"/jre/lib/%s"
,
cpu_arch
);
// determine if this is a legacy image or modules image
// modules image doesn't have "jre" subdirectory
len
=
strlen
(
buf
);
jrelib_p
=
buf
+
len
;
snprintf
(
jrelib_p
,
buflen
-
len
,
"/jre/lib/%s"
,
cpu_arch
);
if
(
0
!=
access
(
buf
,
F_OK
))
{
snprintf
(
jrelib_p
,
buflen
-
len
,
"/lib/%s"
,
cpu_arch
);
}
if
(
0
==
access
(
buf
,
F_OK
))
{
if
(
0
==
access
(
buf
,
F_OK
))
{
// Use current module name "libjvm[_g].so" instead of
// Use current module name "libjvm[_g].so" instead of
// "libjvm"debug_only("_g")".so" since for fastdebug version
// "libjvm"debug_only("_g")".so" since for fastdebug version
// we should have "libjvm.so" but debug_only("_g") adds "_g"!
// we should have "libjvm.so" but debug_only("_g") adds "_g"!
// It is used when we are choosing the HPI library's name
// It is used when we are choosing the HPI library's name
// "libhpi[_g].so" in hpi::initialize_get_interface().
// "libhpi[_g].so" in hpi::initialize_get_interface().
sprintf
(
buf
+
strlen
(
buf
),
"/hotspot/libjvm%s.so"
,
p
);
len
=
strlen
(
buf
);
snprintf
(
buf
+
len
,
buflen
-
len
,
"/hotspot/libjvm%s.so"
,
p
);
}
else
{
}
else
{
// Go back to path of .so
// Go back to path of .so
if
(
realpath
(
dli_fname
,
buf
)
==
NULL
)
if
(
realpath
(
dli_fname
,
buf
)
==
NULL
)
...
...
src/os/solaris/vm/os_solaris.cpp
浏览文件 @
36411c2c
...
@@ -2435,6 +2435,8 @@ void os::jvm_path(char *buf, jint buflen) {
...
@@ -2435,6 +2435,8 @@ void os::jvm_path(char *buf, jint buflen) {
char
*
java_home_var
=
::
getenv
(
"JAVA_HOME"
);
char
*
java_home_var
=
::
getenv
(
"JAVA_HOME"
);
if
(
java_home_var
!=
NULL
&&
java_home_var
[
0
]
!=
0
)
{
if
(
java_home_var
!=
NULL
&&
java_home_var
[
0
]
!=
0
)
{
char
cpu_arch
[
12
];
char
cpu_arch
[
12
];
char
*
jrelib_p
;
int
len
;
sysinfo
(
SI_ARCHITECTURE
,
cpu_arch
,
sizeof
(
cpu_arch
));
sysinfo
(
SI_ARCHITECTURE
,
cpu_arch
,
sizeof
(
cpu_arch
));
#ifdef _LP64
#ifdef _LP64
// If we are on sparc running a 64-bit vm, look in jre/lib/sparcv9.
// If we are on sparc running a 64-bit vm, look in jre/lib/sparcv9.
...
@@ -2450,14 +2452,23 @@ void os::jvm_path(char *buf, jint buflen) {
...
@@ -2450,14 +2452,23 @@ void os::jvm_path(char *buf, jint buflen) {
p
=
strstr
(
p
,
"_g"
)
?
"_g"
:
""
;
p
=
strstr
(
p
,
"_g"
)
?
"_g"
:
""
;
realpath
(
java_home_var
,
buf
);
realpath
(
java_home_var
,
buf
);
sprintf
(
buf
+
strlen
(
buf
),
"/jre/lib/%s"
,
cpu_arch
);
// determine if this is a legacy image or modules image
// modules image doesn't have "jre" subdirectory
len
=
strlen
(
buf
);
jrelib_p
=
buf
+
len
;
snprintf
(
jrelib_p
,
buflen
-
len
,
"/jre/lib/%s"
,
cpu_arch
);
if
(
0
!=
access
(
buf
,
F_OK
))
{
snprintf
(
jrelib_p
,
buflen
-
len
,
"/lib/%s"
,
cpu_arch
);
}
if
(
0
==
access
(
buf
,
F_OK
))
{
if
(
0
==
access
(
buf
,
F_OK
))
{
// Use current module name "libjvm[_g].so" instead of
// Use current module name "libjvm[_g].so" instead of
// "libjvm"debug_only("_g")".so" since for fastdebug version
// "libjvm"debug_only("_g")".so" since for fastdebug version
// we should have "libjvm.so" but debug_only("_g") adds "_g"!
// we should have "libjvm.so" but debug_only("_g") adds "_g"!
// It is used when we are choosing the HPI library's name
// It is used when we are choosing the HPI library's name
// "libhpi[_g].so" in hpi::initialize_get_interface().
// "libhpi[_g].so" in hpi::initialize_get_interface().
sprintf
(
buf
+
strlen
(
buf
),
"/hotspot/libjvm%s.so"
,
p
);
len
=
strlen
(
buf
);
snprintf
(
buf
+
len
,
buflen
-
len
,
"/hotspot/libjvm%s.so"
,
p
);
}
else
{
}
else
{
// Go back to path of .so
// Go back to path of .so
realpath
((
char
*
)
dlinfo
.
dli_fname
,
buf
);
realpath
((
char
*
)
dlinfo
.
dli_fname
,
buf
);
...
...
src/share/vm/runtime/os.cpp
浏览文件 @
36411c2c
...
@@ -886,6 +886,11 @@ bool os::set_boot_path(char fileSep, char pathSep) {
...
@@ -886,6 +886,11 @@ bool os::set_boot_path(char fileSep, char pathSep) {
"%/lib/jsse.jar:"
"%/lib/jsse.jar:"
"%/lib/jce.jar:"
"%/lib/jce.jar:"
"%/lib/charsets.jar:"
"%/lib/charsets.jar:"
// ## TEMPORARY hack to keep the legacy launcher working when
// ## only the boot module is installed (cf. j.l.ClassLoader)
"%/lib/modules/jdk.boot.jar:"
"%/classes"
;
"%/classes"
;
char
*
sysclasspath
=
format_boot_path
(
classpath_format
,
home
,
home_len
,
fileSep
,
pathSep
);
char
*
sysclasspath
=
format_boot_path
(
classpath_format
,
home
,
home_len
,
fileSep
,
pathSep
);
if
(
sysclasspath
==
NULL
)
return
false
;
if
(
sysclasspath
==
NULL
)
return
false
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录