Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
14e7429d
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看板
提交
14e7429d
编写于
11月 11, 2014
作者:
V
vlivanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8060147: SIGSEGV in Metadata::mark_on_stack() while marking metadata in ciEnv
Reviewed-by: kvn, roland, coleenp, mgerdin
上级
d01c46cf
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
35 addition
and
18 deletion
+35
-18
src/share/vm/ci/ciMethod.cpp
src/share/vm/ci/ciMethod.cpp
+4
-2
src/share/vm/ci/ciMethod.hpp
src/share/vm/ci/ciMethod.hpp
+1
-1
src/share/vm/ci/ciObjectFactory.cpp
src/share/vm/ci/ciObjectFactory.cpp
+29
-14
src/share/vm/ci/ciObjectFactory.hpp
src/share/vm/ci/ciObjectFactory.hpp
+1
-1
未找到文件。
src/share/vm/ci/ciMethod.cpp
浏览文件 @
14e7429d
...
...
@@ -68,7 +68,10 @@
// ciMethod::ciMethod
//
// Loaded method.
ciMethod
::
ciMethod
(
methodHandle
h_m
)
:
ciMetadata
(
h_m
())
{
ciMethod
::
ciMethod
(
methodHandle
h_m
,
ciInstanceKlass
*
holder
)
:
ciMetadata
(
h_m
()),
_holder
(
holder
)
{
assert
(
h_m
()
!=
NULL
,
"no null method"
);
// These fields are always filled in in loaded methods.
...
...
@@ -124,7 +127,6 @@ ciMethod::ciMethod(methodHandle h_m) : ciMetadata(h_m()) {
// generating _signature may allow GC and therefore move m.
// These fields are always filled in.
_name
=
env
->
get_symbol
(
h_m
()
->
name
());
_holder
=
env
->
get_instance_klass
(
h_m
()
->
method_holder
());
ciSymbol
*
sig_symbol
=
env
->
get_symbol
(
h_m
()
->
signature
());
constantPoolHandle
cpool
=
h_m
()
->
constants
();
_signature
=
new
(
env
->
arena
())
ciSignature
(
_holder
,
cpool
,
sig_symbol
);
...
...
src/share/vm/ci/ciMethod.hpp
浏览文件 @
14e7429d
...
...
@@ -90,7 +90,7 @@ class ciMethod : public ciMetadata {
BCEscapeAnalyzer
*
_bcea
;
#endif
ciMethod
(
methodHandle
h_m
);
ciMethod
(
methodHandle
h_m
,
ciInstanceKlass
*
holder
);
ciMethod
(
ciInstanceKlass
*
holder
,
ciSymbol
*
name
,
ciSymbol
*
signature
,
ciInstanceKlass
*
accessor
);
Method
*
get_Method
()
const
{
...
...
src/share/vm/ci/ciObjectFactory.cpp
浏览文件 @
14e7429d
...
...
@@ -239,7 +239,7 @@ void ciObjectFactory::remove_symbols() {
ciObject
*
ciObjectFactory
::
get
(
oop
key
)
{
ASSERT_IN_VM
;
assert
(
key
==
NULL
||
Universe
::
heap
()
->
is_in_reserved
(
key
),
"must be"
);
assert
(
Universe
::
heap
()
->
is_in_reserved
(
key
),
"must be"
);
NonPermObject
*
&
bucket
=
find_non_perm
(
key
);
if
(
bucket
!=
NULL
)
{
...
...
@@ -260,10 +260,10 @@ ciObject* ciObjectFactory::get(oop key) {
}
// ------------------------------------------------------------------
// ciObjectFactory::get
// ciObjectFactory::get
_metadata
//
// Get the ci
Object corresponding to some oop. If the ciObject
has
// already been created, it is returned.
Otherwise, a new ciObject
// Get the ci
Metadata corresponding to some Metadata. If the ciMetadata
has
// already been created, it is returned.
Otherwise, a new ciMetadata
// is created.
ciMetadata
*
ciObjectFactory
::
get_metadata
(
Metadata
*
key
)
{
ASSERT_IN_VM
;
...
...
@@ -290,9 +290,9 @@ ciMetadata* ciObjectFactory::get_metadata(Metadata* key) {
}
#endif
if
(
!
is_found_at
(
index
,
key
,
_ci_metadata
))
{
// The ci
Object does not yet exist.
Create it and insert it
// The ci
Metadata does not yet exist.
Create it and insert it
// into the cache.
ciMetadata
*
new_object
=
create_new_
object
(
key
);
ciMetadata
*
new_object
=
create_new_
metadata
(
key
);
init_ident_of
(
new_object
);
assert
(
new_object
->
is_metadata
(),
"must be"
);
...
...
@@ -344,15 +344,28 @@ ciObject* ciObjectFactory::create_new_object(oop o) {
}
// ------------------------------------------------------------------
// ciObjectFactory::create_new_
object
// ciObjectFactory::create_new_
metadata
//
// Create a new ci
Object
from a Metadata*.
// Create a new ci
Metadata
from a Metadata*.
//
// Implementation note:
this functionality could be virtual behavior
//
of the oop itself. For now, we explicitly marshal the object
.
ciMetadata
*
ciObjectFactory
::
create_new_
object
(
Metadata
*
o
)
{
// Implementation note:
in order to keep Metadata live, an auxiliary ciObject
//
is used, which points to it's holder
.
ciMetadata
*
ciObjectFactory
::
create_new_
metadata
(
Metadata
*
o
)
{
EXCEPTION_CONTEXT
;
// Hold metadata from unloading by keeping it's holder alive.
if
(
_initialized
&&
o
->
is_klass
())
{
Klass
*
holder
=
((
Klass
*
)
o
);
if
(
holder
->
oop_is_instance
()
&&
InstanceKlass
::
cast
(
holder
)
->
is_anonymous
())
{
// Though ciInstanceKlass records class loader oop, it's not enough to keep
// VM anonymous classes alive (loader == NULL). Klass holder should be used instead.
// It is enough to record a ciObject, since cached elements are never removed
// during ciObjectFactory lifetime. ciObjectFactory itself is created for
// every compilation and lives for the whole duration of the compilation.
ciObject
*
h
=
get
(
holder
->
klass_holder
());
}
}
if
(
o
->
is_klass
())
{
KlassHandle
h_k
(
THREAD
,
(
Klass
*
)
o
);
Klass
*
k
=
(
Klass
*
)
o
;
...
...
@@ -365,14 +378,16 @@ ciMetadata* ciObjectFactory::create_new_object(Metadata* o) {
}
}
else
if
(
o
->
is_method
())
{
methodHandle
h_m
(
THREAD
,
(
Method
*
)
o
);
return
new
(
arena
())
ciMethod
(
h_m
);
ciEnv
*
env
=
CURRENT_THREAD_ENV
;
ciInstanceKlass
*
holder
=
env
->
get_instance_klass
(
h_m
()
->
method_holder
());
return
new
(
arena
())
ciMethod
(
h_m
,
holder
);
}
else
if
(
o
->
is_methodData
())
{
// Hold methodHandle alive - might not be necessary ???
methodHandle
h_m
(
THREAD
,
((
MethodData
*
)
o
)
->
method
());
return
new
(
arena
())
ciMethodData
((
MethodData
*
)
o
);
}
// The
oop
is of some type not supported by the compiler interface.
// The
Metadata*
is of some type not supported by the compiler interface.
ShouldNotReachHere
();
return
NULL
;
}
...
...
@@ -701,7 +716,7 @@ static ciObjectFactory::NonPermObject* emptyBucket = NULL;
// If there is no entry in the cache corresponding to this oop, return
// the null tail of the bucket into which the oop should be inserted.
ciObjectFactory
::
NonPermObject
*
&
ciObjectFactory
::
find_non_perm
(
oop
key
)
{
assert
(
Universe
::
heap
()
->
is_in_reserved
_or_null
(
key
),
"must be"
);
assert
(
Universe
::
heap
()
->
is_in_reserved
(
key
),
"must be"
);
ciMetadata
*
klass
=
get_metadata
(
key
->
klass
());
NonPermObject
*
*
bp
=
&
_non_perm_bucket
[(
unsigned
)
klass
->
hash
()
%
NON_PERM_BUCKETS
];
for
(
NonPermObject
*
p
;
(
p
=
(
*
bp
))
!=
NULL
;
bp
=
&
p
->
next
())
{
...
...
src/share/vm/ci/ciObjectFactory.hpp
浏览文件 @
14e7429d
...
...
@@ -73,7 +73,7 @@ private:
void
insert
(
int
index
,
ciMetadata
*
obj
,
GrowableArray
<
ciMetadata
*>*
objects
);
ciObject
*
create_new_object
(
oop
o
);
ciMetadata
*
create_new_
object
(
Metadata
*
o
);
ciMetadata
*
create_new_
metadata
(
Metadata
*
o
);
void
ensure_metadata_alive
(
ciMetadata
*
m
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录