Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Fix GetSequencePoints when profiler provides mapping via SetILInstrumentedCodeMap #25802

Merged
merged 2 commits into from
Jul 24, 2019
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
10 changes: 8 additions & 2 deletions src/debug/daccess/dacdbiimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1003,13 +1003,19 @@ void DacDbiInterfaceImpl::GetSequencePoints(MethodDesc * pMethodDesc,
if (!success)
ThrowHR(E_FAIL);

// if there is a rejit IL map for this function, apply that in preference to load-time mapping
#ifdef FEATURE_REJIT
CodeVersionManager * pCodeVersionManager = pMethodDesc->GetCodeVersionManager();
ILCodeVersion ilVersion;
NativeCodeVersion nativeCodeVersion = pCodeVersionManager->GetNativeCodeVersion(dac_cast<PTR_MethodDesc>(pMethodDesc), (PCODE)startAddr);
if (!nativeCodeVersion.IsNull())
{
const InstrumentedILOffsetMapping * pRejitMapping = nativeCodeVersion.GetILCodeVersion().GetInstrumentedILMap();
ilVersion = nativeCodeVersion.GetILCodeVersion();
}

// if there is a rejit IL map for this function, apply that in preference to load-time mapping
if (!ilVersion.IsNull() && !ilVersion.IsDefaultVersion())
{
const InstrumentedILOffsetMapping * pRejitMapping = ilVersion.GetInstrumentedILMap();
ComposeMapping(pRejitMapping, mapCopy, &entryCount);
}
else
Expand Down