< prev index next >

src/share/vm/services/heapDumper.cpp

Print this page




 882   writer->write_objectID(o);
 883   writer->write_u4(STACK_TRACE_ID);
 884 
 885   // class ID
 886   writer->write_classID(k);
 887 
 888   // number of bytes that follow
 889   writer->write_u4(instance_size(k) );
 890 
 891   // field values
 892   dump_instance_fields(writer, o);
 893 }
 894 
 895 // creates HPROF_GC_CLASS_DUMP record for the given class and each of
 896 // its array classes
 897 void DumperSupport::dump_class_and_array_classes(DumpWriter* writer, Klass* k) {
 898   Klass* klass = k;
 899   assert(klass->oop_is_instance(), "not an InstanceKlass");
 900   InstanceKlass* ik = (InstanceKlass*)klass;
 901 





 902   writer->write_u1(HPROF_GC_CLASS_DUMP);
 903 
 904   // class ID
 905   writer->write_classID(ik);
 906   writer->write_u4(STACK_TRACE_ID);
 907 
 908   // super class ID
 909   Klass* java_super = ik->java_super();
 910   if (java_super == NULL) {
 911     writer->write_objectID(oop(NULL));
 912   } else {
 913     writer->write_classID(java_super);
 914   }
 915 
 916   writer->write_objectID(ik->class_loader());
 917   writer->write_objectID(ik->signers());
 918   writer->write_objectID(ik->protection_domain());
 919 
 920   // reserved
 921   writer->write_objectID(oop(NULL));




 882   writer->write_objectID(o);
 883   writer->write_u4(STACK_TRACE_ID);
 884 
 885   // class ID
 886   writer->write_classID(k);
 887 
 888   // number of bytes that follow
 889   writer->write_u4(instance_size(k) );
 890 
 891   // field values
 892   dump_instance_fields(writer, o);
 893 }
 894 
 895 // creates HPROF_GC_CLASS_DUMP record for the given class and each of
 896 // its array classes
 897 void DumperSupport::dump_class_and_array_classes(DumpWriter* writer, Klass* k) {
 898   Klass* klass = k;
 899   assert(klass->oop_is_instance(), "not an InstanceKlass");
 900   InstanceKlass* ik = (InstanceKlass*)klass;
 901 
 902   // Ignore the class if it hasn't been initialized yet
 903   if (!ik->is_linked()) {
 904     return;
 905   }
 906 
 907   writer->write_u1(HPROF_GC_CLASS_DUMP);
 908 
 909   // class ID
 910   writer->write_classID(ik);
 911   writer->write_u4(STACK_TRACE_ID);
 912 
 913   // super class ID
 914   Klass* java_super = ik->java_super();
 915   if (java_super == NULL) {
 916     writer->write_objectID(oop(NULL));
 917   } else {
 918     writer->write_classID(java_super);
 919   }
 920 
 921   writer->write_objectID(ik->class_loader());
 922   writer->write_objectID(ik->signers());
 923   writer->write_objectID(ik->protection_domain());
 924 
 925   // reserved
 926   writer->write_objectID(oop(NULL));


< prev index next >