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,14 +4,14 @@ It's main purpose is to recreate output similar to
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
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.
Adding the -i option with also report inlining like PrintInlining.
More information about the LogCompilation output can be found at
More information about the LogCompilation output can be found at
https://wikis.oracle.com/display/HotSpotInternals/LogCompilation+overview
https://wikis.oracle.com/display/HotSpotInternals/PrintCompilation
...
...
src/share/vm/runtime/arguments.cpp
浏览文件 @
22b16f3b
...
...
@@ -3337,6 +3337,33 @@ static char* get_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
jint
Arguments
::
parse
(
const
JavaVMInitArgs
*
args
)
{
...
...
@@ -3630,7 +3657,13 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
NmethodSweepFraction
=
1
;
}
}
#endif
if
(
!
LogVMOutput
&&
FLAG_IS_DEFAULT
(
LogVMOutput
))
{
if
(
use_vm_log
())
{
LogVMOutput
=
true
;
}
}
#endif // PRODUCT
if
(
PrintCommandLineFlags
)
{
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) {
else
return
trap_state
&
~
DS_RECOMPILE_BIT
;
}
//---------------------------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
,
int
trap_state
)
{
DeoptReason
reason
=
trap_state_reason
(
trap_state
);
...
...
@@ -1828,7 +1828,7 @@ const char* Deoptimization::trap_action_name(int action) {
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
,
int
trap_request
)
{
jint
unloaded_class_index
=
trap_request_index
(
trap_request
);
...
...
src/share/vm/runtime/globals.hpp
浏览文件 @
22b16f3b
...
...
@@ -880,7 +880,7 @@ class CommandLineFlags {
"stay alive at the expense of JVM performance") \
\
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, \
"Print compilations") \
...
...
@@ -2498,16 +2498,17 @@ class CommandLineFlags {
"Print all VM flags with default values and descriptions and exit")\
\
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, \
"Display all VM output on the tty, independently of LogVMOutput") \
\
diagnostic(bool, LogVMOutput,
trueInDebug,
\
"Save VM output to
hotspot.log, or to LogFile")
\
diagnostic(bool, LogVMOutput,
false,
\
"Save VM output to
LogFile")
\
\
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, \
"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
void
defaultStream
::
init_log
()
{
// %%% 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
);
fileStream
*
file
=
new
(
ResourceObj
::
C_HEAP
,
mtInternal
)
fileStream
(
try_name
);
if
(
!
file
->
is_open
())
{
...
...
@@ -603,14 +603,15 @@ void defaultStream::init_log() {
// Note: This feature is for maintainer use only. No need for L10N.
jio_print
(
warnbuf
);
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
),
"Warning: Forcing option -XX:LogFile=%s
\n
"
,
try_name
);
jio_print
(
warnbuf
);
delete
file
;
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
())
{
_log_file
=
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录