@@ -2925,9 +2925,9 @@ JavaCoreDumpWriter::writeSynchronousCompilationSection(void)
29252925 OMRPORT_ACCESS_FROM_J9PORT (PORTLIB );
29262926
29272927 J9JITConfig *jitConfig = _VirtualMachine->jitConfig ;
2928- if (NULL == jitConfig || NULL == jitConfig->syncCompStats ) {
2929- return ;
2930- }
2928+ if (( NULL == jitConfig) || ( NULL == jitConfig->syncCompStats ) ) {
2929+ return ;
2930+ }
29312931
29322932 J9JITSyncCompilationStatistics *stats = jitConfig->syncCompStats ;
29332933
@@ -2936,57 +2936,58 @@ JavaCoreDumpWriter::writeSynchronousCompilationSection(void)
29362936 _OutputStream.writeCharacters (" 1NOTE This data is reset after each javacore file is written\n " );
29372937 _OutputStream.writeCharacters (" NULL ------------------------------------------------------------------------\n " );
29382938 _OutputStream.writeCharacters (" 1JITSYNCSTATS Synchronous Compilation Statistics\n " );
2939- _OutputStream.writeCharacters (" NULL ------------------------------------------------------------------------\n " );
2939+ _OutputStream.writeCharacters (" NULL ------------------------------------------------------------------------\n " );
29402940 _OutputStream.writeCharacters (" 2JITSYNCCOUNT Total synchronous compilations: " );
2941- _OutputStream.writeInteger (stats->totalCount , " %u" );
2942- _OutputStream.writeCharacters (" \n " );
2941+ _OutputStream.writeInteger (stats->totalCount , " %u" );
2942+ _OutputStream.writeCharacters (" \n " );
29432943 _OutputStream.writeCharacters (" 2JITTOTALWAIT Total application wait time: " );
2944- _OutputStream.writeInteger (stats->totalWaitTime , " %llu" );
2945- _OutputStream.writeCharacters (" us\n " );
2944+ _OutputStream.writeInteger (stats->totalWaitTime , " %llu" );
2945+ _OutputStream.writeCharacters (" us\n " );
29462946 for (int i = 0 ; i < J9_LONGEST_SYNC_COMP ; i++) {
2947- if (stats->longestWaitMethods [i].waitTime == 0 || stats->longestWaitMethods [i].method == NULL )
2947+ J9JITLongestSyncComp &longestWaitMethod = stats->longestWaitMethods [i];
2948+ if ((0 == longestWaitMethod.waitTime ) || (NULL == longestWaitMethod.method )) {
29482949 break ;
2950+ }
29492951 _OutputStream.writeCharacters (" 2JITLONGEST " );
29502952 _OutputStream.writeInteger64 (i + 1 , " %zu" );
29512953 _OutputStream.writeCharacters (" . Longest Synchronous Compilation\n " );
29522954
29532955 _OutputStream.writeCharacters (" 3JITWAITTIME Wait time: " );
2954- _OutputStream.writeInteger (stats-> longestWaitMethods [i] .waitTime , " %llu" );
2956+ _OutputStream.writeInteger (longestWaitMethod .waitTime , " %llu" );
29552957 _OutputStream.writeCharacters (" us\n " );
29562958
29572959 _OutputStream.writeCharacters (" 3JITENDTIME Wait time end: " );
29582960 omrstr_ftime_ex (timeStamp, _MaximumTimeStampLength, " %Y-%m-%dT%H:%M:%S" ,
2959- stats-> longestWaitMethods [i] .waitTimeEnd , OMRSTR_FTIME_FLAG_LOCAL );
2961+ longestWaitMethod .waitTimeEnd , OMRSTR_FTIME_FLAG_LOCAL );
29602962 timeStamp[_MaximumTimeStampLength] = ' \0 ' ;
29612963 _OutputStream.writeCharacters (timeStamp);
2962- _OutputStream.writeInteger64 (stats-> longestWaitMethods [i] .waitTimeEnd % 1000 , " .%03llu" );
2964+ _OutputStream.writeInteger64 (longestWaitMethod .waitTimeEnd % 1000 , " .%03llu" );
29632965 _OutputStream.writeCharacters (" \n " );
29642966
29652967 _OutputStream.writeCharacters (" 3JITMETHOD Method: " );
2966- _OutputStream.writeCharacters (stats-> longestWaitMethods [i] .method );
2968+ _OutputStream.writeCharacters (longestWaitMethod .method );
29672969 _OutputStream.writeCharacters (" \n " );
29682970
2969- if (stats->longestWaitMethods [i].thread != NULL ) {
2970- _OutputStream.writeCharacters (" 3JITTHREAD Thread: " );
2971- _OutputStream.writeCharacters (stats->longestWaitMethods [i].thread );
2972- _OutputStream.writeCharacters (" \n " );
2973- }
2971+ _OutputStream.writeCharacters (" 3JITTHREAD Thread: " );
2972+ _OutputStream.writeCharacters (longestWaitMethod.thread );
2973+ _OutputStream.writeCharacters (" \n " );
29742974 }
29752975
29762976 stats->totalCount = 0 ;
2977- stats->totalWaitTime = 0 ;
2977+ stats->totalWaitTime = 0 ;
29782978 for (int i = 0 ; i < J9_LONGEST_SYNC_COMP ; i++) {
2979- stats->longestWaitMethods [i].waitTime = 0 ;
2980- stats->longestWaitMethods [i].waitTimeEnd = 0 ;
2981- if (stats->longestWaitMethods [i].method != NULL ) {
2982- j9mem_free_memory (stats->longestWaitMethods [i].method );
2983- stats->longestWaitMethods [i].method = NULL ;
2984- }
2985- if (stats->longestWaitMethods [i].thread != NULL ) {
2986- j9mem_free_memory (stats->longestWaitMethods [i].thread );
2987- stats->longestWaitMethods [i].thread = NULL ;
2988- }
2989- }
2979+ J9JITLongestSyncComp &longestWaitMethod = stats->longestWaitMethods [i];
2980+ longestWaitMethod.waitTime = 0 ;
2981+ longestWaitMethod.waitTimeEnd = 0 ;
2982+ if (NULL != longestWaitMethod.method ) {
2983+ j9mem_free_memory (longestWaitMethod.method );
2984+ longestWaitMethod.method = NULL ;
2985+ }
2986+ if (NULL != longestWaitMethod.thread ) {
2987+ j9mem_free_memory (longestWaitMethod.thread );
2988+ longestWaitMethod.thread = NULL ;
2989+ }
2990+ }
29902991}
29912992
29922993#if defined(OMR_OPT_CUDA)
0 commit comments