@@ -792,7 +792,6 @@ int java_lang_Class::_class_loader_offset;
792
792
int java_lang_Class::_module_offset;
793
793
int java_lang_Class::_protection_domain_offset;
794
794
int java_lang_Class::_component_mirror_offset;
795
- int java_lang_Class::_init_lock_offset;
796
795
int java_lang_Class::_signers_offset;
797
796
int java_lang_Class::_name_offset;
798
797
int java_lang_Class::_source_file_offset;
@@ -926,12 +925,6 @@ void java_lang_Class::initialize_mirror_fields(Klass* k,
926
925
Handle protection_domain,
927
926
Handle classData,
928
927
TRAPS) {
929
- // Allocate a simple java object for a lock.
930
- // This needs to be a java object because during class initialization
931
- // it can be held across a java call.
932
- typeArrayOop r = oopFactory::new_typeArray (T_INT, 0 , CHECK);
933
- set_init_lock (mirror (), r);
934
-
935
928
// Set protection domain also
936
929
set_protection_domain (mirror (), protection_domain ());
937
930
@@ -1270,8 +1263,6 @@ oop java_lang_Class::process_archived_mirror(Klass* k, oop mirror,
1270
1263
// Reset local static fields in the mirror
1271
1264
InstanceKlass::cast (k)->do_local_static_fields (&reset);
1272
1265
1273
- set_init_lock (archived_mirror, NULL );
1274
-
1275
1266
set_protection_domain (archived_mirror, NULL );
1276
1267
set_signers (archived_mirror, NULL );
1277
1268
set_source_file (archived_mirror, NULL );
@@ -1353,10 +1344,6 @@ bool java_lang_Class::restore_archived_mirror(Klass *k,
1353
1344
if (!k->is_array_klass ()) {
1354
1345
// - local static final fields with initial values were initialized at dump time
1355
1346
1356
- // create the init_lock
1357
- typeArrayOop r = oopFactory::new_typeArray (T_INT, 0 , CHECK_ (false ));
1358
- set_init_lock (mirror (), r);
1359
-
1360
1347
if (protection_domain.not_null ()) {
1361
1348
set_protection_domain (mirror (), protection_domain ());
1362
1349
}
@@ -1421,15 +1408,6 @@ oop java_lang_Class::component_mirror(oop java_class) {
1421
1408
return java_class->obj_field (_component_mirror_offset);
1422
1409
}
1423
1410
1424
- oop java_lang_Class::init_lock (oop java_class) {
1425
- assert (_init_lock_offset != 0 , " must be set" );
1426
- return java_class->obj_field (_init_lock_offset);
1427
- }
1428
- void java_lang_Class::set_init_lock (oop java_class, oop init_lock) {
1429
- assert (_init_lock_offset != 0 , " must be set" );
1430
- java_class->obj_field_put (_init_lock_offset, init_lock);
1431
- }
1432
-
1433
1411
objArrayOop java_lang_Class::signers (oop java_class) {
1434
1412
assert (_signers_offset != 0 , " must be set" );
1435
1413
return (objArrayOop)java_class->obj_field (_signers_offset);
@@ -1641,18 +1619,12 @@ void java_lang_Class::compute_offsets() {
1641
1619
InstanceKlass* k = vmClasses::Class_klass ();
1642
1620
CLASS_FIELDS_DO (FIELD_COMPUTE_OFFSET);
1643
1621
1644
- // Init lock is a C union with component_mirror. Only instanceKlass mirrors have
1645
- // init_lock and only ArrayKlass mirrors have component_mirror. Since both are oops
1646
- // GC treats them the same.
1647
- _init_lock_offset = _component_mirror_offset;
1648
-
1649
1622
CLASS_INJECTED_FIELDS (INJECTED_FIELD_COMPUTE_OFFSET);
1650
1623
}
1651
1624
1652
1625
#if INCLUDE_CDS
1653
1626
void java_lang_Class::serialize_offsets (SerializeClosure* f) {
1654
1627
f->do_bool (&_offsets_computed);
1655
- f->do_u4 ((u4*)&_init_lock_offset);
1656
1628
1657
1629
CLASS_FIELDS_DO (FIELD_SERIALIZE_OFFSET);
1658
1630
0 commit comments