src/share/vm/prims/jvmtiExport.cpp

changeset 1577
4ce7240d622c
parent 1316
16c930df1e9b
child 1579
9b9c1ee9b3f6
equal deleted inserted replaced
1575:1f6d42899c3a 1577:4ce7240d622c
625 #ifndef JVMTI_KERNEL 625 #ifndef JVMTI_KERNEL
626 static inline klassOop oop_to_klassOop(oop obj) { 626 static inline klassOop oop_to_klassOop(oop obj) {
627 klassOop k = obj->klass(); 627 klassOop k = obj->klass();
628 628
629 // if the object is a java.lang.Class then return the java mirror 629 // if the object is a java.lang.Class then return the java mirror
630 if (k == SystemDictionary::class_klass()) { 630 if (k == SystemDictionary::Class_klass()) {
631 if (!java_lang_Class::is_primitive(obj)) { 631 if (!java_lang_Class::is_primitive(obj)) {
632 k = java_lang_Class::as_klassOop(obj); 632 k = java_lang_Class::as_klassOop(obj);
633 assert(k != NULL, "class for non-primitive mirror must exist"); 633 assert(k != NULL, "class for non-primitive mirror must exist");
634 } 634 }
635 } 635 }
1894 JvmtiVMObjectAllocEventCollector *collector; 1894 JvmtiVMObjectAllocEventCollector *collector;
1895 collector = state->get_vm_object_alloc_event_collector(); 1895 collector = state->get_vm_object_alloc_event_collector();
1896 if (collector != NULL && collector->is_enabled()) { 1896 if (collector != NULL && collector->is_enabled()) {
1897 // Don't record classes as these will be notified via the ClassLoad 1897 // Don't record classes as these will be notified via the ClassLoad
1898 // event. 1898 // event.
1899 if (obj->klass() != SystemDictionary::class_klass()) { 1899 if (obj->klass() != SystemDictionary::Class_klass()) {
1900 collector->record_allocation(obj); 1900 collector->record_allocation(obj);
1901 } 1901 }
1902 } 1902 }
1903 } 1903 }
1904 } 1904 }

mercurial