void CollectedHeap::post_allocation_setup_obj(KlassHandle klass, HeapWord* obj) { post_allocation_setup_common(klass, obj); assert(Universe::is_bootstrapping() || !((oop)obj)->blueprint()->oop_is_array(), "must not be an array"); // notify jvmti and dtrace post_allocation_notify(klass, (oop)obj); }
void CollectedHeap::post_allocation_setup_obj(KlassHandle klass, HeapWord* obj_ptr, int size) { post_allocation_setup_common(klass, obj_ptr); oop obj = (oop)obj_ptr; assert(Universe::is_bootstrapping() || !obj->is_array(), "must not be an array"); // notify jvmti and dtrace post_allocation_notify(klass, obj, size); }
void CollectedHeap::post_allocation_setup_array(KlassHandle klass, HeapWord* obj, int length) { // Set array length before setting the _klass field // in post_allocation_setup_common() because the klass field // indicates that the object is parsable by concurrent GC. assert(length >= 0, "length should be non-negative"); ((arrayOop)obj)->set_length(length); post_allocation_setup_common(klass, obj); assert(((oop)obj)->blueprint()->oop_is_array(), "must be an array"); // notify jvmti and dtrace (must be after length is set for dtrace) post_allocation_notify(klass, (oop)obj); }
void CollectedHeap::post_allocation_setup_array(KlassHandle klass, HeapWord* obj_ptr, int length) { // Set array length before setting the _klass field because a // non-NULL klass field indicates that the object is parsable by // concurrent GC. assert(length >= 0, "length should be non-negative"); ((arrayOop)obj_ptr)->set_length(length); post_allocation_setup_common(klass, obj_ptr); oop new_obj = (oop)obj_ptr; assert(new_obj->is_array(), "must be an array"); // notify jvmti and dtrace (must be after length is set for dtrace) post_allocation_notify(klass, new_obj, new_obj->size()); }
void CollectedHeap::post_allocation_setup_class(KlassHandle klass, HeapWord* obj_ptr, int size) { // Set oop_size field before setting the _klass field because a // non-NULL _klass field indicates that the object is parsable by // concurrent GC. oop new_cls = (oop)obj_ptr; assert(size > 0, "oop_size must be positive."); java_lang_Class::set_oop_size(new_cls, size); post_allocation_setup_common(klass, obj_ptr); assert(Universe::is_bootstrapping() || !new_cls->is_array(), "must not be an array"); // notify jvmti and dtrace post_allocation_notify(klass, new_cls, size); }