Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPMI: Handle "successful error cases" in near differ on arm64 #91783

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 22 additions & 21 deletions src/coreclr/tools/superpmi/superpmi/neardiffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1247,28 +1247,29 @@ bool NearDiffer::compare(MethodContext* mc, CompileResult* cr1, CompileResult* c
// is a sum of their sizes. The following is to adjust their sizes and the roDataBlock_{1,2} pointers.
if (GetSpmiTargetArchitecture() == SPMI_TARGET_ARCHITECTURE_ARM64)
{
BYTE* nativeEntry_1;
ULONG nativeSizeOfCode_1;
CorJitResult jitResult_1;

BYTE* nativeEntry_2;
ULONG nativeSizeOfCode_2;
CorJitResult jitResult_2;

cr1->repCompileMethod(&nativeEntry_1, &nativeSizeOfCode_1, &jitResult_1);
cr2->repCompileMethod(&nativeEntry_2, &nativeSizeOfCode_2, &jitResult_2);

roDataSize_1 = hotCodeSize_1 - nativeSizeOfCode_1;
roDataSize_2 = hotCodeSize_2 - nativeSizeOfCode_2;

roDataBlock_1 = hotCodeBlock_1 + nativeSizeOfCode_1;
roDataBlock_2 = hotCodeBlock_2 + nativeSizeOfCode_2;

orig_roDataBlock_1 = (void*)((size_t)orig_hotCodeBlock_1 + nativeSizeOfCode_1);
orig_roDataBlock_2 = (void*)((size_t)orig_hotCodeBlock_2 + nativeSizeOfCode_2);
if (hotCodeSize_1 > 0)
{
BYTE* nativeEntry_1;
ULONG nativeSizeOfCode_1;
CorJitResult jitResult_1;
cr1->repCompileMethod(&nativeEntry_1, &nativeSizeOfCode_1, &jitResult_1);
roDataSize_1 = hotCodeSize_1 - nativeSizeOfCode_1;
roDataBlock_1 = hotCodeBlock_1 + nativeSizeOfCode_1;
orig_roDataBlock_1 = (void*)((size_t)orig_hotCodeBlock_1 + nativeSizeOfCode_1);
hotCodeSize_1 = nativeSizeOfCode_1;
}

hotCodeSize_1 = nativeSizeOfCode_1;
hotCodeSize_2 = nativeSizeOfCode_2;
if (hotCodeSize_2 > 0)
{
BYTE* nativeEntry_2;
ULONG nativeSizeOfCode_2;
CorJitResult jitResult_2;
cr2->repCompileMethod(&nativeEntry_2, &nativeSizeOfCode_2, &jitResult_2);
roDataSize_2 = hotCodeSize_2 - nativeSizeOfCode_2;
roDataBlock_2 = hotCodeBlock_2 + nativeSizeOfCode_2;
orig_roDataBlock_2 = (void*)((size_t)orig_hotCodeBlock_2 + nativeSizeOfCode_2);
hotCodeSize_2 = nativeSizeOfCode_2;
}
}

LogDebug("HCS1 %d CCS1 %d RDS1 %d xcpnt1 %d flag1 %08X, HCB %p CCB %p RDB %p ohcb %p occb %p odb %p", hotCodeSize_1,
Expand Down
Loading