hotspot/src/share/vm/prims/jvmtiTagMap.cpp
changeset 13952 e3cf184080bc
parent 13741 e4395deb8597
child 13977 92de166c91b3
equal deleted inserted replaced
13918:b01a48301e67 13952:e3cf184080bc
  1073 {
  1073 {
  1074   assert(obj->is_typeArray(), "not a primitive array");
  1074   assert(obj->is_typeArray(), "not a primitive array");
  1075 
  1075 
  1076   // get base address of first element
  1076   // get base address of first element
  1077   typeArrayOop array = typeArrayOop(obj);
  1077   typeArrayOop array = typeArrayOop(obj);
  1078   BasicType type = typeArrayKlass::cast(array->klass())->element_type();
  1078   BasicType type = TypeArrayKlass::cast(array->klass())->element_type();
  1079   void* elements = array->base(type);
  1079   void* elements = array->base(type);
  1080 
  1080 
  1081   // jvmtiPrimitiveType is defined so this mapping is always correct
  1081   // jvmtiPrimitiveType is defined so this mapping is always correct
  1082   jvmtiPrimitiveType elem_type = (jvmtiPrimitiveType)type2char(type);
  1082   jvmtiPrimitiveType elem_type = (jvmtiPrimitiveType)type2char(type);
  1083 
  1083 
  2748 // each element in the array
  2748 // each element in the array
  2749 inline bool VM_HeapWalkOperation::iterate_over_array(oop o) {
  2749 inline bool VM_HeapWalkOperation::iterate_over_array(oop o) {
  2750   objArrayOop array = objArrayOop(o);
  2750   objArrayOop array = objArrayOop(o);
  2751 
  2751 
  2752   // array reference to its class
  2752   // array reference to its class
  2753   oop mirror = objArrayKlass::cast(array->klass())->java_mirror();
  2753   oop mirror = ObjArrayKlass::cast(array->klass())->java_mirror();
  2754   if (!CallbackInvoker::report_class_reference(o, mirror)) {
  2754   if (!CallbackInvoker::report_class_reference(o, mirror)) {
  2755     return false;
  2755     return false;
  2756   }
  2756   }
  2757 
  2757 
  2758   // iterate over the array and report each reference to a
  2758   // iterate over the array and report each reference to a