mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
This commit is contained in:
parent
680ecf1611
commit
4a831d45f0
273 changed files with 6585 additions and 2993 deletions
|
@ -29,8 +29,9 @@ constantPoolOop constantPoolKlass::allocate(int length, TRAPS) {
|
|||
int size = constantPoolOopDesc::object_size(length);
|
||||
KlassHandle klass (THREAD, as_klassOop());
|
||||
constantPoolOop c =
|
||||
(constantPoolOop)CollectedHeap::permanent_array_allocate(klass, size, length, CHECK_NULL);
|
||||
(constantPoolOop)CollectedHeap::permanent_obj_allocate(klass, size, CHECK_NULL);
|
||||
|
||||
c->set_length(length);
|
||||
c->set_tags(NULL);
|
||||
c->set_cache(NULL);
|
||||
c->set_pool_holder(NULL);
|
||||
|
@ -54,14 +55,14 @@ constantPoolOop constantPoolKlass::allocate(int length, TRAPS) {
|
|||
|
||||
klassOop constantPoolKlass::create_klass(TRAPS) {
|
||||
constantPoolKlass o;
|
||||
KlassHandle klassklass(THREAD, Universe::arrayKlassKlassObj());
|
||||
arrayKlassHandle k = base_create_array_klass(o.vtbl_value(), header_size(), klassklass, CHECK_NULL);
|
||||
arrayKlassHandle super (THREAD, k->super());
|
||||
complete_create_array_klass(k, super, CHECK_NULL);
|
||||
KlassHandle h_this_klass(THREAD, Universe::klassKlassObj());
|
||||
KlassHandle k = base_create_klass(h_this_klass, header_size(), o.vtbl_value(), CHECK_NULL);
|
||||
// Make sure size calculation is right
|
||||
assert(k()->size() == align_object_size(header_size()), "wrong size for object");
|
||||
java_lang_Class::create_mirror(k, CHECK_NULL); // Allocate mirror
|
||||
return k();
|
||||
}
|
||||
|
||||
|
||||
int constantPoolKlass::oop_size(oop obj) const {
|
||||
assert(obj->is_constantPool(), "must be constantPool");
|
||||
return constantPoolOop(obj)->object_size();
|
||||
|
@ -275,7 +276,7 @@ void constantPoolKlass::oop_print_on(oop obj, outputStream* st) {
|
|||
EXCEPTION_MARK;
|
||||
oop anObj;
|
||||
assert(obj->is_constantPool(), "must be constantPool");
|
||||
arrayKlass::oop_print_on(obj, st);
|
||||
Klass::oop_print_on(obj, st);
|
||||
constantPoolOop cp = constantPoolOop(obj);
|
||||
|
||||
// Temp. remove cache so we can do lookups with original indicies.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue