< prev index next >

src/hotspot/share/oops/klass.cpp

Print this page
@@ -200,10 +200,11 @@
  // "Normal" instantiation is preceeded by a MetaspaceObj allocation
  // which zeros out memory - calloc equivalent.
  // The constructor is also used from CppVtableCloner,
  // which doesn't zero out the memory before calling the constructor.
  Klass::Klass(KlassID id) : _id(id),
+                             _prototype_header(markWord::prototype()),
                             _shared_class_path_index(-1) {
    CDS_ONLY(_shared_class_flags = 0;)
    CDS_JAVA_HEAP_ONLY(_archived_mirror_index = -1;)
    _primary_supers[0] = this;
    set_super_check_offset(in_bytes(primary_supers_offset()));

@@ -214,11 +215,11 @@
    // Note that T_ARRAY is not allowed here.
    int  hsize = arrayOopDesc::base_offset_in_bytes(etype);
    int  esize = type2aelembytes(etype);
    bool isobj = (etype == T_OBJECT);
    int  tag   =  isobj ? _lh_array_tag_obj_value : _lh_array_tag_type_value;
-   int lh = array_layout_helper(tag, hsize, etype, exact_log2(esize));
+   int lh = array_layout_helper(tag, false, hsize, etype, exact_log2(esize));
  
    assert(lh < (int)_lh_neutral_value, "must look like an array layout");
    assert(layout_helper_is_array(lh), "correct kind");
    assert(layout_helper_is_objArray(lh) == isobj, "correct kind");
    assert(layout_helper_is_typeArray(lh) == !isobj, "correct kind");

@@ -742,10 +743,12 @@
  
    if (WizardMode) {
       // print header
       obj->mark().print_on(st);
       st->cr();
+      st->print(BULLET"prototype_header: " INTPTR_FORMAT, _prototype_header.value());
+      st->cr();
    }
  
    // print class
    st->print(BULLET"klass: ");
    obj->klass()->print_value_on(st);
< prev index next >