Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
5c338a14
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5c338a14
编写于
12月 14, 2012
作者:
C
coleenp
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
a372426a
c5c01391
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
28 addition
and
44 deletion
+28
-44
src/share/vm/asm/codeBuffer.cpp
src/share/vm/asm/codeBuffer.cpp
+2
-14
src/share/vm/classfile/classLoaderData.cpp
src/share/vm/classfile/classLoaderData.cpp
+8
-16
src/share/vm/classfile/classLoaderData.hpp
src/share/vm/classfile/classLoaderData.hpp
+4
-3
src/share/vm/compiler/compileBroker.cpp
src/share/vm/compiler/compileBroker.cpp
+2
-7
src/share/vm/oops/instanceKlass.hpp
src/share/vm/oops/instanceKlass.hpp
+6
-0
src/share/vm/oops/klass.hpp
src/share/vm/oops/klass.hpp
+2
-0
src/share/vm/opto/library_call.cpp
src/share/vm/opto/library_call.cpp
+4
-4
未找到文件。
src/share/vm/asm/codeBuffer.cpp
浏览文件 @
5c338a14
...
...
@@ -496,21 +496,9 @@ void CodeBuffer::compute_final_layout(CodeBuffer* dest) const {
dest
->
verify_section_allocation
();
}
// Anonymous classes need mirror to keep the metadata alive but
// for regular classes, the class_loader is sufficient.
// Append an oop reference that keeps the class alive.
static
void
append_oop_references
(
GrowableArray
<
oop
>*
oops
,
Klass
*
k
)
{
if
(
k
->
oop_is_instance
())
{
InstanceKlass
*
ik
=
InstanceKlass
::
cast
(
k
);
if
(
ik
->
is_anonymous
())
{
oop
o
=
ik
->
java_mirror
();
assert
(
o
!=
NULL
,
"should have a mirror"
);
if
(
!
oops
->
contains
(
o
))
{
oops
->
append
(
o
);
}
return
;
// only need the mirror
}
}
oop
cl
=
k
->
class_loader
();
oop
cl
=
k
->
klass_holder
();
if
(
cl
!=
NULL
&&
!
oops
->
contains
(
cl
))
{
oops
->
append
(
cl
);
}
...
...
src/share/vm/classfile/classLoaderData.cpp
浏览文件 @
5c338a14
...
...
@@ -64,8 +64,10 @@
ClassLoaderData
*
ClassLoaderData
::
_the_null_class_loader_data
=
NULL
;
ClassLoaderData
::
ClassLoaderData
(
Handle
h_class_loader
)
:
_class_loader
(
h_class_loader
()),
_metaspace
(
NULL
),
_unloading
(
false
),
_keep_alive
(
false
),
_klasses
(
NULL
),
ClassLoaderData
::
ClassLoaderData
(
Handle
h_class_loader
,
bool
is_anonymous
)
:
_class_loader
(
h_class_loader
()),
_is_anonymous
(
is_anonymous
),
_keep_alive
(
is_anonymous
),
// initially
_metaspace
(
NULL
),
_unloading
(
false
),
_klasses
(
NULL
),
_claimed
(
0
),
_jmethod_ids
(
NULL
),
_handles
(
NULL
),
_deallocate_list
(
NULL
),
_next
(
NULL
),
_dependencies
(
NULL
),
_metaspace_lock
(
new
Mutex
(
Monitor
::
leaf
+
1
,
"Metaspace allocation lock"
,
true
))
{
...
...
@@ -257,13 +259,6 @@ void ClassLoaderData::remove_class(Klass* scratch_class) {
ShouldNotReachHere
();
// should have found this class!!
}
bool
ClassLoaderData
::
is_anonymous
()
const
{
Klass
*
k
=
_klasses
;
return
(
_keep_alive
||
(
k
!=
NULL
&&
k
->
oop_is_instance
()
&&
InstanceKlass
::
cast
(
k
)
->
is_anonymous
()));
}
void
ClassLoaderData
::
unload
()
{
_unloading
=
true
;
...
...
@@ -396,8 +391,7 @@ void ClassLoaderData::free_deallocate_list() {
// These anonymous class loaders are to contain classes used for JSR292
ClassLoaderData
*
ClassLoaderData
::
anonymous_class_loader_data
(
oop
loader
,
TRAPS
)
{
// Add a new class loader data to the graph.
ClassLoaderData
*
cld
=
ClassLoaderDataGraph
::
add
(
NULL
,
loader
,
CHECK_NULL
);
return
cld
;
return
ClassLoaderDataGraph
::
add
(
NULL
,
loader
,
CHECK_NULL
);
}
const
char
*
ClassLoaderData
::
loader_name
()
{
...
...
@@ -475,7 +469,9 @@ ClassLoaderData* ClassLoaderDataGraph::add(ClassLoaderData** cld_addr, Handle lo
// Create one.
ClassLoaderData
*
*
list_head
=
&
_head
;
ClassLoaderData
*
next
=
_head
;
ClassLoaderData
*
cld
=
new
ClassLoaderData
(
loader
);
bool
is_anonymous
=
(
cld_addr
==
NULL
);
ClassLoaderData
*
cld
=
new
ClassLoaderData
(
loader
,
is_anonymous
);
if
(
cld_addr
!=
NULL
)
{
// First, Atomically set it
...
...
@@ -485,10 +481,6 @@ ClassLoaderData* ClassLoaderDataGraph::add(ClassLoaderData** cld_addr, Handle lo
// Returns the data.
return
old
;
}
}
else
{
// Disallow unloading for this CLD during initialization if there is no
// class_loader oop to link this to.
cld
->
set_keep_alive
(
true
);
}
// We won the race, and therefore the task of adding the data to the list of
...
...
src/share/vm/classfile/classLoaderData.hpp
浏览文件 @
5c338a14
...
...
@@ -109,6 +109,7 @@ class ClassLoaderData : public CHeapObj<mtClass> {
Mutex
*
_metaspace_lock
;
// Locks the metaspace for allocations and setup.
bool
_unloading
;
// true if this class loader goes away
bool
_keep_alive
;
// if this CLD can be unloaded for anonymous loaders
bool
_is_anonymous
;
// if this CLD is for an anonymous class
volatile
int
_claimed
;
// true if claimed, for example during GC traces.
// To avoid applying oop closure more than once.
// Has to be an int because we cas it.
...
...
@@ -139,7 +140,7 @@ class ClassLoaderData : public CHeapObj<mtClass> {
void
set_next
(
ClassLoaderData
*
next
)
{
_next
=
next
;
}
ClassLoaderData
*
next
()
const
{
return
_next
;
}
ClassLoaderData
(
Handle
h_class_loader
);
ClassLoaderData
(
Handle
h_class_loader
,
bool
is_anonymous
);
~
ClassLoaderData
();
void
set_metaspace
(
Metaspace
*
m
)
{
_metaspace
=
m
;
}
...
...
@@ -174,12 +175,12 @@ class ClassLoaderData : public CHeapObj<mtClass> {
return
_the_null_class_loader_data
;
}
bool
is_anonymous
()
const
;
bool
is_anonymous
()
const
{
return
_is_anonymous
;
}
static
void
init_null_class_loader_data
()
{
assert
(
_the_null_class_loader_data
==
NULL
,
"cannot initialize twice"
);
assert
(
ClassLoaderDataGraph
::
_head
==
NULL
,
"cannot initialize twice"
);
_the_null_class_loader_data
=
new
ClassLoaderData
((
oop
)
NULL
);
_the_null_class_loader_data
=
new
ClassLoaderData
((
oop
)
NULL
,
false
);
ClassLoaderDataGraph
::
_head
=
_the_null_class_loader_data
;
assert
(
_the_null_class_loader_data
->
is_the_null_class_loader_data
(),
"Must be"
);
if
(
DumpSharedSpaces
)
{
...
...
src/share/vm/compiler/compileBroker.cpp
浏览文件 @
5c338a14
...
...
@@ -269,12 +269,10 @@ void CompileTask::initialize(int compile_id,
const
char
*
comment
,
bool
is_blocking
)
{
assert
(
!
_lock
->
is_locked
(),
"bad locking"
);
InstanceKlass
*
holder
=
method
->
method_holder
();
_compile_id
=
compile_id
;
_method
=
method
();
_method_holder
=
JNIHandles
::
make_global
(
holder
->
is_anonymous
()
?
holder
->
java_mirror
()
:
holder
->
class_loader
());
_method_holder
=
JNIHandles
::
make_global
(
method
->
method_holder
()
->
klass_holder
());
_osr_bci
=
osr_bci
;
_is_blocking
=
is_blocking
;
_comp_level
=
comp_level
;
...
...
@@ -298,10 +296,7 @@ void CompileTask::initialize(int compile_id,
}
else
{
_hot_method
=
hot_method
();
// only add loader or mirror if different from _method_holder
InstanceKlass
*
hot_holder
=
hot_method
->
method_holder
();
_hot_method_holder
=
JNIHandles
::
make_global
(
hot_holder
->
is_anonymous
()
?
hot_holder
->
java_mirror
()
:
hot_holder
->
class_loader
());
_hot_method_holder
=
JNIHandles
::
make_global
(
hot_method
->
method_holder
()
->
klass_holder
());
}
}
}
...
...
src/share/vm/oops/instanceKlass.hpp
浏览文件 @
5c338a14
...
...
@@ -538,6 +538,12 @@ class InstanceKlass: public Klass {
}
}
// Oop that keeps the metadata for this class from being unloaded
// in places where the metadata is stored in other places, like nmethods
oop
klass_holder
()
const
{
return
is_anonymous
()
?
java_mirror
()
:
class_loader
();
}
// signers
objArrayOop
signers
()
const
{
return
_signers
;
}
void
set_signers
(
objArrayOop
s
)
{
klass_oop_store
((
oop
*
)
&
_signers
,
s
);
}
...
...
src/share/vm/oops/klass.hpp
浏览文件 @
5c338a14
...
...
@@ -451,6 +451,8 @@ class Klass : public Metadata {
oop
class_loader
()
const
;
virtual
oop
klass_holder
()
const
{
return
class_loader
();
}
protected:
virtual
Klass
*
array_klass_impl
(
bool
or_null
,
int
rank
,
TRAPS
);
virtual
Klass
*
array_klass_impl
(
bool
or_null
,
TRAPS
);
...
...
src/share/vm/opto/library_call.cpp
浏览文件 @
5c338a14
...
...
@@ -412,16 +412,16 @@ CallGenerator* Compile::make_vm_intrinsic(ciMethod* m, bool is_virtual) {
break
;
case
vmIntrinsics
::
_reverseBytes_c
:
if
(
!
Matcher
::
match_rule_supported
(
Op_ReverseBytesUS
))
return
false
;
if
(
!
Matcher
::
match_rule_supported
(
Op_ReverseBytesUS
))
return
NULL
;
break
;
case
vmIntrinsics
::
_reverseBytes_s
:
if
(
!
Matcher
::
match_rule_supported
(
Op_ReverseBytesS
))
return
false
;
if
(
!
Matcher
::
match_rule_supported
(
Op_ReverseBytesS
))
return
NULL
;
break
;
case
vmIntrinsics
::
_reverseBytes_i
:
if
(
!
Matcher
::
match_rule_supported
(
Op_ReverseBytesI
))
return
false
;
if
(
!
Matcher
::
match_rule_supported
(
Op_ReverseBytesI
))
return
NULL
;
break
;
case
vmIntrinsics
::
_reverseBytes_l
:
if
(
!
Matcher
::
match_rule_supported
(
Op_ReverseBytesL
))
return
false
;
if
(
!
Matcher
::
match_rule_supported
(
Op_ReverseBytesL
))
return
NULL
;
break
;
case
vmIntrinsics
::
_Reference_get
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录