diff options
Diffstat (limited to 'src/zap/zapinfo.cpp')
-rw-r--r-- | src/zap/zapinfo.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/zap/zapinfo.cpp b/src/zap/zapinfo.cpp index 21ce5f558d..d487b1e3bc 100644 --- a/src/zap/zapinfo.cpp +++ b/src/zap/zapinfo.cpp @@ -876,23 +876,23 @@ bool ZapInfo::runWithErrorTrap(void (*function)(void*), void* param) return m_pEEJitInfo->runWithErrorTrap(function, param); } -HRESULT ZapInfo::allocBBProfileBuffer ( - ULONG cBlock, - ICorJitInfo::ProfileBuffer ** ppBlock +HRESULT ZapInfo::allocMethodBlockCounts ( + DWORD count, // the count of <ILOffset, ExecutionCount> tuples + ICorJitInfo::BlockCounts ** pBlockCounts // pointer to array of <ILOffset, ExecutionCount> tuples ) { HRESULT hr; if (m_zapper->m_pOpt->m_compilerFlags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_IL_STUB)) { - *ppBlock = NULL; + *pBlockCounts = nullptr; return E_NOTIMPL; } // @TODO: support generic methods from other assemblies if (m_currentMethodModule != m_pImage->m_hModule) { - *ppBlock = NULL; + *pBlockCounts = nullptr; return E_NOTIMPL; } @@ -921,39 +921,39 @@ HRESULT ZapInfo::allocBBProfileBuffer ( // of the latest copy in this case. // _ASSERTE(m_pProfileData == NULL); - DWORD totalSize = (DWORD) (cBlock * sizeof(ICorJitInfo::ProfileBuffer)) + sizeof(CORBBTPROF_METHOD_HEADER); + DWORD totalSize = (DWORD) (count * sizeof(ICorJitInfo::BlockCounts)) + sizeof(CORBBTPROF_METHOD_HEADER); m_pProfileData = ZapBlobWithRelocs::NewAlignedBlob(m_pImage, NULL, totalSize, sizeof(DWORD)); CORBBTPROF_METHOD_HEADER * profileData = (CORBBTPROF_METHOD_HEADER *) m_pProfileData->GetData(); profileData->size = totalSize; profileData->cDetail = 0; profileData->method.token = md; profileData->method.ILSize = m_currentMethodInfo.ILCodeSize; - profileData->method.cBlock = cBlock; + profileData->method.cBlock = count; - *ppBlock = (ICorJitInfo::ProfileBuffer *)(&profileData->method.block[0]); + *pBlockCounts = (ICorJitInfo::BlockCounts *)(&profileData->method.block[0]); return S_OK; } -HRESULT ZapInfo::getBBProfileData ( - CORINFO_METHOD_HANDLE ftnHnd, - ULONG * pCount, - ICorJitInfo::ProfileBuffer ** ppBlock, - ULONG * numRuns +HRESULT ZapInfo::getMethodBlockCounts ( + CORINFO_METHOD_HANDLE ftnHnd, + DWORD * pCount, // pointer to the count of <ILOffset, ExecutionCount> tuples + BlockCounts ** pBlockCounts, // pointer to array of <ILOffset, ExecutionCount> tuples + DWORD * pNumRuns ) { - _ASSERTE(ppBlock); - _ASSERTE(pCount); + _ASSERTE(pBlockCounts != nullptr); + _ASSERTE(pCount != nullptr); _ASSERTE(ftnHnd == m_currentMethodHandle); HRESULT hr; // Initialize outputs in case we return E_FAIL - *ppBlock = NULL; + *pBlockCounts = nullptr; *pCount = 0; - if (numRuns) + if (pNumRuns != nullptr) { - *numRuns = 0; + *pNumRuns = 0; } // For generic instantiations whose IL is in another module, @@ -992,9 +992,9 @@ HRESULT ZapInfo::getBBProfileData ( return E_FAIL; } - if (numRuns) + if (pNumRuns != nullptr) { - *numRuns = m_pImage->m_profileDataNumRuns; + *pNumRuns = m_pImage->m_profileDataNumRuns; } const ZapImage::ProfileDataHashEntry * foundEntry = m_pImage->profileDataHashTable.LookupPtr(md); @@ -1029,7 +1029,7 @@ HRESULT ZapInfo::getBBProfileData ( _ASSERTE(profileData->method.token == foundEntry->md); // We should be looking at the right method _ASSERTE(profileData->size == foundEntry->size); // and the cached size must match - *ppBlock = (ICorJitInfo::ProfileBuffer *) &profileData->method.block[0]; + *pBlockCounts = (ICorJitInfo::BlockCounts *) &profileData->method.block[0]; *pCount = profileData->method.cBlock; // If the ILSize is non-zero the the ILCodeSize also must match @@ -4026,8 +4026,8 @@ template<> void LoadTable<CORINFO_METHOD_HANDLE>::EmitLoadFixups(CORINFO_METHOD_ BOOL ZapInfo::CurrentMethodHasProfileData() { WRAPPER_NO_CONTRACT; - ULONG size; - ICorJitInfo::ProfileBuffer * profileBuffer; - return SUCCEEDED(getBBProfileData(m_currentMethodHandle, &size, &profileBuffer, NULL)); + DWORD size; + ICorJitInfo::BlockCounts * pBlockCounts; + return SUCCEEDED(getMethodBlockCounts(m_currentMethodHandle, &size, &pBlockCounts, NULL)); } |