test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj004/iterobjreachobj004.cpp
equal
deleted
inserted
replaced
40 static const char* objectFieldName = "object"; |
40 static const char* objectFieldName = "object"; |
41 |
41 |
42 /* ============================================================================= */ |
42 /* ============================================================================= */ |
43 |
43 |
44 jvmtiIterationControl JNICALL |
44 jvmtiIterationControl JNICALL |
45 objectReferenceCallback( jvmtiObjectReferenceKind reference_kind, |
45 objectReferenceCallback(jvmtiObjectReferenceKind reference_kind, |
46 jlong class_tag, |
46 jlong class_tag, |
47 jlong size, |
47 jlong size, |
48 jlong* tag_ptr, |
48 jlong* tag_ptr, |
49 jlong referrer_tag, |
49 jlong referrer_tag, |
50 jint referrer_index, |
50 jint referrer_index, |
51 void* user_data) { |
51 void* user_data) { |
52 |
52 |
53 objCounter++; |
53 objCounter++; |
54 |
54 |
55 if (!NSK_JVMTI_VERIFY(st_jvmti->SetEnvironmentLocalStorage(storage_data))) { |
55 if (!NSK_JVMTI_VERIFY(st_jvmti->SetEnvironmentLocalStorage(storage_data))) { |
56 nsk_jvmti_setFailStatus(); |
56 nsk_jvmti_setFailStatus(); |
113 nsk_jvmti_setFailStatus(); |
113 nsk_jvmti_setFailStatus(); |
114 } |
114 } |
115 |
115 |
116 if (storage_data != storage_ptr) { |
116 if (storage_data != storage_ptr) { |
117 NSK_COMPLAIN2("Local storage address was corrupted: %p ,\n\texpected value: %p\n", |
117 NSK_COMPLAIN2("Local storage address was corrupted: %p ,\n\texpected value: %p\n", |
118 storage_ptr, storage_data); |
118 storage_ptr, storage_data); |
119 nsk_jvmti_setFailStatus(); |
119 nsk_jvmti_setFailStatus(); |
120 } |
120 } |
121 |
121 |
122 if (strcmp(storage_data, (char *)storage_ptr) != 0) { |
122 if (strcmp(storage_data, (char *)storage_ptr) != 0) { |
123 NSK_COMPLAIN2("Local storage was corrupted: %s ,\n\texpected value: %s\n", |
123 NSK_COMPLAIN2("Local storage was corrupted: %s ,\n\texpected value: %s\n", |
124 (char *)storage_ptr, storage_data ); |
124 (char *)storage_ptr, storage_data); |
125 nsk_jvmti_setFailStatus(); |
125 nsk_jvmti_setFailStatus(); |
126 } |
126 } |
127 } while (0); |
127 } while (0); |
128 |
128 |
129 NSK_DISPLAY0("Let debugee to finish\n"); |
129 NSK_DISPLAY0("Let debugee to finish\n"); |