Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
22b16f3b
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看板
提交
22b16f3b
编写于
9月 13, 2013
作者:
V
vlivanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8023134: Rename VM LogFile to hotspot_pid{pid}.log (was hotspot.log)
Reviewed-by: twisti, kvn, sla
上级
bf649406
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
49 addition
and
14 deletion
+49
-14
src/share/tools/LogCompilation/README
src/share/tools/LogCompilation/README
+3
-3
src/share/vm/runtime/arguments.cpp
src/share/vm/runtime/arguments.cpp
+34
-1
src/share/vm/runtime/deoptimization.cpp
src/share/vm/runtime/deoptimization.cpp
+2
-2
src/share/vm/runtime/globals.hpp
src/share/vm/runtime/globals.hpp
+6
-5
src/share/vm/utilities/ostream.cpp
src/share/vm/utilities/ostream.cpp
+4
-3
未找到文件。
src/share/tools/LogCompilation/README
浏览文件 @
22b16f3b
...
@@ -4,9 +4,9 @@ It's main purpose is to recreate output similar to
...
@@ -4,9 +4,9 @@ It's main purpose is to recreate output similar to
requires a 1.5 JDK to build and simply typing make should build it.
requires a 1.5 JDK to build and simply typing make should build it.
It produces a jar file, logc.jar, that can be run on the
It produces a jar file, logc.jar, that can be run on the
hotspot.log
from LogCompilation output like this:
HotSpot log (by default, hotspot_pid{pid}.log)
from LogCompilation output like this:
java -jar logc.jar hotspot.log
java -jar logc.jar hotspot
_pid1234
.log
This will produce something like the normal PrintCompilation output.
This will produce something like the normal PrintCompilation output.
Adding the -i option with also report inlining like PrintInlining.
Adding the -i option with also report inlining like PrintInlining.
...
...
src/share/vm/runtime/arguments.cpp
浏览文件 @
22b16f3b
...
@@ -3337,6 +3337,33 @@ static char* get_shared_archive_path() {
...
@@ -3337,6 +3337,33 @@ static char* get_shared_archive_path() {
return
shared_archive_path
;
return
shared_archive_path
;
}
}
#ifndef PRODUCT
// Determine whether LogVMOutput should be implicitly turned on.
static
bool
use_vm_log
()
{
if
(
LogCompilation
||
!
FLAG_IS_DEFAULT
(
LogFile
)
||
PrintCompilation
||
PrintInlining
||
PrintDependencies
||
PrintNativeNMethods
||
PrintDebugInfo
||
PrintRelocations
||
PrintNMethods
||
PrintExceptionHandlers
||
PrintAssembly
||
TraceDeoptimization
||
TraceDependencies
||
(
VerifyDependencies
&&
FLAG_IS_CMDLINE
(
VerifyDependencies
)))
{
return
true
;
}
#ifdef COMPILER1
if
(
PrintC1Statistics
)
{
return
true
;
}
#endif // COMPILER1
#ifdef COMPILER2
if
(
PrintOptoAssembly
||
PrintOptoStatistics
)
{
return
true
;
}
#endif // COMPILER2
return
false
;
}
#endif // PRODUCT
// Parse entry point called from JNI_CreateJavaVM
// Parse entry point called from JNI_CreateJavaVM
jint
Arguments
::
parse
(
const
JavaVMInitArgs
*
args
)
{
jint
Arguments
::
parse
(
const
JavaVMInitArgs
*
args
)
{
...
@@ -3630,7 +3657,13 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
...
@@ -3630,7 +3657,13 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
NmethodSweepFraction
=
1
;
NmethodSweepFraction
=
1
;
}
}
}
}
#endif
if
(
!
LogVMOutput
&&
FLAG_IS_DEFAULT
(
LogVMOutput
))
{
if
(
use_vm_log
())
{
LogVMOutput
=
true
;
}
}
#endif // PRODUCT
if
(
PrintCommandLineFlags
)
{
if
(
PrintCommandLineFlags
)
{
CommandLineFlags
::
printSetFlags
(
tty
);
CommandLineFlags
::
printSetFlags
(
tty
);
...
...
src/share/vm/runtime/deoptimization.cpp
浏览文件 @
22b16f3b
...
@@ -1751,7 +1751,7 @@ int Deoptimization::trap_state_set_recompiled(int trap_state, bool z) {
...
@@ -1751,7 +1751,7 @@ int Deoptimization::trap_state_set_recompiled(int trap_state, bool z) {
else
return
trap_state
&
~
DS_RECOMPILE_BIT
;
else
return
trap_state
&
~
DS_RECOMPILE_BIT
;
}
}
//---------------------------format_trap_state---------------------------------
//---------------------------format_trap_state---------------------------------
// This is used for debugging and diagnostics, including
hotspot.log
output.
// This is used for debugging and diagnostics, including
LogFile
output.
const
char
*
Deoptimization
::
format_trap_state
(
char
*
buf
,
size_t
buflen
,
const
char
*
Deoptimization
::
format_trap_state
(
char
*
buf
,
size_t
buflen
,
int
trap_state
)
{
int
trap_state
)
{
DeoptReason
reason
=
trap_state_reason
(
trap_state
);
DeoptReason
reason
=
trap_state_reason
(
trap_state
);
...
@@ -1828,7 +1828,7 @@ const char* Deoptimization::trap_action_name(int action) {
...
@@ -1828,7 +1828,7 @@ const char* Deoptimization::trap_action_name(int action) {
return
buf
;
return
buf
;
}
}
// This is used for debugging and diagnostics, including
hotspot.log
output.
// This is used for debugging and diagnostics, including
LogFile
output.
const
char
*
Deoptimization
::
format_trap_request
(
char
*
buf
,
size_t
buflen
,
const
char
*
Deoptimization
::
format_trap_request
(
char
*
buf
,
size_t
buflen
,
int
trap_request
)
{
int
trap_request
)
{
jint
unloaded_class_index
=
trap_request_index
(
trap_request
);
jint
unloaded_class_index
=
trap_request_index
(
trap_request
);
...
...
src/share/vm/runtime/globals.hpp
浏览文件 @
22b16f3b
...
@@ -880,7 +880,7 @@ class CommandLineFlags {
...
@@ -880,7 +880,7 @@ class CommandLineFlags {
"stay alive at the expense of JVM performance") \
"stay alive at the expense of JVM performance") \
\
\
diagnostic(bool, LogCompilation, false, \
diagnostic(bool, LogCompilation, false, \
"Log compilation activity in detail to
hotspot.log or LogFile")
\
"Log compilation activity in detail to
LogFile")
\
\
\
product(bool, PrintCompilation, false, \
product(bool, PrintCompilation, false, \
"Print compilations") \
"Print compilations") \
...
@@ -2498,16 +2498,17 @@ class CommandLineFlags {
...
@@ -2498,16 +2498,17 @@ class CommandLineFlags {
"Print all VM flags with default values and descriptions and exit")\
"Print all VM flags with default values and descriptions and exit")\
\
\
diagnostic(bool, SerializeVMOutput, true, \
diagnostic(bool, SerializeVMOutput, true, \
"Use a mutex to serialize output to tty and
hotspot.log")
\
"Use a mutex to serialize output to tty and
LogFile")
\
\
\
diagnostic(bool, DisplayVMOutput, true, \
diagnostic(bool, DisplayVMOutput, true, \
"Display all VM output on the tty, independently of LogVMOutput") \
"Display all VM output on the tty, independently of LogVMOutput") \
\
\
diagnostic(bool, LogVMOutput,
trueInDebug,
\
diagnostic(bool, LogVMOutput,
false,
\
"Save VM output to
hotspot.log, or to LogFile")
\
"Save VM output to
LogFile")
\
\
\
diagnostic(ccstr, LogFile, NULL, \
diagnostic(ccstr, LogFile, NULL, \
"If LogVMOutput is on, save VM output to this file [hotspot.log]") \
"If LogVMOutput or LogCompilation is on, save VM output to " \
"this file [default: ./hotspot_pid%p.log] (%p replaced with pid)") \
\
\
product(ccstr, ErrorFile, NULL, \
product(ccstr, ErrorFile, NULL, \
"If an error occurs, save the error data to this file " \
"If an error occurs, save the error data to this file " \
...
...
src/share/vm/utilities/ostream.cpp
浏览文件 @
22b16f3b
...
@@ -592,7 +592,7 @@ static const char* make_log_name(const char* log_name, const char* force_directo
...
@@ -592,7 +592,7 @@ static const char* make_log_name(const char* log_name, const char* force_directo
void
defaultStream
::
init_log
()
{
void
defaultStream
::
init_log
()
{
// %%% Need a MutexLocker?
// %%% Need a MutexLocker?
const
char
*
log_name
=
LogFile
!=
NULL
?
LogFile
:
"hotspot.log"
;
const
char
*
log_name
=
LogFile
!=
NULL
?
LogFile
:
"hotspot
_pid%p
.log"
;
const
char
*
try_name
=
make_log_name
(
log_name
,
NULL
);
const
char
*
try_name
=
make_log_name
(
log_name
,
NULL
);
fileStream
*
file
=
new
(
ResourceObj
::
C_HEAP
,
mtInternal
)
fileStream
(
try_name
);
fileStream
*
file
=
new
(
ResourceObj
::
C_HEAP
,
mtInternal
)
fileStream
(
try_name
);
if
(
!
file
->
is_open
())
{
if
(
!
file
->
is_open
())
{
...
@@ -603,14 +603,15 @@ void defaultStream::init_log() {
...
@@ -603,14 +603,15 @@ void defaultStream::init_log() {
// Note: This feature is for maintainer use only. No need for L10N.
// Note: This feature is for maintainer use only. No need for L10N.
jio_print
(
warnbuf
);
jio_print
(
warnbuf
);
FREE_C_HEAP_ARRAY
(
char
,
try_name
,
mtInternal
);
FREE_C_HEAP_ARRAY
(
char
,
try_name
,
mtInternal
);
try_name
=
make_log_name
(
"hs_pid%p.log"
,
os
::
get_temp_directory
());
try_name
=
make_log_name
(
log_name
,
os
::
get_temp_directory
());
jio_snprintf
(
warnbuf
,
sizeof
(
warnbuf
),
jio_snprintf
(
warnbuf
,
sizeof
(
warnbuf
),
"Warning: Forcing option -XX:LogFile=%s
\n
"
,
try_name
);
"Warning: Forcing option -XX:LogFile=%s
\n
"
,
try_name
);
jio_print
(
warnbuf
);
jio_print
(
warnbuf
);
delete
file
;
delete
file
;
file
=
new
(
ResourceObj
::
C_HEAP
,
mtInternal
)
fileStream
(
try_name
);
file
=
new
(
ResourceObj
::
C_HEAP
,
mtInternal
)
fileStream
(
try_name
);
FREE_C_HEAP_ARRAY
(
char
,
try_name
,
mtInternal
);
}
}
FREE_C_HEAP_ARRAY
(
char
,
try_name
,
mtInternal
);
if
(
file
->
is_open
())
{
if
(
file
->
is_open
())
{
_log_file
=
file
;
_log_file
=
file
;
xmlStream
*
xs
=
new
(
ResourceObj
::
C_HEAP
,
mtInternal
)
xmlStream
(
file
);
xmlStream
*
xs
=
new
(
ResourceObj
::
C_HEAP
,
mtInternal
)
xmlStream
(
file
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录