Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
b8a89a9f
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看板
提交
b8a89a9f
编写于
3月 07, 2011
作者:
A
acorn
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
b1b3a630
a7d413b7
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
65 addition
and
15 deletion
+65
-15
src/share/vm/classfile/classFileParser.cpp
src/share/vm/classfile/classFileParser.cpp
+7
-2
src/share/vm/oops/constantPoolOop.cpp
src/share/vm/oops/constantPoolOop.cpp
+17
-4
src/share/vm/oops/instanceKlass.cpp
src/share/vm/oops/instanceKlass.cpp
+6
-1
src/share/vm/oops/klassVtable.cpp
src/share/vm/oops/klassVtable.cpp
+3
-3
src/share/vm/oops/methodDataOop.hpp
src/share/vm/oops/methodDataOop.hpp
+1
-1
src/share/vm/oops/methodOop.cpp
src/share/vm/oops/methodOop.cpp
+14
-1
src/share/vm/oops/methodOop.hpp
src/share/vm/oops/methodOop.hpp
+7
-0
src/share/vm/prims/jvmtiRedefineClasses.cpp
src/share/vm/prims/jvmtiRedefineClasses.cpp
+3
-0
src/share/vm/runtime/arguments.cpp
src/share/vm/runtime/arguments.cpp
+5
-1
src/share/vm/runtime/os.cpp
src/share/vm/runtime/os.cpp
+2
-2
未找到文件。
src/share/vm/classfile/classFileParser.cpp
浏览文件 @
b8a89a9f
...
...
@@ -1616,8 +1616,13 @@ methodHandle ClassFileParser::parse_method(constantPoolHandle cp, bool is_interf
AccessFlags
access_flags
;
if
(
name
==
vmSymbols
::
class_initializer_name
())
{
// We ignore the access flags for a class initializer. (JVM Spec. p. 116)
flags
=
JVM_ACC_STATIC
;
// We ignore the other access flags for a valid class initializer.
// (JVM Spec 2nd ed., chapter 4.6)
if
(
_major_version
<
51
)
{
// backward compatibility
flags
=
JVM_ACC_STATIC
;
}
else
if
((
flags
&
JVM_ACC_STATIC
)
==
JVM_ACC_STATIC
)
{
flags
&=
JVM_ACC_STATIC
|
JVM_ACC_STRICT
;
}
}
else
{
verify_legal_method_modifiers
(
flags
,
is_interface
,
name
,
CHECK_
(
nullHandle
));
}
...
...
src/share/vm/oops/constantPoolOop.cpp
浏览文件 @
b8a89a9f
...
...
@@ -1175,8 +1175,15 @@ void constantPoolOopDesc::copy_entry_to(constantPoolHandle from_cp, int from_i,
case
JVM_CONSTANT_UnresolvedClass
:
{
Symbol
*
k
=
from_cp
->
unresolved_klass_at
(
from_i
);
to_cp
->
unresolved_klass_at_put
(
to_i
,
k
);
// Can be resolved after checking tag, so check the slot first.
CPSlot
entry
=
from_cp
->
slot_at
(
from_i
);
if
(
entry
.
is_oop
())
{
assert
(
entry
.
get_oop
()
->
is_klass
(),
"must be"
);
// Already resolved
to_cp
->
klass_at_put
(
to_i
,
(
klassOop
)
entry
.
get_oop
());
}
else
{
to_cp
->
unresolved_klass_at_put
(
to_i
,
entry
.
get_symbol
());
}
}
break
;
case
JVM_CONSTANT_UnresolvedClassInError
:
...
...
@@ -1189,8 +1196,14 @@ void constantPoolOopDesc::copy_entry_to(constantPoolHandle from_cp, int from_i,
case
JVM_CONSTANT_UnresolvedString
:
{
Symbol
*
s
=
from_cp
->
unresolved_string_at
(
from_i
);
to_cp
->
unresolved_string_at_put
(
to_i
,
s
);
// Can be resolved after checking tag, so check the slot first.
CPSlot
entry
=
from_cp
->
slot_at
(
from_i
);
if
(
entry
.
is_oop
())
{
// Already resolved (either string or pseudo-string)
to_cp
->
string_at_put
(
to_i
,
entry
.
get_oop
());
}
else
{
to_cp
->
unresolved_string_at_put
(
to_i
,
entry
.
get_symbol
());
}
}
break
;
case
JVM_CONSTANT_Utf8
:
...
...
src/share/vm/oops/instanceKlass.cpp
浏览文件 @
b8a89a9f
...
...
@@ -735,7 +735,12 @@ void instanceKlass::call_class_initializer(TRAPS) {
static
int
call_class_initializer_impl_counter
=
0
;
// for debugging
methodOop
instanceKlass
::
class_initializer
()
{
return
find_method
(
vmSymbols
::
class_initializer_name
(),
vmSymbols
::
void_method_signature
());
methodOop
clinit
=
find_method
(
vmSymbols
::
class_initializer_name
(),
vmSymbols
::
void_method_signature
());
if
(
clinit
!=
NULL
&&
clinit
->
has_valid_initializer_flags
())
{
return
clinit
;
}
return
NULL
;
}
void
instanceKlass
::
call_class_initializer_impl
(
instanceKlassHandle
this_oop
,
TRAPS
)
{
...
...
src/share/vm/oops/klassVtable.cpp
浏览文件 @
b8a89a9f
...
...
@@ -883,7 +883,7 @@ void klassItable::initialize_itable_for_interface(int method_table_offset, Klass
int
ime_num
=
0
;
// Skip first methodOop if it is a class initializer
int
i
=
((
methodOop
)
methods
()
->
obj_at
(
0
))
->
name
()
!=
vmSymbols
::
class_initializer_name
()
?
0
:
1
;
int
i
=
((
methodOop
)
methods
()
->
obj_at
(
0
))
->
is_static_initializer
()
?
1
:
0
;
// m, method_name, method_signature, klass reset each loop so they
// don't need preserving across check_signature_loaders call
...
...
@@ -1121,7 +1121,7 @@ int klassItable::compute_itable_index(methodOop m) {
assert
(
index
<
methods
->
length
(),
"should find index for resolve_invoke"
);
}
// Adjust for <clinit>, which is left out of table if first method
if
(
methods
->
length
()
>
0
&&
((
methodOop
)
methods
->
obj_at
(
0
))
->
name
()
==
vmSymbols
::
class_initializer_name
())
{
if
(
methods
->
length
()
>
0
&&
((
methodOop
)
methods
->
obj_at
(
0
))
->
is_static_initializer
())
{
index
--
;
}
return
index
;
...
...
@@ -1135,7 +1135,7 @@ methodOop klassItable::method_for_itable_index(klassOop intf, int itable_index)
int
index
=
itable_index
;
// Adjust for <clinit>, which is left out of table if first method
if
(
methods
->
length
()
>
0
&&
((
methodOop
)
methods
->
obj_at
(
0
))
->
name
()
==
vmSymbols
::
class_initializer_name
())
{
if
(
methods
->
length
()
>
0
&&
((
methodOop
)
methods
->
obj_at
(
0
))
->
is_static_initializer
())
{
index
++
;
}
...
...
src/share/vm/oops/methodDataOop.hpp
浏览文件 @
b8a89a9f
...
...
@@ -228,7 +228,7 @@ public:
return
byte_offset_of
(
DataLayout
,
_header
.
_struct
.
_bci
);
}
static
ByteSize
cell_offset
(
int
index
)
{
return
byte_offset_of
(
DataLayout
,
_cells
[
index
]
);
return
byte_offset_of
(
DataLayout
,
_cells
)
+
in_ByteSize
(
index
*
cell_size
);
}
// Return a value which, when or-ed as a byte into _flags, sets the flag.
static
int
flag_number_to_byte_constant
(
int
flag_number
)
{
...
...
src/share/vm/oops/methodOop.cpp
浏览文件 @
b8a89a9f
...
...
@@ -466,7 +466,20 @@ bool methodOopDesc::is_accessor() const {
bool
methodOopDesc
::
is_initializer
()
const
{
return
name
()
==
vmSymbols
::
object_initializer_name
()
||
name
()
==
vmSymbols
::
class_initializer_name
();
return
name
()
==
vmSymbols
::
object_initializer_name
()
||
is_static_initializer
();
}
bool
methodOopDesc
::
has_valid_initializer_flags
()
const
{
return
(
is_static
()
||
instanceKlass
::
cast
(
method_holder
())
->
major_version
()
<
51
);
}
bool
methodOopDesc
::
is_static_initializer
()
const
{
// For classfiles version 51 or greater, ensure that the clinit method is
// static. Non-static methods with the name "<clinit>" are not static
// initializers. (older classfiles exempted for backward compatibility)
return
name
()
==
vmSymbols
::
class_initializer_name
()
&&
has_valid_initializer_flags
();
}
...
...
src/share/vm/oops/methodOop.hpp
浏览文件 @
b8a89a9f
...
...
@@ -497,6 +497,13 @@ class methodOopDesc : public oopDesc {
// returns true if the method is an initializer (<init> or <clinit>).
bool
is_initializer
()
const
;
// returns true if the method is static OR if the classfile version < 51
bool
has_valid_initializer_flags
()
const
;
// returns true if the method name is <clinit> and the method has
// valid static initializer flags.
bool
is_static_initializer
()
const
;
// compiled code support
// NOTE: code() is inherently racy as deopt can be clearing code
// simultaneously. Use with caution.
...
...
src/share/vm/prims/jvmtiRedefineClasses.cpp
浏览文件 @
b8a89a9f
...
...
@@ -1084,7 +1084,10 @@ bool VM_RedefineClasses::merge_constant_pools(constantPoolHandle old_cp,
jbyte
old_tag
=
old_cp
->
tag_at
(
old_i
).
value
();
switch
(
old_tag
)
{
case
JVM_CONSTANT_Class
:
case
JVM_CONSTANT_UnresolvedClass
:
// revert the copy to JVM_CONSTANT_UnresolvedClass
// May be resolving while calling this so do the same for
// JVM_CONSTANT_UnresolvedClass (klass_name_at() deals with transition)
(
*
merge_cp_p
)
->
unresolved_klass_at_put
(
old_i
,
old_cp
->
klass_name_at
(
old_i
));
break
;
...
...
src/share/vm/runtime/arguments.cpp
浏览文件 @
b8a89a9f
...
...
@@ -3110,7 +3110,11 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
// Turn off biased locking for locking debug mode flags,
// which are subtlely different from each other but neither works with
// biased locking.
if
(
!
UseFastLocking
||
UseHeavyMonitors
)
{
if
(
UseHeavyMonitors
#ifdef COMPILER1
||
!
UseFastLocking
#endif // COMPILER1
)
{
if
(
!
FLAG_IS_DEFAULT
(
UseBiasedLocking
)
&&
UseBiasedLocking
)
{
// flag set to true on command line; warn the user that they
// can't enable biased locking here
...
...
src/share/vm/runtime/os.cpp
浏览文件 @
b8a89a9f
...
...
@@ -633,10 +633,10 @@ void os::free(void *memblock) {
*
q
=
(
u_char
)
freeBlockPad
;
}
if
(
PrintMalloc
&&
tty
!=
NULL
)
fprintf
(
stderr
,
"os::free "
SIZE_FORMAT
" bytes --> "
PTR_FORMAT
"
\n
"
,
size
,
memblock
);
fprintf
(
stderr
,
"os::free "
SIZE_FORMAT
" bytes --> "
PTR_FORMAT
"
\n
"
,
size
,
(
uintptr_t
)
memblock
);
}
else
if
(
PrintMalloc
&&
tty
!=
NULL
)
{
// tty->print_cr("os::free %p", memblock);
fprintf
(
stderr
,
"os::free "
PTR_FORMAT
"
\n
"
,
memblock
);
fprintf
(
stderr
,
"os::free "
PTR_FORMAT
"
\n
"
,
(
uintptr_t
)
memblock
);
}
#endif
::
free
((
char
*
)
memblock
-
space_before
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录