Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
3d784467
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看板
提交
3d784467
编写于
4月 26, 2010
作者:
N
never
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6943485: JVMTI always on capabilities change code generation too much
Reviewed-by: twisti, dcubed
上级
622cef17
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
20 addition
and
54 deletion
+20
-54
src/share/vm/c1/c1_Compilation.cpp
src/share/vm/c1/c1_Compilation.cpp
+1
-3
src/share/vm/c1/c1_Compilation.hpp
src/share/vm/c1/c1_Compilation.hpp
+1
-4
src/share/vm/c1/c1_GraphBuilder.cpp
src/share/vm/c1/c1_GraphBuilder.cpp
+0
-1
src/share/vm/c1/c1_LinearScan.cpp
src/share/vm/c1/c1_LinearScan.cpp
+1
-4
src/share/vm/c1/c1_globals.hpp
src/share/vm/c1/c1_globals.hpp
+1
-4
src/share/vm/ci/bcEscapeAnalyzer.cpp
src/share/vm/ci/bcEscapeAnalyzer.cpp
+5
-2
src/share/vm/ci/ciEnv.cpp
src/share/vm/ci/ciEnv.cpp
+0
-3
src/share/vm/ci/ciEnv.hpp
src/share/vm/ci/ciEnv.hpp
+0
-2
src/share/vm/opto/c2compiler.cpp
src/share/vm/opto/c2compiler.cpp
+2
-3
src/share/vm/opto/compile.cpp
src/share/vm/opto/compile.cpp
+0
-1
src/share/vm/opto/compile.hpp
src/share/vm/opto/compile.hpp
+0
-2
src/share/vm/opto/graphKit.cpp
src/share/vm/opto/graphKit.cpp
+3
-8
src/share/vm/prims/jvmtiExport.cpp
src/share/vm/prims/jvmtiExport.cpp
+0
-1
src/share/vm/prims/jvmtiExport.hpp
src/share/vm/prims/jvmtiExport.hpp
+0
-3
src/share/vm/prims/jvmtiManageCapabilities.cpp
src/share/vm/prims/jvmtiManageCapabilities.cpp
+6
-13
未找到文件。
src/share/vm/c1/c1_Compilation.cpp
浏览文件 @
3d784467
...
...
@@ -316,7 +316,7 @@ void Compilation::install_code(int frame_size) {
implicit_exception_table
(),
compiler
(),
_env
->
comp_level
(),
needs_debug_information
()
,
true
,
has_unsafe_access
()
);
}
...
...
@@ -449,8 +449,6 @@ Compilation::Compilation(AbstractCompiler* compiler, ciEnv* env, ciMethod* metho
assert
(
_arena
==
NULL
,
"shouldn't only one instance of Compilation in existence at a time"
);
_arena
=
Thread
::
current
()
->
resource_area
();
_compilation
=
this
;
_needs_debug_information
=
_env
->
jvmti_can_examine_or_deopt_anywhere
()
||
JavaMonitorsInStackTrace
||
AlwaysEmitDebugInfo
||
DeoptimizeALot
;
_exception_info_list
=
new
ExceptionInfoList
();
_implicit_exception_table
.
set_size
(
0
);
compile_method
();
...
...
src/share/vm/c1/c1_Compilation.hpp
浏览文件 @
3d784467
/*
* Copyright 1999-20
07
Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1999-20
10
Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -70,7 +70,6 @@ class Compilation: public StackObj {
int
_max_spills
;
FrameMap
*
_frame_map
;
C1_MacroAssembler
*
_masm
;
bool
_needs_debug_information
;
bool
_has_exception_handlers
;
bool
_has_fpu_code
;
bool
_has_unsafe_access
;
...
...
@@ -117,7 +116,6 @@ class Compilation: public StackObj {
// accessors
ciEnv
*
env
()
const
{
return
_env
;
}
AbstractCompiler
*
compiler
()
const
{
return
_compiler
;
}
bool
needs_debug_information
()
const
{
return
_needs_debug_information
;
}
bool
has_exception_handlers
()
const
{
return
_has_exception_handlers
;
}
bool
has_fpu_code
()
const
{
return
_has_fpu_code
;
}
bool
has_unsafe_access
()
const
{
return
_has_unsafe_access
;
}
...
...
@@ -132,7 +130,6 @@ class Compilation: public StackObj {
CodeOffsets
*
offsets
()
{
return
&
_offsets
;
}
// setters
void
set_needs_debug_information
(
bool
f
)
{
_needs_debug_information
=
f
;
}
void
set_has_exception_handlers
(
bool
f
)
{
_has_exception_handlers
=
f
;
}
void
set_has_fpu_code
(
bool
f
)
{
_has_fpu_code
=
f
;
}
void
set_has_unsafe_access
(
bool
f
)
{
_has_unsafe_access
=
f
;
}
...
...
src/share/vm/c1/c1_GraphBuilder.cpp
浏览文件 @
3d784467
...
...
@@ -1493,7 +1493,6 @@ void GraphBuilder::access_field(Bytecodes::Code code) {
Dependencies
*
GraphBuilder
::
dependency_recorder
()
const
{
assert
(
DeoptC1
,
"need debug information"
);
compilation
()
->
set_needs_debug_information
(
true
);
return
compilation
()
->
dependency_recorder
();
}
...
...
src/share/vm/c1/c1_LinearScan.cpp
浏览文件 @
3d784467
/*
* Copyright 2005-20
09
Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2005-20
10
Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -2814,9 +2814,6 @@ IRScopeDebugInfo* LinearScan::compute_debug_info_for_scope(int op_id, IRScope* c
void
LinearScan
::
compute_debug_info
(
CodeEmitInfo
*
info
,
int
op_id
)
{
if
(
!
compilation
()
->
needs_debug_information
())
{
return
;
}
TRACE_LINEAR_SCAN
(
3
,
tty
->
print_cr
(
"creating debug information at op_id %d"
,
op_id
));
IRScope
*
innermost_scope
=
info
->
scope
();
...
...
src/share/vm/c1/c1_globals.hpp
浏览文件 @
3d784467
/*
* Copyright 2000-20
07
Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2000-20
10
Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -252,9 +252,6 @@
develop(bool, BailoutOnExceptionHandlers, false, \
"bailout of compilation for methods with exception handlers") \
\
develop(bool, AlwaysEmitDebugInfo, false, \
"always emit debug info") \
\
develop(bool, InstallMethods, true, \
"Install methods at the end of successful compilations") \
\
...
...
src/share/vm/ci/bcEscapeAnalyzer.cpp
浏览文件 @
3d784467
...
...
@@ -1408,8 +1408,11 @@ BCEscapeAnalyzer::BCEscapeAnalyzer(ciMethod* method, BCEscapeAnalyzer* parent)
}
void
BCEscapeAnalyzer
::
copy_dependencies
(
Dependencies
*
deps
)
{
if
(
!
has_dependencies
())
return
;
if
(
ciEnv
::
current
()
->
jvmti_can_hotswap_or_post_breakpoint
())
{
// Also record evol dependencies so redefinition of the
// callee will trigger recompilation.
deps
->
assert_evol_method
(
method
());
}
for
(
int
i
=
0
;
i
<
_dependencies
.
length
();
i
+=
2
)
{
ciKlass
*
k
=
_dependencies
[
i
]
->
as_klass
();
ciMethod
*
m
=
_dependencies
[
i
+
1
]
->
as_method
();
...
...
src/share/vm/ci/ciEnv.cpp
浏览文件 @
3d784467
...
...
@@ -176,7 +176,6 @@ void ciEnv::cache_jvmti_state() {
// Get Jvmti capabilities under lock to get consistant values.
MutexLocker
mu
(
JvmtiThreadState_lock
);
_jvmti_can_hotswap_or_post_breakpoint
=
JvmtiExport
::
can_hotswap_or_post_breakpoint
();
_jvmti_can_examine_or_deopt_anywhere
=
JvmtiExport
::
can_examine_or_deopt_anywhere
();
_jvmti_can_access_local_variables
=
JvmtiExport
::
can_access_local_variables
();
_jvmti_can_post_on_exceptions
=
JvmtiExport
::
can_post_on_exceptions
();
}
...
...
@@ -887,8 +886,6 @@ void ciEnv::register_method(ciMethod* target,
if
(
!
failing
()
&&
(
(
!
jvmti_can_hotswap_or_post_breakpoint
()
&&
JvmtiExport
::
can_hotswap_or_post_breakpoint
())
||
(
!
jvmti_can_examine_or_deopt_anywhere
()
&&
JvmtiExport
::
can_examine_or_deopt_anywhere
())
||
(
!
jvmti_can_access_local_variables
()
&&
JvmtiExport
::
can_access_local_variables
())
||
(
!
jvmti_can_post_on_exceptions
()
&&
...
...
src/share/vm/ci/ciEnv.hpp
浏览文件 @
3d784467
...
...
@@ -55,7 +55,6 @@ private:
// Cache Jvmti state
bool
_jvmti_can_hotswap_or_post_breakpoint
;
bool
_jvmti_can_examine_or_deopt_anywhere
;
bool
_jvmti_can_access_local_variables
;
bool
_jvmti_can_post_on_exceptions
;
...
...
@@ -257,7 +256,6 @@ public:
// Cache Jvmti state
void
cache_jvmti_state
();
bool
jvmti_can_hotswap_or_post_breakpoint
()
const
{
return
_jvmti_can_hotswap_or_post_breakpoint
;
}
bool
jvmti_can_examine_or_deopt_anywhere
()
const
{
return
_jvmti_can_examine_or_deopt_anywhere
;
}
bool
jvmti_can_access_local_variables
()
const
{
return
_jvmti_can_access_local_variables
;
}
bool
jvmti_can_post_on_exceptions
()
const
{
return
_jvmti_can_post_on_exceptions
;
}
...
...
src/share/vm/opto/c2compiler.cpp
浏览文件 @
3d784467
/*
* Copyright 1999-20
09
Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1999-20
10
Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -105,8 +105,7 @@ void C2Compiler::compile_method(ciEnv* env,
}
bool
subsume_loads
=
true
;
bool
do_escape_analysis
=
DoEscapeAnalysis
&&
!
(
env
->
jvmti_can_hotswap_or_post_breakpoint
()
||
env
->
jvmti_can_examine_or_deopt_anywhere
());
!
env
->
jvmti_can_access_local_variables
();
while
(
!
env
->
failing
())
{
// Attempt to compile while subsuming loads into machine instructions.
Compile
C
(
env
,
this
,
target
,
entry_bci
,
subsume_loads
,
do_escape_analysis
);
...
...
src/share/vm/opto/compile.cpp
浏览文件 @
3d784467
...
...
@@ -871,7 +871,6 @@ void Compile::Init(int aliaslevel) {
set_has_split_ifs
(
false
);
set_has_loops
(
has_method
()
&&
method
()
->
has_loops
());
// first approximation
set_has_stringbuilder
(
false
);
_deopt_happens
=
true
;
// start out assuming the worst
_trap_can_recompile
=
false
;
// no traps emitted yet
_major_progress
=
true
;
// start out assuming good things will happen
set_has_unsafe_access
(
false
);
...
...
src/share/vm/opto/compile.hpp
浏览文件 @
3d784467
...
...
@@ -146,7 +146,6 @@ class Compile : public Phase {
int
_orig_pc_slot_offset_in_bytes
;
int
_major_progress
;
// Count of something big happening
bool
_deopt_happens
;
// TRUE if de-optimization CAN happen
bool
_has_loops
;
// True if the method _may_ have some loops
bool
_has_split_ifs
;
// True if the method _may_ have some split-if
bool
_has_unsafe_access
;
// True if the method _may_ produce faults in unsafe loads or stores.
...
...
@@ -300,7 +299,6 @@ class Compile : public Phase {
void
set_freq_inline_size
(
int
n
)
{
_freq_inline_size
=
n
;
}
int
freq_inline_size
()
const
{
return
_freq_inline_size
;
}
void
set_max_inline_size
(
int
n
)
{
_max_inline_size
=
n
;
}
bool
deopt_happens
()
const
{
return
_deopt_happens
;
}
bool
has_loops
()
const
{
return
_has_loops
;
}
void
set_has_loops
(
bool
z
)
{
_has_loops
=
z
;
}
bool
has_split_ifs
()
const
{
return
_has_split_ifs
;
}
...
...
src/share/vm/opto/graphKit.cpp
浏览文件 @
3d784467
...
...
@@ -812,10 +812,6 @@ void GraphKit::add_safepoint_edges(SafePointNode* call, bool must_throw) {
JVMState
*
youngest_jvms
=
sync_jvms
();
// Do we need debug info here? If it is a SafePoint and this method
// cannot de-opt, then we do NOT need any debug info.
bool
full_info
=
(
C
->
deopt_happens
()
||
call
->
Opcode
()
!=
Op_SafePoint
);
// If we are guaranteed to throw, we can prune everything but the
// input to the current bytecode.
bool
can_prune_locals
=
false
;
...
...
@@ -829,10 +825,9 @@ void GraphKit::add_safepoint_edges(SafePointNode* call, bool must_throw) {
}
}
if
(
env
()
->
jvmti_can_
examine_or_deopt_anywhere
())
{
if
(
env
()
->
jvmti_can_
access_local_variables
())
{
// At any safepoint, this method can get breakpointed, which would
// then require an immediate deoptimization.
full_info
=
true
;
can_prune_locals
=
false
;
// do not prune locals
stack_slots_not_pruned
=
0
;
}
...
...
@@ -890,7 +885,7 @@ void GraphKit::add_safepoint_edges(SafePointNode* call, bool must_throw) {
k
=
in_jvms
->
locoff
();
l
=
in_jvms
->
loc_size
();
out_jvms
->
set_locoff
(
p
);
if
(
full_info
&&
!
can_prune_locals
)
{
if
(
!
can_prune_locals
)
{
for
(
j
=
0
;
j
<
l
;
j
++
)
call
->
set_req
(
p
++
,
in_map
->
in
(
k
+
j
));
}
else
{
...
...
@@ -901,7 +896,7 @@ void GraphKit::add_safepoint_edges(SafePointNode* call, bool must_throw) {
k
=
in_jvms
->
stkoff
();
l
=
in_jvms
->
sp
();
out_jvms
->
set_stkoff
(
p
);
if
(
full_info
&&
!
can_prune_locals
)
{
if
(
!
can_prune_locals
)
{
for
(
j
=
0
;
j
<
l
;
j
++
)
call
->
set_req
(
p
++
,
in_map
->
in
(
k
+
j
));
}
else
if
(
can_prune_locals
&&
stack_slots_not_pruned
!=
0
)
{
...
...
src/share/vm/prims/jvmtiExport.cpp
浏览文件 @
3d784467
...
...
@@ -270,7 +270,6 @@ int JvmtiExport::_field_access_count = 0;
int
JvmtiExport
::
_field_modification_count
=
0
;
bool
JvmtiExport
::
_can_access_local_variables
=
false
;
bool
JvmtiExport
::
_can_examine_or_deopt_anywhere
=
false
;
bool
JvmtiExport
::
_can_hotswap_or_post_breakpoint
=
false
;
bool
JvmtiExport
::
_can_modify_any_class
=
false
;
bool
JvmtiExport
::
_can_walk_any_space
=
false
;
...
...
src/share/vm/prims/jvmtiExport.hpp
浏览文件 @
3d784467
...
...
@@ -58,7 +58,6 @@ class JvmtiExport : public AllStatic {
static
int
_field_modification_count
;
static
bool
_can_access_local_variables
;
static
bool
_can_examine_or_deopt_anywhere
;
static
bool
_can_hotswap_or_post_breakpoint
;
static
bool
_can_modify_any_class
;
static
bool
_can_walk_any_space
;
...
...
@@ -112,7 +111,6 @@ class JvmtiExport : public AllStatic {
// these should only be called by the friend class
friend
class
JvmtiManageCapabilities
;
inline
static
void
set_can_examine_or_deopt_anywhere
(
bool
on
)
{
_can_examine_or_deopt_anywhere
=
(
on
!=
0
);
}
inline
static
void
set_can_modify_any_class
(
bool
on
)
{
_can_modify_any_class
=
(
on
!=
0
);
}
inline
static
void
set_can_access_local_variables
(
bool
on
)
{
_can_access_local_variables
=
(
on
!=
0
);
}
inline
static
void
set_can_hotswap_or_post_breakpoint
(
bool
on
)
{
_can_hotswap_or_post_breakpoint
=
(
on
!=
0
);
}
...
...
@@ -220,7 +218,6 @@ class JvmtiExport : public AllStatic {
static
void
enter_live_phase
();
// ------ can_* conditions (below) are set at OnLoad and never changed ------------
inline
static
bool
can_examine_or_deopt_anywhere
()
{
return
_can_examine_or_deopt_anywhere
;
}
inline
static
bool
can_modify_any_class
()
{
return
_can_modify_any_class
;
}
inline
static
bool
can_access_local_variables
()
{
return
_can_access_local_variables
;
}
inline
static
bool
can_hotswap_or_post_breakpoint
()
{
return
_can_hotswap_or_post_breakpoint
;
}
...
...
src/share/vm/prims/jvmtiManageCapabilities.cpp
浏览文件 @
3d784467
...
...
@@ -332,16 +332,6 @@ void JvmtiManageCapabilities::update() {
}
JvmtiExport
::
set_can_get_source_debug_extension
(
avail
.
can_get_source_debug_extension
);
JvmtiExport
::
set_can_examine_or_deopt_anywhere
(
avail
.
can_generate_breakpoint_events
||
interp_events
||
avail
.
can_redefine_classes
||
avail
.
can_retransform_classes
||
avail
.
can_access_local_variables
||
avail
.
can_get_owned_monitor_info
||
avail
.
can_get_current_contended_monitor
||
avail
.
can_get_monitor_info
||
avail
.
can_get_owned_monitor_stack_depth_info
);
JvmtiExport
::
set_can_maintain_original_method_order
(
avail
.
can_maintain_original_method_order
);
JvmtiExport
::
set_can_post_interpreter_events
(
interp_events
);
JvmtiExport
::
set_can_hotswap_or_post_breakpoint
(
...
...
@@ -353,10 +343,13 @@ void JvmtiManageCapabilities::update() {
avail
.
can_generate_all_class_hook_events
);
JvmtiExport
::
set_can_walk_any_space
(
avail
.
can_tag_objects
);
// disable sharing in onload phase
// This controls whether the compilers keep extra locals live to
// improve the debugging experience so only set them if the selected
// capabilities look like a debugger.
JvmtiExport
::
set_can_access_local_variables
(
avail
.
can_access_local_variables
||
avail
.
can_
redefine_classe
s
||
avail
.
can_
retransform_classe
s
);
avail
.
can_access_local_variables
||
avail
.
can_
generate_breakpoint_event
s
||
avail
.
can_
generate_frame_pop_event
s
);
JvmtiExport
::
set_can_post_on_exceptions
(
avail
.
can_generate_exception_events
||
avail
.
can_generate_frame_pop_events
||
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录