From 925815934b85b99f33d6c9f6d72d03d35247b6d7 Mon Sep 17 00:00:00 2001 From: Irwin D'Souza Date: Thu, 29 Sep 2022 12:02:25 -0400 Subject: [PATCH] Add missing relos in dumpRelocationHeaderData TR_InlinedStaticMethod, TR_InlinedSpecialMethod, and TR_InlinedAbstractMethod were missed in the debug code that dumps out the relocation data. As the codes tands, if the compiler generates these relocations, it will assert when trying to dump. Signed-off-by: Irwin D'Souza --- runtime/compiler/codegen/J9AheadOfTimeCompile.cpp | 3 +++ runtime/compiler/runtime/RelocationRecord.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/runtime/compiler/codegen/J9AheadOfTimeCompile.cpp b/runtime/compiler/codegen/J9AheadOfTimeCompile.cpp index b2b112dab0c..0518d60814e 100644 --- a/runtime/compiler/codegen/J9AheadOfTimeCompile.cpp +++ b/runtime/compiler/codegen/J9AheadOfTimeCompile.cpp @@ -1683,6 +1683,9 @@ J9::AheadOfTimeCompile::dumpRelocationHeaderData(uint8_t *cursor, bool isVerbose case TR_InlinedInterfaceMethod: case TR_InlinedVirtualMethod: + case TR_InlinedStaticMethod: + case TR_InlinedSpecialMethod: + case TR_InlinedAbstractMethod: { TR_RelocationRecordInlinedMethod *imRecord = reinterpret_cast(reloRecord); diff --git a/runtime/compiler/runtime/RelocationRecord.cpp b/runtime/compiler/runtime/RelocationRecord.cpp index 5a38731faf3..fb460716838 100644 --- a/runtime/compiler/runtime/RelocationRecord.cpp +++ b/runtime/compiler/runtime/RelocationRecord.cpp @@ -6425,8 +6425,8 @@ uint32_t TR_RelocationRecord::_relocationRecordHeaderSizeTable[TR_NumExternalRel sizeof(TR_RelocationRecordConstantPoolBinaryTemplate), // TR_MethodObject = 6 0, // TR_InterfaceObject = 7 sizeof(TR_RelocationRecordHelperAddressBinaryTemplate), // TR_AbsoluteHelperAddress = 8 - sizeof(TR_RelocationRecordWithOffsetBinaryTemplate), // TR_FixedSeqAddress = 9 - sizeof(TR_RelocationRecordWithOffsetBinaryTemplate), // TR_FixedSeq2Address = 10 + sizeof(TR_RelocationRecordWithOffsetBinaryTemplate), // TR_FixedSequenceAddress = 9 + sizeof(TR_RelocationRecordWithOffsetBinaryTemplate), // TR_FixedSequenceAddress2 = 10 sizeof(TR_RelocationRecordDirectToJNIBinaryTemplate), // TR_JNIVirtualTargetAddress = 11 sizeof(TR_RelocationRecordDirectToJNIBinaryTemplate), // TR_JNIStaticTargetAddress = 12 sizeof(TR_RelocationRecordBinaryTemplate), // TR_ArrayCopyHelper = 13 @@ -6499,8 +6499,8 @@ uint32_t TR_RelocationRecord::_relocationRecordHeaderSizeTable[TR_NumExternalRel 0, // TR_ValidateRomClass = 80 0, // TR_ValidatePrimitiveClass = 81 0, // TR_ValidateMethodFromInlinedSite = 82 - 0, // TR_ValidatedMethodByName = 83 - sizeof(TR_RelocationRecordValidateMethodFromClassBinaryTemplate), // TR_ValidatedMethodFromClass = 84 + 0, // TR_ValidateMethodByName = 83 + sizeof(TR_RelocationRecordValidateMethodFromClassBinaryTemplate), // TR_ValidateMethodFromClass = 84 sizeof(TR_RelocationRecordValidateMethodFromCPBinaryTemplate), // TR_ValidateStaticMethodFromCP = 85 sizeof(TR_RelocationRecordValidateMethodFromCPBinaryTemplate), // TR_ValidateSpecialMethodFromCP = 86 sizeof(TR_RelocationRecordValidateMethodFromCPBinaryTemplate), // TR_ValidateVirtualMethodFromCP = 87