in ProfilingAPI/ReJITEnterLeaveHooks/ILRewriter.cpp [679:693]
HRESULT SetILFunctionBody(unsigned size, LPBYTE pBody)
{
if (m_pICorProfilerFunctionControl != NULL)
{
// We're supplying IL for a rejit, so use the rejit mechanism
IfFailRet(m_pICorProfilerFunctionControl->SetILFunctionBody(size, pBody));
}
else
{
// "classic-style" instrumentation on first JIT, so use old mechanism
IfFailRet(m_pICorProfilerInfo->SetILFunctionBody(m_moduleId, m_tkMethod, pBody));
}
return S_OK;
}