4545
4646typedef struct AllInstancesData {
4747 J9Class * clazz ; /* class being looked for */
48- J9VMThread * vmThread ;
48+ J9VMThread * vmThread ;
4949 J9IndexableObject * target ; /* the array */
5050 UDATA size ; /* size of the array */
5151 UDATA storeIndex ; /* current index being stored */
@@ -118,16 +118,16 @@ jint JNICALL Java_com_ibm_oti_vm_VM_getClassPathCount(JNIEnv * env, jclass clazz
118118 * Fill in all the instances of clazz into target.
119119 * return the count of the instances in the system
120120 * if the count is > than the array size, there are more strings than fit.
121- * if count is <= the array size, the array may have null references.
121+ * if count is <= the array size, the array may have null references.
122122 * static void allInstances (Class, Object[])
123123 */
124- jint JNICALL
125- Java_com_ibm_oti_vm_VM_allInstances (JNIEnv * env , jclass unused , jclass clazz , jobjectArray target )
124+ jint JNICALL
125+ Java_com_ibm_oti_vm_VM_allInstances (JNIEnv * env , jclass unused , jclass clazz , jobjectArray target )
126126{
127127 jint count = 0 ;
128128 J9VMThread * vmThread = (J9VMThread * ) env ;
129129 J9JavaVM * javaVM = vmThread -> javaVM ;
130-
130+
131131 if (OMR_GC_ALLOCATION_TYPE_SEGREGATED != javaVM -> gcAllocationType ) {
132132 UDATA savedGCFlags = 0 ;
133133
@@ -153,7 +153,7 @@ Java_com_ibm_oti_vm_VM_allInstances(JNIEnv * env, jclass unused, jclass clazz, j
153153}
154154
155155/**
156- * Return a String object containing a summary of the classes on the heap,
156+ * Return a String object containing a summary of the classes on the heap,
157157 * the number of instances, and their aggregate size.
158158 * This string inserts Unix-style line separators. The caller is responsible for translating them if necessary.
159159 */
@@ -317,12 +317,12 @@ printHeapStatistics(JNIEnv *env,J9HeapStatisticsTableEntry **statsArray,
317317 * String2 has its bytes set to be string1-> bytes if the offsets already match and the bytes are not already set to the same value
318318 * The bytes being set already could happen frequently as this primitive will be used repeatedly to remerge strings in the runtime
319319*/
320- jint JNICALL
321- Java_com_ibm_oti_vm_VM_setCommonData (JNIEnv * env , jclass unused , jobject string1 , jobject string2 )
320+ jint JNICALL
321+ Java_com_ibm_oti_vm_VM_setCommonData (JNIEnv * env , jclass unused , jobject string1 , jobject string2 )
322322{
323323 UDATA allowMerge = 0 ;
324324 J9VMThread * vmThread = (J9VMThread * ) env ;
325- J9JavaVM * javaVM = vmThread -> javaVM ;
325+ J9JavaVM * javaVM = vmThread -> javaVM ;
326326
327327 if (OMR_GC_ALLOCATION_TYPE_SEGREGATED != javaVM -> gcAllocationType ) {
328328 if (string1 == NULL || string2 == NULL ) {
@@ -343,7 +343,7 @@ Java_com_ibm_oti_vm_VM_setCommonData(JNIEnv * env, jclass unused, jobject string
343343 stringBytes2 = J9VMJAVALANGSTRING_VALUE (vmThread , unwrappedString2 );
344344
345345 /* skip merging of bytes if they are already the same. As this primitive is called repeatedly, then its likely the character data will be the same
346- * on repeat calls.
346+ * on repeat calls.
347347 */
348348
349349 if (stringBytes1 == stringBytes2 ) {
@@ -359,13 +359,13 @@ Java_com_ibm_oti_vm_VM_setCommonData(JNIEnv * env, jclass unused, jobject string
359359 }
360360 }
361361
362-
362+
363363 return (jint )allowMerge ;
364364}
365365
366366
367- static UDATA
368- allInstances (JNIEnv * env , jclass clazz , jobjectArray target )
367+ static UDATA
368+ allInstances (JNIEnv * env , jclass clazz , jobjectArray target )
369369{
370370 J9VMThread * vmThread = (J9VMThread * ) env ;
371371 AllInstancesData data ;
@@ -408,9 +408,9 @@ collectInstances (J9JavaVM *vm, J9MM_IterateObjectDescriptor *objDesc, void *sta
408408 if (J9OBJECT_CLAZZ_VM (vm , obj ) == data -> clazz ) {
409409 data -> instanceCount ++ ;
410410 /* fill in the array only if one was passed in */
411- if (data -> target != NULL ) {
411+ if (data -> target != NULL ) {
412412 /* if no room, you can ignore the object and not store it */
413- if (data -> storeIndex < data -> size ) {
413+ if (data -> storeIndex < data -> size ) {
414414 J9JAVAARRAYOFOBJECT_STORE_VM (vm , data -> target , (I_32 )data -> storeIndex , obj );
415415 data -> storeIndex ++ ;
416416 }
@@ -420,8 +420,8 @@ collectInstances (J9JavaVM *vm, J9MM_IterateObjectDescriptor *objDesc, void *sta
420420}
421421
422422
423- static int
424- hasActiveConstructor (J9VMThread * vmThread , J9Class * clazz )
423+ static int
424+ hasActiveConstructor (J9VMThread * vmThread , J9Class * clazz )
425425{
426426 J9JavaVM * vm = vmThread -> javaVM ;
427427 J9VMThread * walkThread ;
@@ -446,7 +446,7 @@ hasActiveConstructor(J9VMThread *vmThread, J9Class *clazz)
446446}
447447
448448
449- static UDATA
449+ static UDATA
450450hasConstructor (J9VMThread * vmThread , J9StackWalkState * state )
451451{
452452 J9Method * method = state -> method ;
@@ -458,9 +458,9 @@ hasConstructor(J9VMThread *vmThread, J9StackWalkState *state)
458458 J9Class * methodClass = J9_CLASS_FROM_METHOD (method );
459459 J9ROMMethod * romMethod = J9_ROM_METHOD_FROM_RAM_METHOD (method );
460460 J9UTF8 * methodName = J9ROMMETHOD_NAME (romMethod );
461-
461+
462462 /* if the method is a constructor in the class we're looking for then quit looking for more
463- * a constructor is a non-static (to filter clinit) method which starts with '<'.
463+ * a constructor is a non-static (to filter clinit) method which starts with '<'.
464464 */
465465 if (methodClass == classToFind ) {
466466 if (!(romMethod -> modifiers & J9AccStatic )) {
@@ -564,7 +564,7 @@ Java_com_ibm_oti_vm_VM_dumpString(JNIEnv * env, jclass clazz, jstring str)
564564
565565 if (utfChars != NULL ) {
566566 Trc_JCL_com_ibm_oti_vm_VM_dumpString (env , utfChars );
567- j9tty_printf (PORTLIB , "%s" , utfChars );
567+ // j9tty_printf(PORTLIB, "%s", utfChars);
568568 (* env )-> ReleaseStringUTFChars (env , str , utfChars );
569569 }
570570 }
0 commit comments