Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
d17c0dfc
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看板
提交
d17c0dfc
编写于
11月 29, 2011
作者:
B
bobv
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
82cc5284
d6270254
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
50 addition
and
20 deletion
+50
-20
agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java
...src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java
+8
-4
src/share/vm/code/dependencies.cpp
src/share/vm/code/dependencies.cpp
+2
-2
src/share/vm/oops/instanceKlass.hpp
src/share/vm/oops/instanceKlass.hpp
+36
-12
src/share/vm/oops/instanceKlassKlass.cpp
src/share/vm/oops/instanceKlassKlass.cpp
+1
-1
src/share/vm/runtime/vmStructs.cpp
src/share/vm/runtime/vmStructs.cpp
+3
-1
未找到文件。
agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java
浏览文件 @
d17c0dfc
...
...
@@ -63,6 +63,8 @@ public class InstanceKlass extends Klass {
private
static
int
CLASS_STATE_FULLY_INITIALIZED
;
private
static
int
CLASS_STATE_INITIALIZATION_ERROR
;
private
static
int
IS_MARKED_DEPENDENT_MASK
;
private
static
synchronized
void
initialize
(
TypeDataBase
db
)
throws
WrongTypeException
{
Type
type
=
db
.
lookupType
(
"instanceKlass"
);
arrayKlasses
=
new
OopField
(
type
.
getOopField
(
"_array_klasses"
),
Oop
.
getHeaderSize
());
...
...
@@ -90,7 +92,7 @@ public class InstanceKlass extends Klass {
staticFieldSize
=
new
CIntField
(
type
.
getCIntegerField
(
"_static_field_size"
),
Oop
.
getHeaderSize
());
staticOopFieldCount
=
new
CIntField
(
type
.
getCIntegerField
(
"_static_oop_field_count"
),
Oop
.
getHeaderSize
());
nonstaticOopMapSize
=
new
CIntField
(
type
.
getCIntegerField
(
"_nonstatic_oop_map_size"
),
Oop
.
getHeaderSize
());
isMarkedDependent
=
new
CIntField
(
type
.
getCIntegerField
(
"_is_marked_dependent
"
),
Oop
.
getHeaderSize
());
miscFlags
=
new
CIntField
(
type
.
getCIntegerField
(
"_misc_flags
"
),
Oop
.
getHeaderSize
());
initState
=
new
CIntField
(
type
.
getCIntegerField
(
"_init_state"
),
Oop
.
getHeaderSize
());
vtableLen
=
new
CIntField
(
type
.
getCIntegerField
(
"_vtable_len"
),
Oop
.
getHeaderSize
());
itableLen
=
new
CIntField
(
type
.
getCIntegerField
(
"_itable_len"
),
Oop
.
getHeaderSize
());
...
...
@@ -118,6 +120,8 @@ public class InstanceKlass extends Klass {
CLASS_STATE_FULLY_INITIALIZED
=
db
.
lookupIntConstant
(
"instanceKlass::fully_initialized"
).
intValue
();
CLASS_STATE_INITIALIZATION_ERROR
=
db
.
lookupIntConstant
(
"instanceKlass::initialization_error"
).
intValue
();
IS_MARKED_DEPENDENT_MASK
=
db
.
lookupIntConstant
(
"instanceKlass::IS_MARKED_DEPENDENT"
).
intValue
();
}
InstanceKlass
(
OopHandle
handle
,
ObjectHeap
heap
)
{
...
...
@@ -151,7 +155,7 @@ public class InstanceKlass extends Klass {
private
static
CIntField
staticFieldSize
;
private
static
CIntField
staticOopFieldCount
;
private
static
CIntField
nonstaticOopMapSize
;
private
static
CIntField
isMarkedDependent
;
private
static
CIntField
miscFlags
;
private
static
CIntField
initState
;
private
static
CIntField
vtableLen
;
private
static
CIntField
itableLen
;
...
...
@@ -333,7 +337,7 @@ public class InstanceKlass extends Klass {
public
long
getNonstaticFieldSize
()
{
return
nonstaticFieldSize
.
getValue
(
this
);
}
public
long
getStaticOopFieldCount
()
{
return
staticOopFieldCount
.
getValue
(
this
);
}
public
long
getNonstaticOopMapSize
()
{
return
nonstaticOopMapSize
.
getValue
(
this
);
}
public
boolean
getIsMarkedDependent
()
{
return
isMarkedDependent
.
getValue
(
this
)
!=
0
;
}
public
boolean
getIsMarkedDependent
()
{
return
(
miscFlags
.
getValue
(
this
)
&
IS_MARKED_DEPENDENT_MASK
)
!=
0
;
}
public
long
getVtableLen
()
{
return
vtableLen
.
getValue
(
this
);
}
public
long
getItableLen
()
{
return
itableLen
.
getValue
(
this
);
}
public
Symbol
getGenericSignature
()
{
return
getSymbol
(
genericSignature
);
}
...
...
@@ -524,7 +528,7 @@ public class InstanceKlass extends Klass {
visitor
.
doCInt
(
staticFieldSize
,
true
);
visitor
.
doCInt
(
staticOopFieldCount
,
true
);
visitor
.
doCInt
(
nonstaticOopMapSize
,
true
);
visitor
.
doCInt
(
isMarkedDependent
,
true
);
visitor
.
doCInt
(
miscFlags
,
true
);
visitor
.
doCInt
(
initState
,
true
);
visitor
.
doCInt
(
vtableLen
,
true
);
visitor
.
doCInt
(
itableLen
,
true
);
...
...
src/share/vm/code/dependencies.cpp
浏览文件 @
d17c0dfc
...
...
@@ -1631,7 +1631,7 @@ void KlassDepChange::initialize() {
for
(
ContextStream
str
(
*
this
);
str
.
next
();
)
{
klassOop
d
=
str
.
klass
();
assert
(
!
instanceKlass
::
cast
(
d
)
->
is_marked_dependent
(),
"checking"
);
instanceKlass
::
cast
(
d
)
->
set_is_marked_dependent
(
true
);
instanceKlass
::
cast
(
d
)
->
set_is_marked_dependent
();
}
}
...
...
@@ -1640,7 +1640,7 @@ KlassDepChange::~KlassDepChange() {
// Unmark transitive interfaces
for
(
ContextStream
str
(
*
this
);
str
.
next
();
)
{
klassOop
d
=
str
.
klass
();
instanceKlass
::
cast
(
d
)
->
set_is_marked_dependent
(
false
);
instanceKlass
::
cast
(
d
)
->
clear_is_marked_dependent
(
);
}
}
...
...
src/share/vm/oops/instanceKlass.hpp
浏览文件 @
d17c0dfc
...
...
@@ -230,10 +230,7 @@ class instanceKlass: public Klass {
int
_static_oop_field_count
;
// number of static oop fields in this klass
int
_nonstatic_oop_map_size
;
// size in words of nonstatic oop map blocks
int
_java_fields_count
;
// The number of declared Java fields
bool
_is_marked_dependent
;
// used for marking during flushing and deoptimization
bool
_rewritten
;
// methods rewritten.
bool
_has_nonstatic_fields
;
// for sizing with UseCompressedOops
bool
_should_verify_class
;
// allow caching of preverification
u2
_minor_version
;
// minor version number of class file
u2
_major_version
;
// major version number of class file
ClassState
_init_state
;
// state of class
...
...
@@ -260,6 +257,19 @@ class instanceKlass: public Klass {
JvmtiCachedClassFieldMap
*
_jvmti_cached_class_field_map
;
// JVMTI: used during heap iteration
volatile
u2
_idnum_allocated_count
;
// JNI/JVMTI: increments with the addition of methods, old ids don't change
// Compact the following four boolean flags into 1-bit each. These four flags
// were defined as separate boolean fields and each was 1-byte before. Since
// there are 2 bytes unused after the _idnum_allocated_count field, place the
// _misc_flags field after _idnum_allocated_count to utilize the unused bits
// and save total 4-bytes.
enum
{
IS_MARKED_DEPENDENT
=
0x1
,
// used for marking during flushing and deoptimization
REWRITTEN
=
0x2
,
// methods rewritten.
HAS_NONSTATIC_FIELDS
=
0x4
,
// for sizing with UseCompressedOops
SHOULD_VERIFY_CLASS
=
0x8
// allow caching of preverification
};
u1
_misc_flags
;
// embedded Java vtable follows here
// embedded Java itables follows here
// embedded static fields follows here
...
...
@@ -269,8 +279,14 @@ class instanceKlass: public Klass {
friend
class
SystemDictionary
;
public:
bool
has_nonstatic_fields
()
const
{
return
_has_nonstatic_fields
;
}
void
set_has_nonstatic_fields
(
bool
b
)
{
_has_nonstatic_fields
=
b
;
}
bool
has_nonstatic_fields
()
const
{
return
(
_misc_flags
&
HAS_NONSTATIC_FIELDS
)
!=
0
;
}
void
set_has_nonstatic_fields
(
bool
b
)
{
if
(
b
)
{
_misc_flags
|=
HAS_NONSTATIC_FIELDS
;
}
else
{
_misc_flags
&=
~
HAS_NONSTATIC_FIELDS
;
}
}
// field sizes
int
nonstatic_field_size
()
const
{
return
_nonstatic_field_size
;
}
...
...
@@ -378,15 +394,23 @@ class instanceKlass: public Klass {
bool
is_in_error_state
()
const
{
return
_init_state
==
initialization_error
;
}
bool
is_reentrant_initialization
(
Thread
*
thread
)
{
return
thread
==
_init_thread
;
}
int
get_init_state
()
{
return
_init_state
;
}
// Useful for debugging
bool
is_rewritten
()
const
{
return
_rewritten
;
}
bool
is_rewritten
()
const
{
return
(
_misc_flags
&
REWRITTEN
)
!=
0
;
}
// defineClass specified verification
bool
should_verify_class
()
const
{
return
_should_verify_class
;
}
void
set_should_verify_class
(
bool
value
)
{
_should_verify_class
=
value
;
}
bool
should_verify_class
()
const
{
return
(
_misc_flags
&
SHOULD_VERIFY_CLASS
)
!=
0
;
}
void
set_should_verify_class
(
bool
value
)
{
if
(
value
)
{
_misc_flags
|=
SHOULD_VERIFY_CLASS
;
}
else
{
_misc_flags
&=
~
SHOULD_VERIFY_CLASS
;
}
}
// marking
bool
is_marked_dependent
()
const
{
return
_is_marked_dependent
;
}
void
set_is_marked_dependent
(
bool
value
)
{
_is_marked_dependent
=
value
;
}
bool
is_marked_dependent
()
const
{
return
(
_misc_flags
&
IS_MARKED_DEPENDENT
)
!=
0
;
}
void
set_is_marked_dependent
()
{
_misc_flags
|=
IS_MARKED_DEPENDENT
;
}
void
clear_is_marked_dependent
()
{
_misc_flags
&=
~
IS_MARKED_DEPENDENT
;
}
// initialization (virtuals from Klass)
bool
should_be_initialized
()
const
;
// means that initialize should be called
...
...
@@ -756,7 +780,7 @@ private:
#else
void
set_init_state
(
ClassState
state
)
{
_init_state
=
state
;
}
#endif
void
set_rewritten
()
{
_
rewritten
=
true
;
}
void
set_rewritten
()
{
_
misc_flags
|=
REWRITTEN
;
}
void
set_init_thread
(
Thread
*
thread
)
{
_init_thread
=
thread
;
}
u2
idnum_allocated_count
()
const
{
return
_idnum_allocated_count
;
}
...
...
src/share/vm/oops/instanceKlassKlass.cpp
浏览文件 @
d17c0dfc
...
...
@@ -399,7 +399,7 @@ instanceKlassKlass::allocate_instance_klass(Symbol* name, int vtable_len, int it
ik
->
set_inner_classes
(
NULL
);
ik
->
set_static_oop_field_count
(
0
);
ik
->
set_nonstatic_field_size
(
0
);
ik
->
set_is_marked_dependent
(
false
);
ik
->
clear_is_marked_dependent
(
);
ik
->
set_init_state
(
instanceKlass
::
allocated
);
ik
->
set_init_thread
(
NULL
);
ik
->
set_reference_type
(
rt
);
...
...
src/share/vm/runtime/vmStructs.cpp
浏览文件 @
d17c0dfc
...
...
@@ -307,7 +307,7 @@ static inline uint64_t cast_uint64_t(size_t x)
nonstatic_field(instanceKlass, _static_field_size, int) \
nonstatic_field(instanceKlass, _static_oop_field_count, int) \
nonstatic_field(instanceKlass, _nonstatic_oop_map_size, int) \
nonstatic_field(instanceKlass, _
is_marked_dependent, bool)
\
nonstatic_field(instanceKlass, _
misc_flags, u1)
\
nonstatic_field(instanceKlass, _minor_version, u2) \
nonstatic_field(instanceKlass, _major_version, u2) \
nonstatic_field(instanceKlass, _init_state, instanceKlass::ClassState) \
...
...
@@ -1362,6 +1362,7 @@ static inline uint64_t cast_uint64_t(size_t x)
/* The compiler thinks this is a different type than */
\
/* unsigned short on Win32 */
\
declare_unsigned_integer_type(u2) \
declare_unsigned_integer_type(u1) \
declare_unsigned_integer_type(unsigned) \
\
/*****************************/
\
...
...
@@ -2385,6 +2386,7 @@ static inline uint64_t cast_uint64_t(size_t x)
declare_constant(instanceKlass::being_initialized) \
declare_constant(instanceKlass::fully_initialized) \
declare_constant(instanceKlass::initialization_error) \
declare_constant(instanceKlass::IS_MARKED_DEPENDENT) \
\
/*********************************/
\
/* Symbol* - symbol max length */
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录