diff options
author | Brian Sullivan <briansul@microsoft.com> | 2019-05-07 10:35:05 -0700 |
---|---|---|
committer | Brian Sullivan <briansul@microsoft.com> | 2019-05-07 10:36:02 -0700 |
commit | 68b4810203d7f6f1b4b7a4823a8d7610cda44190 (patch) | |
tree | cb648eea43db9b3f36981a053bdef2de280f552f /src/ToolBox | |
parent | c2e71fd5e711ca150e238741015a1a0229606793 (diff) | |
download | coreclr-68b4810203d7f6f1b4b7a4823a8d7610cda44190.tar.gz coreclr-68b4810203d7f6f1b4b7a4823a8d7610cda44190.tar.bz2 coreclr-68b4810203d7f6f1b4b7a4823a8d7610cda44190.zip |
Rename struct ICorJitInfo::ProfileBuffer to ICorJitInfo::BlockCounts
Rename method ICorJitInfo::allocBBProfileBuffer to ICorJitInfo::allocMethodBlockCounts
Rename method ICorJitInfo::getBBProfileData to ICorJitInfo:"getMethodBlockCounts
Rename args and use DWORD instead of ULONG for ICorJitInfo:allocMethodBlockCounts and ICorJitInfo:getMethodBlockCounts
Rename Compiler::fgProfileBuffer to Compiler::fgBlockCounts
Use an #ifdef FEATURE_CORECLR to fix the missing CORINFO_FLG_DISABLE_TIER0_FOR_LOOPS flag on the desktop.
Make fgBlockCountsCount and fgNumProfileRuns DWORDs instead of ULONGs
Rename local var bbCurrentBlockProfileBuffer to currentBlockCounts
Rename local var bbProfileBufferStart to profileBlockCountsStart
Use DWORD when iterating over BlockCounts instead of ULONG
Rename ZapImage::hashBBProfileData to ZapImage::hashMethodBlockCounts
SuperPMI - Fixed all references to allocBBProfileBuffer => allocMethodBlockCounts
SuperPMI - fixed all reference to getBBProfileBuffer => getMethodBlockCounts
Diffstat (limited to 'src/ToolBox')
11 files changed, 117 insertions, 117 deletions
diff --git a/src/ToolBox/superpmi/superpmi-shared/compileresult.cpp b/src/ToolBox/superpmi/superpmi-shared/compileresult.cpp index 251666a823..d8ce7689da 100644 --- a/src/ToolBox/superpmi/superpmi-shared/compileresult.cpp +++ b/src/ToolBox/superpmi/superpmi-shared/compileresult.cpp @@ -930,36 +930,36 @@ void CompileResult::dmpAllocUnwindInfo(DWORD key, const Agnostic_AllocUnwindInfo value.pUnwindBlock_index, value.funcKind); } -void CompileResult::recAllocBBProfileBuffer(ULONG count, ICorJitInfo::ProfileBuffer** profileBuffer, HRESULT result) +void CompileResult::recAllocMethodBlockCounts(ULONG count, ICorJitInfo::BlockCounts** pBlockCounts, HRESULT result) { - if (AllocBBProfileBuffer == nullptr) - AllocBBProfileBuffer = new LightWeightMap<DWORD, Agnostic_AllocBBProfileBuffer>(); + if (AllocMethodBlockCounts == nullptr) + AllocMethodBlockCounts = new LightWeightMap<DWORD, Agnostic_AllocMethodBlockCounts>(); - Agnostic_AllocBBProfileBuffer value; + Agnostic_AllocMethodBlockCounts value; value.count = (DWORD)count; value.result = (DWORD)result; - value.profileBuffer_index = - AllocBBProfileBuffer->AddBuffer((unsigned char*)*profileBuffer, count * sizeof(ICorJitInfo::ProfileBuffer)); + value.pBlockCounts_index = + AllocMethodBlockCounts->AddBuffer((unsigned char*)*pBlockCounts, count * sizeof(ICorJitInfo::BlockCounts)); - AllocBBProfileBuffer->Add((DWORD)0, value); + AllocMethodBlockCounts->Add((DWORD)0, value); } -void CompileResult::dmpAllocBBProfileBuffer(DWORD key, const Agnostic_AllocBBProfileBuffer& value) +void CompileResult::dmpAllocMethodBlockCounts(DWORD key, const Agnostic_AllocMethodBlockCounts& value) { - printf("AllocBBProfileBuffer key %u, value cnt-%u ind-%u res-%08X", key, value.count, value.profileBuffer_index, + printf("AllocMethodBlockCounts key %u, value cnt-%u ind-%u res-%08X", key, value.count, value.pBlockCounts_index, value.result); } -HRESULT CompileResult::repAllocBBProfileBuffer(ULONG count, ICorJitInfo::ProfileBuffer** profileBuffer) +HRESULT CompileResult::repAllocMethodBlockCounts(ULONG count, ICorJitInfo::BlockCounts** pBlockCounts) { - Agnostic_AllocBBProfileBuffer value; - value = AllocBBProfileBuffer->Get((DWORD)0); + Agnostic_AllocMethodBlockCounts value; + value = AllocMethodBlockCounts->Get((DWORD)0); if (count != value.count) __debugbreak(); HRESULT result = (HRESULT)value.result; - *profileBuffer = (ICorJitInfo::ProfileBuffer*)AllocBBProfileBuffer->GetBuffer(value.profileBuffer_index); - recAddressMap((void*)0x4242, (void*)*profileBuffer, count * (sizeof(ICorJitInfo::ProfileBuffer))); + *pBlockCounts = (ICorJitInfo::BlockCounts*)AllocMethodBlockCounts->GetBuffer(value.pBlockCounts_index); + recAddressMap((void*)0x4242, (void*)*pBlockCounts, count * (sizeof(ICorJitInfo::BlockCounts))); return result; } diff --git a/src/ToolBox/superpmi/superpmi-shared/compileresult.h b/src/ToolBox/superpmi/superpmi-shared/compileresult.h index 1d44a1a2ce..9fa9e45446 100644 --- a/src/ToolBox/superpmi/superpmi-shared/compileresult.h +++ b/src/ToolBox/superpmi/superpmi-shared/compileresult.h @@ -121,10 +121,10 @@ public: DWORD HandlerLength; DWORD ClassToken; // one view of symetric union }; - struct Agnostic_AllocBBProfileBuffer + struct Agnostic_AllocMethodBlockCounts { DWORD count; - DWORD profileBuffer_index; + DWORD pBlockCounts_index; DWORD result; }; struct Agnostic_CORINFO_SIG_INFO2 @@ -279,9 +279,9 @@ public: CorJitFuncKind funcKind); void dmpAllocUnwindInfo(DWORD key, const Agnostic_AllocUnwindInfo& value); - void recAllocBBProfileBuffer(ULONG count, ICorJitInfo::ProfileBuffer** profileBuffer, HRESULT result); - void dmpAllocBBProfileBuffer(DWORD key, const Agnostic_AllocBBProfileBuffer& value); - HRESULT repAllocBBProfileBuffer(ULONG count, ICorJitInfo::ProfileBuffer** profileBuffer); + void recAllocMethodBlockCounts(ULONG count, ICorJitInfo::BlockCounts** pBlockCounts, HRESULT result); + void dmpAllocMethodBlockCounts(DWORD key, const Agnostic_AllocMethodBlockCounts& value); + HRESULT repAllocMethodBlockCounts(ULONG count, ICorJitInfo::BlockCounts** pBlockCounts); void recRecordCallSite(ULONG instrOffset, CORINFO_SIG_INFO* callSig, CORINFO_METHOD_HANDLE methodHandle); void dmpRecordCallSite(DWORD key, const Agnostic_RecordCallSite& value); diff --git a/src/ToolBox/superpmi/superpmi-shared/crlwmlist.h b/src/ToolBox/superpmi/superpmi-shared/crlwmlist.h index 84bf13e553..72fa54043a 100644 --- a/src/ToolBox/superpmi/superpmi-shared/crlwmlist.h +++ b/src/ToolBox/superpmi/superpmi-shared/crlwmlist.h @@ -19,7 +19,7 @@ #endif LWM(AddressMap, DWORDLONG, CompileResult::Agnostic_AddressMap) -LWM(AllocBBProfileBuffer, DWORD, CompileResult::Agnostic_AllocBBProfileBuffer) +LWM(AllocMethodBlockCounts, DWORD, CompileResult::Agnostic_AllocMethodBlockCounts) LWM(AllocGCInfo, DWORD, CompileResult::Agnostic_AllocGCInfo) LWM(AllocMem, DWORD, CompileResult::Agnostic_AllocMemDetails) DENSELWM(AllocUnwindInfo, CompileResult::Agnostic_AllocUnwindInfo) diff --git a/src/ToolBox/superpmi/superpmi-shared/icorjitinfoimpl.h b/src/ToolBox/superpmi/superpmi-shared/icorjitinfoimpl.h index fe4ed6a5ff..52526fa16f 100644 --- a/src/ToolBox/superpmi/superpmi-shared/icorjitinfoimpl.h +++ b/src/ToolBox/superpmi/superpmi-shared/icorjitinfoimpl.h @@ -1017,7 +1017,7 @@ int doAssert(const char* szFile, int iLine, const char* szExpr); void reportFatalError(CorJitResult result); /* -struct ProfileBuffer // Also defined here: code:CORBBTPROF_BLOCK_DATA +struct BlockCounts // Also defined here: code:CORBBTPROF_BLOCK_DATA { ULONG ILOffset; ULONG ExecutionCount; @@ -1026,15 +1026,15 @@ struct ProfileBuffer // Also defined here: code:CORBBTPROF_BLOCK_DATA // allocate a basic block profile buffer where execution counts will be stored // for jitted basic blocks. -HRESULT allocBBProfileBuffer(ULONG count, // The number of basic blocks that we have - ProfileBuffer** profileBuffer); +HRESULT allocMethodBlockCounts(DWORD count, // The number of basic blocks that we have + BlockCounts** pBlockCounts); // get profile information to be used for optimizing the current method. The format -// of the buffer is the same as the format the JIT passes to allocBBProfileBuffer. -HRESULT getBBProfileData(CORINFO_METHOD_HANDLE ftnHnd, - ULONG* count, // The number of basic blocks that we have - ProfileBuffer** profileBuffer, - ULONG* numRuns); +// of the buffer is the same as the format the JIT passes to allocMethodBlockCounts. +HRESULT getMethodBlockCounts(CORINFO_METHOD_HANDLE ftnHnd, + DWORD* pCount, // The number of basic blocks that we have + BlockCounts** pBlockCounts, + DWORD* pNumRuns); // Associates a native call site, identified by its offset in the native code stream, with // the signature information and method handle the JIT used to lay out the call site. If diff --git a/src/ToolBox/superpmi/superpmi-shared/lwmlist.h b/src/ToolBox/superpmi/superpmi-shared/lwmlist.h index 4fe06d2fd7..36b8469c4d 100644 --- a/src/ToolBox/superpmi/superpmi-shared/lwmlist.h +++ b/src/ToolBox/superpmi/superpmi-shared/lwmlist.h @@ -56,7 +56,7 @@ LWM(GetArgNext, DWORDLONG, DWORDLONG) LWM(GetArgType, GetArgTypeValue, Agnostic_GetArgType_Value) LWM(GetArrayInitializationData, DLD, DWORDLONG) LWM(GetArrayRank, DWORDLONG, DWORD) -LWM(GetBBProfileData, DWORDLONG, Agnostic_GetBBProfileData) +LWM(GetMethodBlockCounts, DWORDLONG, Agnostic_GetMethodBlockCounts) LWM(GetBoundaries, DWORDLONG, Agnostic_GetBoundaries) LWM(GetBoxHelper, DWORDLONG, DWORD) LWM(GetBuiltinClass, DWORD, DWORDLONG) diff --git a/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp b/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp index ebe7808ee5..a832cae50d 100644 --- a/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp +++ b/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp @@ -5237,49 +5237,49 @@ DWORD MethodContext::repGetFieldThreadLocalStoreID(CORINFO_FIELD_HANDLE field, v return (DWORD)value.B; } -void MethodContext::recGetBBProfileData(CORINFO_METHOD_HANDLE ftnHnd, - ULONG* count, - ICorJitInfo::ProfileBuffer** profileBuffer, - ULONG* numRuns, - HRESULT result) +void MethodContext::recGetMethodBlockCounts(CORINFO_METHOD_HANDLE ftnHnd, + DWORD* pCount, + ICorJitInfo::BlockCounts** pBlockCounts, + DWORD* pNumRuns, + HRESULT result) { - if (GetBBProfileData == nullptr) - GetBBProfileData = new LightWeightMap<DWORDLONG, Agnostic_GetBBProfileData>(); + if (GetMethodBlockCounts == nullptr) + GetMethodBlockCounts = new LightWeightMap<DWORDLONG, Agnostic_GetMethodBlockCounts>(); - Agnostic_GetBBProfileData value; + Agnostic_GetMethodBlockCounts value; - value.count = (DWORD)*count; - value.profileBuffer_index = - GetBBProfileData->AddBuffer((unsigned char*)*profileBuffer, sizeof(ICorJitInfo::ProfileBuffer) * (*count)); - value.numRuns = (DWORD)*numRuns; + value.count = (DWORD)*pCount; + value.pBlockCounts_index = + GetMethodBlockCounts->AddBuffer((unsigned char*)*pBlockCounts, sizeof(ICorJitInfo::BlockCounts) * (*pCount)); + value.numRuns = (DWORD)*pNumRuns; value.result = (DWORD)result; - GetBBProfileData->Add((DWORDLONG)ftnHnd, value); + GetMethodBlockCounts->Add((DWORDLONG)ftnHnd, value); } -void MethodContext::dmpGetBBProfileData(DWORDLONG key, const Agnostic_GetBBProfileData& value) +void MethodContext::dmpGetMethodBlockCounts(DWORDLONG key, const Agnostic_GetMethodBlockCounts& value) { - printf("GetBBProfileData key ftn-%016llX, value cnt-%u profileBuf-", key, value.count); - ICorJitInfo::ProfileBuffer* pBuf = - (ICorJitInfo::ProfileBuffer*)GetBBProfileData->GetBuffer(value.profileBuffer_index); + printf("GetMethodBlockCounts key ftn-%016llX, value cnt-%u profileBuf-", key, value.count); + ICorJitInfo::BlockCounts* pBuf = + (ICorJitInfo::BlockCounts*)GetMethodBlockCounts->GetBuffer(value.pBlockCounts_index); for (DWORD i = 0; i < value.count; i++, pBuf++) { printf("{il-%u,cnt-%u}", pBuf->ILOffset, pBuf->ExecutionCount); } - GetBBProfileData->Unlock(); + GetMethodBlockCounts->Unlock(); printf(" numRuns-%u result-%u", value.numRuns, value.result); } -HRESULT MethodContext::repGetBBProfileData(CORINFO_METHOD_HANDLE ftnHnd, - ULONG* count, - ICorJitInfo::ProfileBuffer** profileBuffer, - ULONG* numRuns) +HRESULT MethodContext::repGetMethodBlockCounts(CORINFO_METHOD_HANDLE ftnHnd, + DWORD* pCount, + ICorJitInfo::BlockCounts** pBlockCounts, + DWORD* pNumRuns) { - Agnostic_GetBBProfileData tempValue; + Agnostic_GetMethodBlockCounts tempValue; - tempValue = GetBBProfileData->Get((DWORDLONG)ftnHnd); + tempValue = GetMethodBlockCounts->Get((DWORDLONG)ftnHnd); - *count = (ULONG)tempValue.count; - *profileBuffer = (ICorJitInfo::ProfileBuffer*)GetBBProfileData->GetBuffer(tempValue.profileBuffer_index); - *numRuns = (ULONG)tempValue.numRuns; + *pCount = (ULONG)tempValue.count; + *pBlockCounts = (ICorJitInfo::BlockCounts*)GetMethodBlockCounts->GetBuffer(tempValue.pBlockCounts_index); + *pNumRuns = (ULONG)tempValue.numRuns; HRESULT result = (HRESULT)tempValue.result; return result; } diff --git a/src/ToolBox/superpmi/superpmi-shared/methodcontext.h b/src/ToolBox/superpmi/superpmi-shared/methodcontext.h index 8de6a070f0..d69ed715c8 100644 --- a/src/ToolBox/superpmi/superpmi-shared/methodcontext.h +++ b/src/ToolBox/superpmi/superpmi-shared/methodcontext.h @@ -425,10 +425,10 @@ public: DWORDLONG method; DWORDLONG delegateCls; }; - struct Agnostic_GetBBProfileData + struct Agnostic_GetMethodBlockCounts { DWORD count; - DWORD profileBuffer_index; + DWORD pBlockCounts_index; DWORD numRuns; DWORD result; }; @@ -1189,16 +1189,16 @@ public: void dmpGetFieldThreadLocalStoreID(DWORDLONG key, DLD value); DWORD repGetFieldThreadLocalStoreID(CORINFO_FIELD_HANDLE field, void** ppIndirection); - void recGetBBProfileData(CORINFO_METHOD_HANDLE ftnHnd, - ULONG* count, - ICorJitInfo::ProfileBuffer** profileBuffer, - ULONG* numRuns, + void recGetMethodBlockCounts(CORINFO_METHOD_HANDLE ftnHnd, + DWORD* pCount, + ICorJitInfo::BlockCounts** pBlockCounts, + DWORD* pNumRuns, HRESULT result); - void dmpGetBBProfileData(DWORDLONG key, const Agnostic_GetBBProfileData& value); - HRESULT repGetBBProfileData(CORINFO_METHOD_HANDLE ftnHnd, - ULONG* count, - ICorJitInfo::ProfileBuffer** profileBuffer, - ULONG* numRuns); + void dmpGetMethodBlockCounts(DWORDLONG key, const Agnostic_GetMethodBlockCounts& value); + HRESULT repGetMethodBlockCounts(CORINFO_METHOD_HANDLE ftnHnd, + DWORD* pCount, + ICorJitInfo::BlockCounts** pBlockCounts, + DWORD* pNumRuns); void recMergeClasses(CORINFO_CLASS_HANDLE cls1, CORINFO_CLASS_HANDLE cls2, CORINFO_CLASS_HANDLE result); void dmpMergeClasses(DLDL key, DWORDLONG value); @@ -1405,7 +1405,7 @@ enum mcPackets Packet_GetArgType = 140, // retired as 30 on 2013/07/03 Packet_GetArrayInitializationData = 31, Packet_GetArrayRank = 32, - Packet_GetBBProfileData = 33, + Packet_GetMethodBlockCounts = 33, Packet_GetBoundaries = 34, Packet_GetBoxHelper = 35, Packet_GetBuiltinClass = 36, @@ -1508,7 +1508,7 @@ enum mcPackets Packet_ShouldEnforceCallvirtRestriction = 112, PacketCR_AddressMap = 113, - PacketCR_AllocBBProfileBuffer = 131, + PacketCR_AllocMethodBlockCounts = 131, PacketCR_AllocGCInfo = 114, PacketCR_AllocMem = 115, PacketCR_AllocUnwindInfo = 132, diff --git a/src/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp b/src/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp index 79071488a7..794bb3a031 100644 --- a/src/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp +++ b/src/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp @@ -2117,25 +2117,25 @@ void interceptor_ICJI::reportFatalError(CorJitResult result) // allocate a basic block profile buffer where execution counts will be stored // for jitted basic blocks. -HRESULT interceptor_ICJI::allocBBProfileBuffer(ULONG count, // The number of basic blocks that we have - ProfileBuffer** profileBuffer) +HRESULT interceptor_ICJI::allocMethodBlockCounts(DWORD count, // The number of basic blocks that we have + BlockCounts** pBlockCounts) { - mc->cr->AddCall("allocBBProfileBuffer"); - HRESULT result = original_ICorJitInfo->allocBBProfileBuffer(count, profileBuffer); - mc->cr->recAllocBBProfileBuffer(count, profileBuffer, result); + mc->cr->AddCall("allocMethodBlockCounts"); + HRESULT result = original_ICorJitInfo->allocMethodBlockCounts(count, pBlockCounts); + mc->cr->recAllocMethodBlockCounts(count, pBlockCounts, result); return result; } // get profile information to be used for optimizing the current method. The format -// of the buffer is the same as the format the JIT passes to allocBBProfileBuffer. -HRESULT interceptor_ICJI::getBBProfileData(CORINFO_METHOD_HANDLE ftnHnd, - ULONG* count, // The number of basic blocks that we have - ProfileBuffer** profileBuffer, - ULONG* numRuns) -{ - mc->cr->AddCall("getBBProfileData"); - HRESULT temp = original_ICorJitInfo->getBBProfileData(ftnHnd, count, profileBuffer, numRuns); - mc->recGetBBProfileData(ftnHnd, count, profileBuffer, numRuns, temp); +// of the buffer is the same as the format the JIT passes to allocMethodBlockCounts. +HRESULT interceptor_ICJI::getMethodBlockCounts(CORINFO_METHOD_HANDLE ftnHnd, + DWORD* pCount, // The number of basic blocks that we have + BlockCounts** pBlockCounts, + DWORD* pNumRuns) +{ + mc->cr->AddCall("getMethodBlockCounts"); + HRESULT temp = original_ICorJitInfo->getMethodBlockCounts(ftnHnd, pCount, pBlockCounts, pNumRuns); + mc->recGetMethodBlockCounts(ftnHnd, pCount, pBlockCounts, pNumRuns, temp); return temp; } diff --git a/src/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp b/src/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp index 044f1f2c4a..94f4385170 100644 --- a/src/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp +++ b/src/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp @@ -1671,7 +1671,7 @@ void interceptor_ICJI::reportFatalError(CorJitResult result) } /* -struct ProfileBuffer // Also defined here: code:CORBBTPROF_BLOCK_DATA +struct BlockCounts // Also defined here: code:CORBBTPROF_BLOCK_DATA { ULONG ILOffset; ULONG ExecutionCount; @@ -1680,22 +1680,22 @@ struct ProfileBuffer // Also defined here: code:CORBBTPROF_BLOCK_DATA // allocate a basic block profile buffer where execution counts will be stored // for jitted basic blocks. -HRESULT interceptor_ICJI::allocBBProfileBuffer(ULONG count, // The number of basic blocks that we have - ProfileBuffer** profileBuffer) +HRESULT interceptor_ICJI::allocMethodBlockCounts(DWORD count, // The number of basic blocks that we have + BlockCounts** pBlockCounts) { - mcs->AddCall("allocBBProfileBuffer"); - return original_ICorJitInfo->allocBBProfileBuffer(count, profileBuffer); + mcs->AddCall("allocMethodBlockCounts"); + return original_ICorJitInfo->allocMethodBlockCounts(count, pBlockCounts); } // get profile information to be used for optimizing the current method. The format -// of the buffer is the same as the format the JIT passes to allocBBProfileBuffer. -HRESULT interceptor_ICJI::getBBProfileData(CORINFO_METHOD_HANDLE ftnHnd, - ULONG* count, // The number of basic blocks that we have - ProfileBuffer** profileBuffer, - ULONG* numRuns) -{ - mcs->AddCall("getBBProfileData"); - return original_ICorJitInfo->getBBProfileData(ftnHnd, count, profileBuffer, numRuns); +// of the buffer is the same as the format the JIT passes to allocMethodBlockCounts. +HRESULT interceptor_ICJI::getMethodBlockCounts(CORINFO_METHOD_HANDLE ftnHnd, + DWORD* pCount, // The number of basic blocks that we have + BlockCounts** pBlockCounts, + DWORD* pNumRuns) +{ + mcs->AddCall("getMethodBlockCounts"); + return original_ICorJitInfo->getMethodBlockCounts(ftnHnd, pCount, pBlockCounts, pNumRuns); } // Associates a native call site, identified by its offset in the native code stream, with diff --git a/src/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp b/src/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp index 49dd2423e1..95cc39e722 100644 --- a/src/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp +++ b/src/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp @@ -1497,20 +1497,20 @@ void interceptor_ICJI::reportFatalError(CorJitResult result) // allocate a basic block profile buffer where execution counts will be stored // for jitted basic blocks. -HRESULT interceptor_ICJI::allocBBProfileBuffer(ULONG count, // The number of basic blocks that we have - ProfileBuffer** profileBuffer) +HRESULT interceptor_ICJI::allocMethodBlockCounts(DWORD count, // The number of basic blocks that we have + BlockCounts** pBlockCounts) { - return original_ICorJitInfo->allocBBProfileBuffer(count, profileBuffer); + return original_ICorJitInfo->allocMethodBlockCounts(count, pBlockCounts); } // get profile information to be used for optimizing the current method. The format -// of the buffer is the same as the format the JIT passes to allocBBProfileBuffer. -HRESULT interceptor_ICJI::getBBProfileData(CORINFO_METHOD_HANDLE ftnHnd, - ULONG* count, // The number of basic blocks that we have - ProfileBuffer** profileBuffer, - ULONG* numRuns) +// of the buffer is the same as the format the JIT passes to allocMethodBlockCounts. +HRESULT interceptor_ICJI::getMethodBlockCounts(CORINFO_METHOD_HANDLE ftnHnd, + DWORD* pCount, // The number of basic blocks that we have + BlockCounts** pBlockCounts, + DWORD* pNumRuns) { - return original_ICorJitInfo->getBBProfileData(ftnHnd, count, profileBuffer, numRuns); + return original_ICorJitInfo->getMethodBlockCounts(ftnHnd, pCount, pBlockCounts, pNumRuns); } // Associates a native call site, identified by its offset in the native code stream, with diff --git a/src/ToolBox/superpmi/superpmi/icorjitinfo.cpp b/src/ToolBox/superpmi/superpmi/icorjitinfo.cpp index 377ad1d054..168c51a76b 100644 --- a/src/ToolBox/superpmi/superpmi/icorjitinfo.cpp +++ b/src/ToolBox/superpmi/superpmi/icorjitinfo.cpp @@ -1810,22 +1810,22 @@ void MyICJI::reportFatalError(CorJitResult result) // allocate a basic block profile buffer where execution counts will be stored // for jitted basic blocks. -HRESULT MyICJI::allocBBProfileBuffer(ULONG count, // The number of basic blocks that we have - ProfileBuffer** profileBuffer) +HRESULT MyICJI::allocMethodBlockCounts(DWORD count, // The number of basic blocks that we have + BlockCounts** pBlockCounts) { - jitInstance->mc->cr->AddCall("allocBBProfileBuffer"); - return jitInstance->mc->cr->repAllocBBProfileBuffer(count, profileBuffer); + jitInstance->mc->cr->AddCall("allocMethodBlockCounts"); + return jitInstance->mc->cr->repAllocMethodBlockCounts(count, pBlockCounts); } // get profile information to be used for optimizing the current method. The format -// of the buffer is the same as the format the JIT passes to allocBBProfileBuffer. -HRESULT MyICJI::getBBProfileData(CORINFO_METHOD_HANDLE ftnHnd, - ULONG* count, // The number of basic blocks that we have - ProfileBuffer** profileBuffer, - ULONG* numRuns) -{ - jitInstance->mc->cr->AddCall("getBBProfileData"); - return jitInstance->mc->repGetBBProfileData(ftnHnd, count, profileBuffer, numRuns); +// of the buffer is the same as the format the JIT passes to allocMethodBlockCounts. +HRESULT MyICJI::getMethodBlockCounts(CORINFO_METHOD_HANDLE ftnHnd, + DWORD* pCount, // The number of basic blocks that we have + BlockCounts** pBlockCounts, + DWORD* pNumRuns) +{ + jitInstance->mc->cr->AddCall("getMethodBlockCounts"); + return jitInstance->mc->repGetMethodBlockCounts(ftnHnd, pCount, pBlockCounts, pNumRuns); } // Associates a native call site, identified by its offset in the native code stream, with |