Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
d788ed06
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看板
提交
d788ed06
编写于
12月 26, 2011
作者:
V
vladidan
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
563ef32e
3be48993
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
41 addition
and
9 deletion
+41
-9
src/share/vm/classfile/classFileParser.cpp
src/share/vm/classfile/classFileParser.cpp
+20
-2
src/share/vm/prims/jvmtiEnv.cpp
src/share/vm/prims/jvmtiEnv.cpp
+4
-1
src/share/vm/prims/jvmtiExport.cpp
src/share/vm/prims/jvmtiExport.cpp
+0
-2
src/share/vm/prims/jvmtiRedefineClasses.cpp
src/share/vm/prims/jvmtiRedefineClasses.cpp
+17
-4
未找到文件。
src/share/vm/classfile/classFileParser.cpp
浏览文件 @
d788ed06
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
#include "oops/methodOop.hpp"
#include "oops/methodOop.hpp"
#include "oops/symbol.hpp"
#include "oops/symbol.hpp"
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiThreadState.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/perfData.hpp"
#include "runtime/perfData.hpp"
#include "runtime/reflection.hpp"
#include "runtime/reflection.hpp"
...
@@ -2639,8 +2640,11 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
...
@@ -2639,8 +2640,11 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
TempNewSymbol
&
parsed_name
,
TempNewSymbol
&
parsed_name
,
bool
verify
,
bool
verify
,
TRAPS
)
{
TRAPS
)
{
// So that JVMTI can cache class file in the state before retransformable agents
// When a retransformable agent is attached, JVMTI caches the
// have modified it
// class bytes that existed before the first retransformation.
// If RedefineClasses() was used before the retransformable
// agent attached, then the cached class bytes may not be the
// original class bytes.
unsigned
char
*
cached_class_file_bytes
=
NULL
;
unsigned
char
*
cached_class_file_bytes
=
NULL
;
jint
cached_class_file_length
;
jint
cached_class_file_length
;
...
@@ -2660,6 +2664,20 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
...
@@ -2660,6 +2664,20 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
_max_bootstrap_specifier_index
=
-
1
;
_max_bootstrap_specifier_index
=
-
1
;
if
(
JvmtiExport
::
should_post_class_file_load_hook
())
{
if
(
JvmtiExport
::
should_post_class_file_load_hook
())
{
// Get the cached class file bytes (if any) from the
// class that is being redefined.
JvmtiThreadState
*
state
=
JvmtiThreadState
::
state_for
(
jt
);
KlassHandle
*
h_class_being_redefined
=
state
->
get_class_being_redefined
();
if
(
h_class_being_redefined
!=
NULL
)
{
instanceKlassHandle
ikh_class_being_redefined
=
instanceKlassHandle
(
THREAD
,
(
*
h_class_being_redefined
)());
cached_class_file_bytes
=
ikh_class_being_redefined
->
get_cached_class_file_bytes
();
cached_class_file_length
=
ikh_class_being_redefined
->
get_cached_class_file_len
();
}
unsigned
char
*
ptr
=
cfs
->
buffer
();
unsigned
char
*
ptr
=
cfs
->
buffer
();
unsigned
char
*
end_ptr
=
cfs
->
buffer
()
+
cfs
->
length
();
unsigned
char
*
end_ptr
=
cfs
->
buffer
()
+
cfs
->
length
();
...
...
src/share/vm/prims/jvmtiEnv.cpp
浏览文件 @
d788ed06
...
@@ -267,7 +267,10 @@ JvmtiEnv::RetransformClasses(jint class_count, const jclass* classes) {
...
@@ -267,7 +267,10 @@ JvmtiEnv::RetransformClasses(jint class_count, const jclass* classes) {
instanceKlassHandle
ikh
(
current_thread
,
k_oop
);
instanceKlassHandle
ikh
(
current_thread
,
k_oop
);
if
(
ikh
->
get_cached_class_file_bytes
()
==
NULL
)
{
if
(
ikh
->
get_cached_class_file_bytes
()
==
NULL
)
{
// not cached, we need to reconstitute the class file from VM representation
// Not cached, we need to reconstitute the class file from the
// VM representation. We don't attach the reconstituted class
// bytes to the instanceKlass here because they have not been
// validated and we're not at a safepoint.
constantPoolHandle
constants
(
current_thread
,
ikh
->
constants
());
constantPoolHandle
constants
(
current_thread
,
ikh
->
constants
());
ObjectLocker
ol
(
constants
,
current_thread
);
// lock constant pool while we query it
ObjectLocker
ol
(
constants
,
current_thread
);
// lock constant pool while we query it
...
...
src/share/vm/prims/jvmtiExport.cpp
浏览文件 @
d788ed06
...
@@ -538,8 +538,6 @@ class JvmtiClassFileLoadHookPoster : public StackObj {
...
@@ -538,8 +538,6 @@ class JvmtiClassFileLoadHookPoster : public StackObj {
_curr_env
=
NULL
;
_curr_env
=
NULL
;
_cached_length_ptr
=
cached_length_ptr
;
_cached_length_ptr
=
cached_length_ptr
;
_cached_data_ptr
=
cached_data_ptr
;
_cached_data_ptr
=
cached_data_ptr
;
*
_cached_length_ptr
=
0
;
*
_cached_data_ptr
=
NULL
;
_state
=
_thread
->
jvmti_thread_state
();
_state
=
_thread
->
jvmti_thread_state
();
if
(
_state
!=
NULL
)
{
if
(
_state
!=
NULL
)
{
...
...
src/share/vm/prims/jvmtiRedefineClasses.cpp
浏览文件 @
d788ed06
...
@@ -854,8 +854,9 @@ jvmtiError VM_RedefineClasses::load_new_class_versions(TRAPS) {
...
@@ -854,8 +854,9 @@ jvmtiError VM_RedefineClasses::load_new_class_versions(TRAPS) {
// RC_TRACE_WITH_THREAD macro has an embedded ResourceMark
// RC_TRACE_WITH_THREAD macro has an embedded ResourceMark
RC_TRACE_WITH_THREAD
(
0x00000001
,
THREAD
,
RC_TRACE_WITH_THREAD
(
0x00000001
,
THREAD
,
(
"loading name=%s (avail_mem="
UINT64_FORMAT
"K)"
,
(
"loading name=%s kind=%d (avail_mem="
UINT64_FORMAT
"K)"
,
the_class
->
external_name
(),
os
::
available_memory
()
>>
10
));
the_class
->
external_name
(),
_class_load_kind
,
os
::
available_memory
()
>>
10
));
ClassFileStream
st
((
u1
*
)
_class_defs
[
i
].
class_bytes
,
ClassFileStream
st
((
u1
*
)
_class_defs
[
i
].
class_bytes
,
_class_defs
[
i
].
class_byte_count
,
(
char
*
)
"__VM_RedefineClasses__"
);
_class_defs
[
i
].
class_byte_count
,
(
char
*
)
"__VM_RedefineClasses__"
);
...
@@ -3205,8 +3206,20 @@ void VM_RedefineClasses::redefine_single_class(jclass the_jclass,
...
@@ -3205,8 +3206,20 @@ void VM_RedefineClasses::redefine_single_class(jclass the_jclass,
// with them was cached on the scratch class, move to the_class.
// with them was cached on the scratch class, move to the_class.
// Note: we still want to do this if nothing needed caching since it
// Note: we still want to do this if nothing needed caching since it
// should get cleared in the_class too.
// should get cleared in the_class too.
the_class
->
set_cached_class_file
(
scratch_class
->
get_cached_class_file_bytes
(),
if
(
the_class
->
get_cached_class_file_bytes
()
==
0
)
{
scratch_class
->
get_cached_class_file_len
());
// the_class doesn't have a cache yet so copy it
the_class
->
set_cached_class_file
(
scratch_class
->
get_cached_class_file_bytes
(),
scratch_class
->
get_cached_class_file_len
());
}
#ifndef PRODUCT
else
{
assert
(
the_class
->
get_cached_class_file_bytes
()
==
scratch_class
->
get_cached_class_file_bytes
(),
"cache ptrs must match"
);
assert
(
the_class
->
get_cached_class_file_len
()
==
scratch_class
->
get_cached_class_file_len
(),
"cache lens must match"
);
}
#endif
// Replace inner_classes
// Replace inner_classes
typeArrayOop
old_inner_classes
=
the_class
->
inner_classes
();
typeArrayOop
old_inner_classes
=
the_class
->
inner_classes
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录