Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
30062b49
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看板
提交
30062b49
编写于
11月 01, 2012
作者:
S
sla
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8002078: hs_err_pid file should report full JDK version string
Reviewed-by: dholmes, sspitsyn, kmo
上级
2ba82e0c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
36 addition
and
1 deletion
+36
-1
src/share/vm/classfile/vmSymbols.hpp
src/share/vm/classfile/vmSymbols.hpp
+1
-0
src/share/vm/runtime/java.cpp
src/share/vm/runtime/java.cpp
+1
-0
src/share/vm/runtime/java.hpp
src/share/vm/runtime/java.hpp
+8
-0
src/share/vm/runtime/thread.cpp
src/share/vm/runtime/thread.cpp
+23
-0
src/share/vm/utilities/vmError.cpp
src/share/vm/utilities/vmError.cpp
+3
-1
未找到文件。
src/share/vm/classfile/vmSymbols.hpp
浏览文件 @
30062b49
...
...
@@ -114,6 +114,7 @@
/* Java runtime version access */
\
template(sun_misc_Version, "sun/misc/Version") \
template(java_runtime_name_name, "java_runtime_name") \
template(java_runtime_version_name, "java_runtime_version") \
\
/* class file format tags */
\
template(tag_source_file, "SourceFile") \
...
...
src/share/vm/runtime/java.cpp
浏览文件 @
30062b49
...
...
@@ -688,6 +688,7 @@ void vm_shutdown_during_initialization(const char* error, const char* message) {
JDK_Version
JDK_Version
::
_current
;
const
char
*
JDK_Version
::
_runtime_name
;
const
char
*
JDK_Version
::
_runtime_version
;
void
JDK_Version
::
initialize
()
{
jdk_version_info
info
;
...
...
src/share/vm/runtime/java.hpp
浏览文件 @
30062b49
...
...
@@ -75,6 +75,7 @@ class JDK_Version VALUE_OBJ_CLASS_SPEC {
static
JDK_Version
_current
;
static
const
char
*
_runtime_name
;
static
const
char
*
_runtime_version
;
// In this class, we promote the minor version of release to be the
// major version for releases >= 5 in anticipation of the JDK doing the
...
...
@@ -189,6 +190,13 @@ class JDK_Version VALUE_OBJ_CLASS_SPEC {
_runtime_name
=
name
;
}
static
const
char
*
runtime_version
()
{
return
_runtime_version
;
}
static
void
set_runtime_version
(
const
char
*
version
)
{
_runtime_version
=
version
;
}
// Convenience methods for queries on the current major/minor version
static
bool
is_jdk12x_version
()
{
return
current
().
compare_major
(
2
)
==
0
;
...
...
src/share/vm/runtime/thread.cpp
浏览文件 @
30062b49
...
...
@@ -1042,6 +1042,7 @@ static void call_initializeSystemClass(TRAPS) {
}
char
java_runtime_name
[
128
]
=
""
;
char
java_runtime_version
[
128
]
=
""
;
// extract the JRE name from sun.misc.Version.java_runtime_name
static
const
char
*
get_java_runtime_name
(
TRAPS
)
{
...
...
@@ -1064,6 +1065,27 @@ static const char* get_java_runtime_name(TRAPS) {
}
}
// extract the JRE version from sun.misc.Version.java_runtime_version
static
const
char
*
get_java_runtime_version
(
TRAPS
)
{
Klass
*
k
=
SystemDictionary
::
find
(
vmSymbols
::
sun_misc_Version
(),
Handle
(),
Handle
(),
CHECK_AND_CLEAR_NULL
);
fieldDescriptor
fd
;
bool
found
=
k
!=
NULL
&&
InstanceKlass
::
cast
(
k
)
->
find_local_field
(
vmSymbols
::
java_runtime_version_name
(),
vmSymbols
::
string_signature
(),
&
fd
);
if
(
found
)
{
oop
name_oop
=
k
->
java_mirror
()
->
obj_field
(
fd
.
offset
());
if
(
name_oop
==
NULL
)
return
NULL
;
const
char
*
name
=
java_lang_String
::
as_utf8_string
(
name_oop
,
java_runtime_version
,
sizeof
(
java_runtime_version
));
return
name
;
}
else
{
return
NULL
;
}
}
// General purpose hook into Java code, run once when the VM is initialized.
// The Java library method itself may be changed independently from the VM.
static
void
call_postVMInitHook
(
TRAPS
)
{
...
...
@@ -3473,6 +3495,7 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
// get the Java runtime name after java.lang.System is initialized
JDK_Version
::
set_runtime_name
(
get_java_runtime_name
(
THREAD
));
JDK_Version
::
set_runtime_version
(
get_java_runtime_version
(
THREAD
));
}
else
{
warning
(
"java.lang.System not initialized"
);
}
...
...
src/share/vm/utilities/vmError.cpp
浏览文件 @
30062b49
...
...
@@ -453,7 +453,9 @@ void VMError::report(outputStream* st) {
JDK_Version
::
current
().
to_string
(
buf
,
sizeof
(
buf
));
const
char
*
runtime_name
=
JDK_Version
::
runtime_name
()
!=
NULL
?
JDK_Version
::
runtime_name
()
:
""
;
st
->
print_cr
(
"# JRE version: %s (%s)"
,
runtime_name
,
buf
);
const
char
*
runtime_version
=
JDK_Version
::
runtime_version
()
!=
NULL
?
JDK_Version
::
runtime_version
()
:
""
;
st
->
print_cr
(
"# JRE version: %s (%s) (build %s)"
,
runtime_name
,
buf
,
runtime_version
);
st
->
print_cr
(
"# Java VM: %s (%s %s %s %s)"
,
Abstract_VM_Version
::
vm_name
(),
Abstract_VM_Version
::
vm_release
(),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录