Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
f378773d
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看板
提交
f378773d
编写于
1月 18, 2013
作者:
B
brutisso
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
c613356d
c5d6db2c
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
105 addition
and
139 deletion
+105
-139
src/share/vm/classfile/classFileParser.cpp
src/share/vm/classfile/classFileParser.cpp
+29
-18
src/share/vm/classfile/classLoaderData.cpp
src/share/vm/classfile/classLoaderData.cpp
+1
-0
src/share/vm/classfile/defaultMethods.cpp
src/share/vm/classfile/defaultMethods.cpp
+15
-7
src/share/vm/classfile/javaClasses.cpp
src/share/vm/classfile/javaClasses.cpp
+0
-15
src/share/vm/classfile/javaClasses.hpp
src/share/vm/classfile/javaClasses.hpp
+0
-6
src/share/vm/classfile/vmSymbols.hpp
src/share/vm/classfile/vmSymbols.hpp
+0
-1
src/share/vm/gc_implementation/g1/g1_globals.hpp
src/share/vm/gc_implementation/g1/g1_globals.hpp
+6
-6
src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
+2
-7
src/share/vm/gc_implementation/parNew/parNewGeneration.hpp
src/share/vm/gc_implementation/parNew/parNewGeneration.hpp
+0
-4
src/share/vm/memory/defNewGeneration.cpp
src/share/vm/memory/defNewGeneration.cpp
+6
-3
src/share/vm/memory/defNewGeneration.hpp
src/share/vm/memory/defNewGeneration.hpp
+3
-1
src/share/vm/memory/metadataFactory.hpp
src/share/vm/memory/metadataFactory.hpp
+6
-1
src/share/vm/oops/instanceKlass.cpp
src/share/vm/oops/instanceKlass.cpp
+0
-4
src/share/vm/prims/jvm.cpp
src/share/vm/prims/jvm.cpp
+5
-2
src/share/vm/runtime/globals.hpp
src/share/vm/runtime/globals.hpp
+0
-12
src/share/vm/runtime/thread.cpp
src/share/vm/runtime/thread.cpp
+32
-51
src/share/vm/runtime/vmStructs.cpp
src/share/vm/runtime/vmStructs.cpp
+0
-1
未找到文件。
src/share/vm/classfile/classFileParser.cpp
浏览文件 @
f378773d
...
...
@@ -2503,26 +2503,38 @@ Array<Method*>* ClassFileParser::parse_methods(ClassLoaderData* loader_data,
*
has_default_methods
=
true
;
}
methods
->
at_put
(
index
,
method
());
if
(
*
methods_annotations
==
NULL
)
{
*
methods_annotations
=
MetadataFactory
::
new_array
<
AnnotationArray
*>
(
loader_data
,
length
,
NULL
,
CHECK_NULL
);
if
(
method_annotations
!=
NULL
)
{
if
(
*
methods_annotations
==
NULL
)
{
*
methods_annotations
=
MetadataFactory
::
new_array
<
AnnotationArray
*>
(
loader_data
,
length
,
NULL
,
CHECK_NULL
);
}
(
*
methods_annotations
)
->
at_put
(
index
,
method_annotations
);
}
(
*
methods_annotations
)
->
at_put
(
index
,
method_annotations
);
if
(
*
methods_parameter_annotations
==
NULL
)
{
*
methods_parameter_annotations
=
MetadataFactory
::
new_array
<
AnnotationArray
*>
(
loader_data
,
length
,
NULL
,
CHECK_NULL
);
if
(
method_parameter_annotations
!=
NULL
)
{
if
(
*
methods_parameter_annotations
==
NULL
)
{
*
methods_parameter_annotations
=
MetadataFactory
::
new_array
<
AnnotationArray
*>
(
loader_data
,
length
,
NULL
,
CHECK_NULL
);
}
(
*
methods_parameter_annotations
)
->
at_put
(
index
,
method_parameter_annotations
);
}
(
*
methods_parameter_annotations
)
->
at_put
(
index
,
method_parameter_annotations
);
if
(
*
methods_default_annotations
==
NULL
)
{
*
methods_default_annotations
=
MetadataFactory
::
new_array
<
AnnotationArray
*>
(
loader_data
,
length
,
NULL
,
CHECK_NULL
);
if
(
method_default_annotations
!=
NULL
)
{
if
(
*
methods_default_annotations
==
NULL
)
{
*
methods_default_annotations
=
MetadataFactory
::
new_array
<
AnnotationArray
*>
(
loader_data
,
length
,
NULL
,
CHECK_NULL
);
}
(
*
methods_default_annotations
)
->
at_put
(
index
,
method_default_annotations
);
}
(
*
methods_default_annotations
)
->
at_put
(
index
,
method_default_annotations
);
if
(
*
methods_type_annotations
==
NULL
)
{
*
methods_type_annotations
=
MetadataFactory
::
new_array
<
AnnotationArray
*>
(
loader_data
,
length
,
NULL
,
CHECK_NULL
);
if
(
method_type_annotations
!=
NULL
)
{
if
(
*
methods_type_annotations
==
NULL
)
{
*
methods_type_annotations
=
MetadataFactory
::
new_array
<
AnnotationArray
*>
(
loader_data
,
length
,
NULL
,
CHECK_NULL
);
}
(
*
methods_type_annotations
)
->
at_put
(
index
,
method_type_annotations
);
}
(
*
methods_type_annotations
)
->
at_put
(
index
,
method_type_annotations
);
}
if
(
_need_verify
&&
length
>
1
)
{
...
...
@@ -3338,8 +3350,7 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
bool
has_final_method
=
false
;
AccessFlags
promoted_flags
;
promoted_flags
.
set_flags
(
0
);
// These need to be oop pointers because they are allocated lazily
// inside parse_methods inside a nested HandleMark
Array
<
AnnotationArray
*>*
methods_annotations
=
NULL
;
Array
<
AnnotationArray
*>*
methods_parameter_annotations
=
NULL
;
Array
<
AnnotationArray
*>*
methods_default_annotations
=
NULL
;
...
...
src/share/vm/classfile/classLoaderData.cpp
浏览文件 @
f378773d
...
...
@@ -318,6 +318,7 @@ ClassLoaderData::~ClassLoaderData() {
}
Metaspace
*
ClassLoaderData
::
metaspace_non_null
()
{
assert
(
!
DumpSharedSpaces
,
"wrong metaspace!"
);
// If the metaspace has not been allocated, create a new one. Might want
// to create smaller arena for Reflection class loaders also.
// The reason for the delayed allocation is because some class loaders are
...
...
src/share/vm/classfile/defaultMethods.cpp
浏览文件 @
f378773d
...
...
@@ -1285,13 +1285,15 @@ static void merge_in_new_methods(InstanceKlass* klass,
enum
{
ANNOTATIONS
,
PARAMETERS
,
DEFAULTS
,
NUM_ARRAYS
};
Array
<
AnnotationArray
*>*
original_annots
[
NUM_ARRAYS
];
Array
<
AnnotationArray
*>*
original_annots
[
NUM_ARRAYS
]
=
{
NULL
}
;
Array
<
Method
*>*
original_methods
=
klass
->
methods
();
Annotations
*
annots
=
klass
->
annotations
();
original_annots
[
ANNOTATIONS
]
=
annots
->
methods_annotations
();
original_annots
[
PARAMETERS
]
=
annots
->
methods_parameter_annotations
();
original_annots
[
DEFAULTS
]
=
annots
->
methods_default_annotations
();
if
(
annots
!=
NULL
)
{
original_annots
[
ANNOTATIONS
]
=
annots
->
methods_annotations
();
original_annots
[
PARAMETERS
]
=
annots
->
methods_parameter_annotations
();
original_annots
[
DEFAULTS
]
=
annots
->
methods_default_annotations
();
}
Array
<
int
>*
original_ordering
=
klass
->
method_ordering
();
Array
<
int
>*
merged_ordering
=
Universe
::
the_empty_int_array
();
...
...
@@ -1370,9 +1372,15 @@ static void merge_in_new_methods(InstanceKlass* klass,
// Replace klass methods with new merged lists
klass
->
set_methods
(
merged_methods
);
annots
->
set_methods_annotations
(
merged_annots
[
ANNOTATIONS
]);
annots
->
set_methods_parameter_annotations
(
merged_annots
[
PARAMETERS
]);
annots
->
set_methods_default_annotations
(
merged_annots
[
DEFAULTS
]);
if
(
annots
!=
NULL
)
{
annots
->
set_methods_annotations
(
merged_annots
[
ANNOTATIONS
]);
annots
->
set_methods_parameter_annotations
(
merged_annots
[
PARAMETERS
]);
annots
->
set_methods_default_annotations
(
merged_annots
[
DEFAULTS
]);
}
else
{
assert
(
merged_annots
[
ANNOTATIONS
]
==
NULL
,
"Must be"
);
assert
(
merged_annots
[
PARAMETERS
]
==
NULL
,
"Must be"
);
assert
(
merged_annots
[
DEFAULTS
]
==
NULL
,
"Must be"
);
}
ClassLoaderData
*
cld
=
klass
->
class_loader_data
();
MetadataFactory
::
free_array
(
cld
,
original_methods
);
...
...
src/share/vm/classfile/javaClasses.cpp
浏览文件 @
f378773d
...
...
@@ -687,19 +687,6 @@ void java_lang_Class::set_array_klass(oop java_class, Klass* klass) {
}
Method
*
java_lang_Class
::
resolved_constructor
(
oop
java_class
)
{
Metadata
*
constructor
=
java_class
->
metadata_field
(
_resolved_constructor_offset
);
assert
(
constructor
==
NULL
||
constructor
->
is_method
(),
"should be method"
);
return
((
Method
*
)
constructor
);
}
void
java_lang_Class
::
set_resolved_constructor
(
oop
java_class
,
Method
*
constructor
)
{
assert
(
constructor
->
is_method
(),
"should be method"
);
java_class
->
metadata_field_put
(
_resolved_constructor_offset
,
constructor
);
}
bool
java_lang_Class
::
is_primitive
(
oop
java_class
)
{
// should assert:
//assert(java_lang_Class::is_instance(java_class), "must be a Class object");
...
...
@@ -2949,7 +2936,6 @@ int java_lang_System::err_offset_in_bytes() {
int
java_lang_Class
::
_klass_offset
;
int
java_lang_Class
::
_array_klass_offset
;
int
java_lang_Class
::
_resolved_constructor_offset
;
int
java_lang_Class
::
_oop_size_offset
;
int
java_lang_Class
::
_static_oop_field_count_offset
;
GrowableArray
<
Klass
*>*
java_lang_Class
::
_fixup_mirror_list
=
NULL
;
...
...
@@ -3303,7 +3289,6 @@ void JavaClasses::check_offsets() {
// Fake fields
// CHECK_OFFSET("java/lang/Class", java_lang_Class, klass); // %%% this needs to be checked
// CHECK_OFFSET("java/lang/Class", java_lang_Class, array_klass); // %%% this needs to be checked
// CHECK_OFFSET("java/lang/Class", java_lang_Class, resolved_constructor); // %%% this needs to be checked
// java.lang.Throwable
...
...
src/share/vm/classfile/javaClasses.hpp
浏览文件 @
f378773d
...
...
@@ -206,7 +206,6 @@ class java_lang_String : AllStatic {
#define CLASS_INJECTED_FIELDS(macro) \
macro(java_lang_Class, klass, intptr_signature, false) \
macro(java_lang_Class, resolved_constructor, intptr_signature, false) \
macro(java_lang_Class, array_klass, intptr_signature, false) \
macro(java_lang_Class, oop_size, int_signature, false) \
macro(java_lang_Class, static_oop_field_count, int_signature, false)
...
...
@@ -218,7 +217,6 @@ class java_lang_Class : AllStatic {
// The fake offsets are added by the class loader when java.lang.Class is loaded
static
int
_klass_offset
;
static
int
_resolved_constructor_offset
;
static
int
_array_klass_offset
;
static
int
_oop_size_offset
;
...
...
@@ -254,15 +252,11 @@ class java_lang_Class : AllStatic {
static
bool
is_primitive
(
oop
java_class
);
static
BasicType
primitive_type
(
oop
java_class
);
static
oop
primitive_mirror
(
BasicType
t
);
// JVM_NewInstance support
static
Method
*
resolved_constructor
(
oop
java_class
);
static
void
set_resolved_constructor
(
oop
java_class
,
Method
*
constructor
);
// JVM_NewArray support
static
Klass
*
array_klass
(
oop
java_class
);
static
void
set_array_klass
(
oop
java_class
,
Klass
*
klass
);
// compiler support for class operations
static
int
klass_offset_in_bytes
()
{
return
_klass_offset
;
}
static
int
resolved_constructor_offset_in_bytes
()
{
return
_resolved_constructor_offset
;
}
static
int
array_klass_offset_in_bytes
()
{
return
_array_klass_offset
;
}
// Support for classRedefinedCount field
static
int
classRedefinedCount
(
oop
the_class_mirror
);
...
...
src/share/vm/classfile/vmSymbols.hpp
浏览文件 @
f378773d
...
...
@@ -386,7 +386,6 @@
template(basicType_name, "basicType") \
template(append_name, "append") \
template(klass_name, "klass") \
template(resolved_constructor_name, "resolved_constructor") \
template(array_klass_name, "array_klass") \
template(oop_size_name, "oop_size") \
template(static_oop_field_count_name, "static_oop_field_count") \
...
...
src/share/vm/gc_implementation/g1/g1_globals.hpp
浏览文件 @
f378773d
/*
* Copyright (c) 2001, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -287,24 +287,24 @@
"The number of times we'll force an overflow during " \
"concurrent marking") \
\
experimental(uintx, G1NewSizePercent,
20,
\
experimental(uintx, G1NewSizePercent,
5,
\
"Percentage (0-100) of the heap size to use as default " \
"minimum young gen size.") \
\
experimental(uintx, G1MaxNewSizePercent,
8
0, \
experimental(uintx, G1MaxNewSizePercent,
6
0, \
"Percentage (0-100) of the heap size to use as default " \
" maximum young gen size.") \
\
experimental(uintx, G1MixedGCLiveThresholdPercent,
90
, \
experimental(uintx, G1MixedGCLiveThresholdPercent,
65
, \
"Threshold for regions to be considered for inclusion in the " \
"collection set of mixed GCs. " \
"Regions with live bytes exceeding this will not be collected.") \
\
product(uintx, G1HeapWastePercent,
5,
\
product(uintx, G1HeapWastePercent,
10,
\
"Amount of space, expressed as a percentage of the heap size, " \
"that G1 is willing not to collect to avoid expensive GCs.") \
\
product(uintx, G1MixedGCCountTarget,
4
, \
product(uintx, G1MixedGCCountTarget,
8
, \
"The target number of mixed GCs after a marking cycle.") \
\
experimental(uintx, G1OldCSetRegionThresholdPercent, 10, \
...
...
src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
浏览文件 @
f378773d
...
...
@@ -878,12 +878,6 @@ void EvacuateFollowersClosureGeneral::do_void() {
bool
ParNewGeneration
::
_avoid_promotion_undo
=
false
;
void
ParNewGeneration
::
adjust_desired_tenuring_threshold
()
{
// Set the desired survivor size to half the real survivor space
_tenuring_threshold
=
age_table
()
->
compute_tenuring_threshold
(
to
()
->
capacity
()
/
HeapWordSize
);
}
// A Generation that does parallel young-gen collection.
void
ParNewGeneration
::
collect
(
bool
full
,
...
...
@@ -1013,6 +1007,8 @@ void ParNewGeneration::collect(bool full,
size_policy
->
reset_gc_overhead_limit_count
();
assert
(
to
()
->
is_empty
(),
"to space should be empty now"
);
adjust_desired_tenuring_threshold
();
}
else
{
assert
(
_promo_failure_scan_stack
.
is_empty
(),
"post condition"
);
_promo_failure_scan_stack
.
clear
(
true
);
// Clear cached segments.
...
...
@@ -1035,7 +1031,6 @@ void ParNewGeneration::collect(bool full,
from
()
->
set_concurrent_iteration_safe_limit
(
from
()
->
top
());
to
()
->
set_concurrent_iteration_safe_limit
(
to
()
->
top
());
adjust_desired_tenuring_threshold
();
if
(
ResizePLAB
)
{
plab_stats
()
->
adjust_desired_plab_sz
(
n_workers
);
}
...
...
src/share/vm/gc_implementation/parNew/parNewGeneration.hpp
浏览文件 @
f378773d
...
...
@@ -347,10 +347,6 @@ class ParNewGeneration: public DefNewGeneration {
bool
survivor_overflow
()
{
return
_survivor_overflow
;
}
void
set_survivor_overflow
(
bool
v
)
{
_survivor_overflow
=
v
;
}
// Adjust the tenuring threshold. See the implementation for
// the details of the policy.
virtual
void
adjust_desired_tenuring_threshold
();
public:
ParNewGeneration
(
ReservedSpace
rs
,
size_t
initial_byte_size
,
int
level
);
...
...
src/share/vm/memory/defNewGeneration.cpp
浏览文件 @
f378773d
...
...
@@ -550,6 +550,11 @@ HeapWord* DefNewGeneration::expand_and_allocate(size_t size,
return
allocate
(
size
,
is_tlab
);
}
void
DefNewGeneration
::
adjust_desired_tenuring_threshold
()
{
// Set the desired survivor size to half the real survivor space
_tenuring_threshold
=
age_table
()
->
compute_tenuring_threshold
(
to
()
->
capacity
()
/
HeapWordSize
);
}
void
DefNewGeneration
::
collect
(
bool
full
,
bool
clear_all_soft_refs
,
...
...
@@ -649,9 +654,7 @@ void DefNewGeneration::collect(bool full,
assert
(
to
()
->
is_empty
(),
"to space should be empty now"
);
// Set the desired survivor size to half the real survivor space
_tenuring_threshold
=
age_table
()
->
compute_tenuring_threshold
(
to
()
->
capacity
()
/
HeapWordSize
);
adjust_desired_tenuring_threshold
();
// A successful scavenge should restart the GC time limit count which is
// for full GC's.
...
...
src/share/vm/memory/defNewGeneration.hpp
浏览文件 @
f378773d
...
...
@@ -124,7 +124,9 @@ protected:
_should_allocate_from_space
=
true
;
}
protected:
// Tenuring
void
adjust_desired_tenuring_threshold
();
// Spaces
EdenSpace
*
_eden_space
;
ContiguousSpace
*
_from_space
;
...
...
src/share/vm/memory/metadataFactory.hpp
浏览文件 @
f378773d
...
...
@@ -66,7 +66,11 @@ class MetadataFactory : AllStatic {
if
(
data
!=
NULL
)
{
assert
(
loader_data
!=
NULL
,
"shouldn't pass null"
);
int
size
=
data
->
size
();
loader_data
->
metaspace_non_null
()
->
deallocate
((
MetaWord
*
)
data
,
size
,
false
);
if
(
DumpSharedSpaces
)
{
loader_data
->
ro_metaspace
()
->
deallocate
((
MetaWord
*
)
data
,
size
,
false
);
}
else
{
loader_data
->
metaspace_non_null
()
->
deallocate
((
MetaWord
*
)
data
,
size
,
false
);
}
}
}
...
...
@@ -77,6 +81,7 @@ class MetadataFactory : AllStatic {
assert
(
loader_data
!=
NULL
,
"shouldn't pass null"
);
int
size
=
md
->
size
();
// Call metadata's deallocate function which will call deallocate fields
assert
(
!
DumpSharedSpaces
,
"cannot deallocate metadata when dumping CDS archive"
);
assert
(
!
md
->
on_stack
(),
"can't deallocate things on stack"
);
md
->
deallocate_contents
(
loader_data
);
loader_data
->
metaspace_non_null
()
->
deallocate
((
MetaWord
*
)
md
,
size
,
md
->
is_klass
());
...
...
src/share/vm/oops/instanceKlass.cpp
浏览文件 @
f378773d
...
...
@@ -2890,11 +2890,7 @@ void InstanceKlass::oop_print_on(oop obj, outputStream* st) {
st
->
print
(
BULLET
"fake entry for mirror: "
);
mirrored_klass
->
print_value_on_maybe_null
(
st
);
st
->
cr
();
st
->
print
(
BULLET
"fake entry resolved_constructor: "
);
Method
*
ctor
=
java_lang_Class
::
resolved_constructor
(
obj
);
ctor
->
print_value_on_maybe_null
(
st
);
Klass
*
array_klass
=
java_lang_Class
::
array_klass
(
obj
);
st
->
cr
();
st
->
print
(
BULLET
"fake entry for array: "
);
array_klass
->
print_value_on_maybe_null
(
st
);
st
->
cr
();
...
...
src/share/vm/prims/jvm.cpp
浏览文件 @
f378773d
...
...
@@ -1582,8 +1582,11 @@ JVM_ENTRY(jbyteArray, JVM_GetClassTypeAnnotations(JNIEnv *env, jclass cls))
if
(
!
java_lang_Class
::
is_primitive
(
JNIHandles
::
resolve
(
cls
)))
{
Klass
*
k
=
java_lang_Class
::
as_Klass
(
JNIHandles
::
resolve
(
cls
));
if
(
k
->
oop_is_instance
())
{
typeArrayOop
a
=
Annotations
::
make_java_array
(
InstanceKlass
::
cast
(
k
)
->
type_annotations
()
->
class_annotations
(),
CHECK_NULL
);
return
(
jbyteArray
)
JNIHandles
::
make_local
(
env
,
a
);
Annotations
*
type_annotations
=
InstanceKlass
::
cast
(
k
)
->
type_annotations
();
if
(
type_annotations
!=
NULL
)
{
typeArrayOop
a
=
Annotations
::
make_java_array
(
type_annotations
->
class_annotations
(),
CHECK_NULL
);
return
(
jbyteArray
)
JNIHandles
::
make_local
(
env
,
a
);
}
}
}
return
NULL
;
...
...
src/share/vm/runtime/globals.hpp
浏览文件 @
f378773d
...
...
@@ -972,18 +972,6 @@ class CommandLineFlags {
notproduct(uintx, WarnOnStalledSpinLock, 0, \
"Prints warnings for stalled SpinLocks") \
\
develop(bool, InitializeJavaLangSystem, true, \
"Initialize java.lang.System - turn off for individual " \
"method debugging") \
\
develop(bool, InitializeJavaLangString, true, \
"Initialize java.lang.String - turn off for individual " \
"method debugging") \
\
develop(bool, InitializeJavaLangExceptionsErrors, true, \
"Initialize various error and exception classes - turn off for " \
"individual method debugging") \
\
product(bool, RegisterFinalizersAtInit, true, \
"Register finalizable objects at end of Object.<init> or " \
"after allocation") \
...
...
src/share/vm/runtime/thread.cpp
浏览文件 @
f378773d
...
...
@@ -1716,7 +1716,6 @@ static void ensure_join(JavaThread* thread) {
// cleanup_failed_attach_current_thread as well.
void
JavaThread
::
exit
(
bool
destroy_vm
,
ExitType
exit_type
)
{
assert
(
this
==
JavaThread
::
current
(),
"thread consistency check"
);
if
(
!
InitializeJavaLangSystem
)
return
;
HandleMark
hm
(
this
);
Handle
uncaught_exception
(
this
,
this
->
pending_exception
());
...
...
@@ -3469,11 +3468,7 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
create_vm_init_libraries
();
}
if
(
InitializeJavaLangString
)
{
initialize_class
(
vmSymbols
::
java_lang_String
(),
CHECK_0
);
}
else
{
warning
(
"java.lang.String not initialized"
);
}
initialize_class
(
vmSymbols
::
java_lang_String
(),
CHECK_0
);
if
(
AggressiveOpts
)
{
{
...
...
@@ -3514,53 +3509,39 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
}
// Initialize java_lang.System (needed before creating the thread)
if
(
InitializeJavaLangSystem
)
{
initialize_class
(
vmSymbols
::
java_lang_System
(),
CHECK_0
);
initialize_class
(
vmSymbols
::
java_lang_ThreadGroup
(),
CHECK_0
);
Handle
thread_group
=
create_initial_thread_group
(
CHECK_0
);
Universe
::
set_main_thread_group
(
thread_group
());
initialize_class
(
vmSymbols
::
java_lang_Thread
(),
CHECK_0
);
oop
thread_object
=
create_initial_thread
(
thread_group
,
main_thread
,
CHECK_0
);
main_thread
->
set_threadObj
(
thread_object
);
// Set thread status to running since main thread has
// been started and running.
java_lang_Thread
::
set_thread_status
(
thread_object
,
java_lang_Thread
::
RUNNABLE
);
// The VM creates & returns objects of this class. Make sure it's initialized.
initialize_class
(
vmSymbols
::
java_lang_Class
(),
CHECK_0
);
// The VM preresolves methods to these classes. Make sure that they get initialized
initialize_class
(
vmSymbols
::
java_lang_reflect_Method
(),
CHECK_0
);
initialize_class
(
vmSymbols
::
java_lang_ref_Finalizer
(),
CHECK_0
);
call_initializeSystemClass
(
CHECK_0
);
// get the Java runtime name after java.lang.System is initialized
JDK_Version
::
set_runtime_name
(
get_java_runtime_name
(
THREAD
));
JDK_Version
::
set_runtime_version
(
get_java_runtime_version
(
THREAD
));
}
else
{
warning
(
"java.lang.System not initialized"
);
}
initialize_class
(
vmSymbols
::
java_lang_System
(),
CHECK_0
);
initialize_class
(
vmSymbols
::
java_lang_ThreadGroup
(),
CHECK_0
);
Handle
thread_group
=
create_initial_thread_group
(
CHECK_0
);
Universe
::
set_main_thread_group
(
thread_group
());
initialize_class
(
vmSymbols
::
java_lang_Thread
(),
CHECK_0
);
oop
thread_object
=
create_initial_thread
(
thread_group
,
main_thread
,
CHECK_0
);
main_thread
->
set_threadObj
(
thread_object
);
// Set thread status to running since main thread has
// been started and running.
java_lang_Thread
::
set_thread_status
(
thread_object
,
java_lang_Thread
::
RUNNABLE
);
// The VM creates & returns objects of this class. Make sure it's initialized.
initialize_class
(
vmSymbols
::
java_lang_Class
(),
CHECK_0
);
// The VM preresolves methods to these classes. Make sure that they get initialized
initialize_class
(
vmSymbols
::
java_lang_reflect_Method
(),
CHECK_0
);
initialize_class
(
vmSymbols
::
java_lang_ref_Finalizer
(),
CHECK_0
);
call_initializeSystemClass
(
CHECK_0
);
// get the Java runtime name after java.lang.System is initialized
JDK_Version
::
set_runtime_name
(
get_java_runtime_name
(
THREAD
));
JDK_Version
::
set_runtime_version
(
get_java_runtime_version
(
THREAD
));
// an instance of OutOfMemory exception has been allocated earlier
if
(
InitializeJavaLangExceptionsErrors
)
{
initialize_class
(
vmSymbols
::
java_lang_OutOfMemoryError
(),
CHECK_0
);
initialize_class
(
vmSymbols
::
java_lang_NullPointerException
(),
CHECK_0
);
initialize_class
(
vmSymbols
::
java_lang_ClassCastException
(),
CHECK_0
);
initialize_class
(
vmSymbols
::
java_lang_ArrayStoreException
(),
CHECK_0
);
initialize_class
(
vmSymbols
::
java_lang_ArithmeticException
(),
CHECK_0
);
initialize_class
(
vmSymbols
::
java_lang_StackOverflowError
(),
CHECK_0
);
initialize_class
(
vmSymbols
::
java_lang_IllegalMonitorStateException
(),
CHECK_0
);
initialize_class
(
vmSymbols
::
java_lang_IllegalArgumentException
(),
CHECK_0
);
}
else
{
warning
(
"java.lang.OutOfMemoryError has not been initialized"
);
warning
(
"java.lang.NullPointerException has not been initialized"
);
warning
(
"java.lang.ClassCastException has not been initialized"
);
warning
(
"java.lang.ArrayStoreException has not been initialized"
);
warning
(
"java.lang.ArithmeticException has not been initialized"
);
warning
(
"java.lang.StackOverflowError has not been initialized"
);
warning
(
"java.lang.IllegalArgumentException has not been initialized"
);
}
initialize_class
(
vmSymbols
::
java_lang_OutOfMemoryError
(),
CHECK_0
);
initialize_class
(
vmSymbols
::
java_lang_NullPointerException
(),
CHECK_0
);
initialize_class
(
vmSymbols
::
java_lang_ClassCastException
(),
CHECK_0
);
initialize_class
(
vmSymbols
::
java_lang_ArrayStoreException
(),
CHECK_0
);
initialize_class
(
vmSymbols
::
java_lang_ArithmeticException
(),
CHECK_0
);
initialize_class
(
vmSymbols
::
java_lang_StackOverflowError
(),
CHECK_0
);
initialize_class
(
vmSymbols
::
java_lang_IllegalMonitorStateException
(),
CHECK_0
);
initialize_class
(
vmSymbols
::
java_lang_IllegalArgumentException
(),
CHECK_0
);
}
// See : bugid 4211085.
...
...
src/share/vm/runtime/vmStructs.cpp
浏览文件 @
f378773d
...
...
@@ -1198,7 +1198,6 @@ typedef BinaryTreeDictionary<Metablock, FreeList> MetablockTreeDictionary;
/*********************************/
\
\
static_field(java_lang_Class, _klass_offset, int) \
static_field(java_lang_Class, _resolved_constructor_offset, int) \
static_field(java_lang_Class, _array_klass_offset, int) \
static_field(java_lang_Class, _oop_size_offset, int) \
static_field(java_lang_Class, _static_oop_field_count_offset, int) \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录