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

Commit

Permalink
Fix GetSequencePoints when profiler provides mapping via SetILInstrum…
Browse files Browse the repository at this point in the history
…entedCodeMap (#27075)

Port #25802 to 3.1
  • Loading branch information
davmason authored Oct 16, 2019
1 parent f2343fb commit 617091a
Showing 1 changed file with 8 additions and 2 deletions.
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

0 comments on commit 617091a

Please sign in to comment.