@@ -537,6 +537,15 @@ void TR_RelocationRuntime::relocationFailureCleanup()
537
537
}
538
538
}
539
539
540
+ static int32_t strHash (const char *str)
541
+ {
542
+ // The string hash from Java
543
+ int32_t result = 0 ;
544
+ for (const unsigned char *s = reinterpret_cast <const unsigned char *>(str); *s; s++)
545
+ result = result * 33 + *s;
546
+ return result;
547
+ }
548
+
540
549
// Function called for AOT method from both JXE and Shared Classes to perform relocations
541
550
//
542
551
void
@@ -703,6 +712,37 @@ TR_RelocationRuntime::relocateAOTCodeAndData(U_8 *tempDataStart,
703
712
}
704
713
}
705
714
715
+ if (_exceptionTable->inlinedCalls )
716
+ {
717
+ if (comp ()->getOptions ()->getVerboseOption (TR_VerboseInlining))
718
+ {
719
+ U_32 numInlinedCallSites = getNumInlinedCallSites (_exceptionTable);
720
+ int32_t jittedBodyHash = strHash (comp ()->signature ());
721
+ char callerBuf[501 ], calleeBuf[501 ];
722
+ TR_VerboseLog::CriticalSection vlogLock;
723
+ TR_VerboseLog::writeLine (TR_Vlog_INL, " %d methods inlined into %x %s @ %p" , numInlinedCallSites, jittedBodyHash, comp ()->signature (), _exceptionTable->startPC );
724
+ for (auto siteIndex = 0 ; siteIndex < numInlinedCallSites; siteIndex++)
725
+ {
726
+ TR_InlinedCallSite *site = (TR_InlinedCallSite *)getInlinedCallSiteArrayElement (_exceptionTable, siteIndex);
727
+ int32_t calleeLen = fej9 ()->printTruncatedSignature (calleeBuf, sizeof (calleeBuf)-1 , site->_methodInfo );
728
+ calleeBuf[calleeLen] = 0 ; // null terminate
729
+ const char *callerSig = comp ()->signature ();
730
+ int16_t callerIndex = site->_byteCodeInfo .getCallerIndex ();
731
+ if (callerIndex != -1 )
732
+ {
733
+ TR_InlinedCallSite *callerCallsite = (TR_InlinedCallSite *)getInlinedCallSiteArrayElement (_exceptionTable, callerIndex);
734
+ int32_t callerLen = fej9 ()->printTruncatedSignature (callerBuf, sizeof (callerBuf)-1 , callerCallsite->_methodInfo );
735
+ callerBuf[callerLen] = 0 ; // null terminate
736
+ callerSig = callerBuf;
737
+ }
738
+ TR_VerboseLog::writeLine (TR_Vlog_INL, " #%d: %x #%d inlined %x@%d -> %x bcsz=%d %s" ,
739
+ siteIndex, jittedBodyHash, callerIndex,
740
+ strHash (callerSig), site->_byteCodeInfo .getByteCodeIndex (),
741
+ strHash (calleeBuf), TR::Compiler->mtd .bytecodeSize (site->_methodInfo ), calleeBuf);
742
+ }
743
+ }
744
+ }
745
+
706
746
// Fix RAM method and send target AFTER all relocations are complete.
707
747
startPC = _exceptionTable->startPC ;
708
748
} // end if J9_JIT_DCE_EXCEPTION_INFO
0 commit comments