summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/vm/codepitchingmanager.cpp15
-rw-r--r--src/vm/dynamicmethod.cpp2
-rw-r--r--src/vm/prestub.cpp2
3 files changed, 8 insertions, 11 deletions
diff --git a/src/vm/codepitchingmanager.cpp b/src/vm/codepitchingmanager.cpp
index 521c101b0f..6a937fb217 100644
--- a/src/vm/codepitchingmanager.cpp
+++ b/src/vm/codepitchingmanager.cpp
@@ -241,7 +241,7 @@ static void LookupOrCreateInPitchingCandidate(MethodDesc* pMD, ULONG sizeOfCode)
const char* szClassName = className.GetUTF8(scratch);
const char* szMethodSig = methodSig.GetUTF8(scratch);
- printf("Candidate %lld %s :: %s %s\n",
+ printf("Candidate %lu %s :: %s %s\n",
sizeOfCode, szClassName, pMD->GetName(), szMethodSig);
}
#endif
@@ -346,7 +346,7 @@ StackWalkAction StackWalkCallback(CrawlFrame* pCf, VOID* data)
return CrawlFrameVisitor(pCf, (Thread *)data);
}
-static ULONGLONG s_PitchedMethodCounter = 0;
+static ULONG s_PitchedMethodCounter = 0;
void MethodDesc::PitchNativeCode()
{
WRAPPER_NO_CONTRACT;
@@ -383,7 +383,7 @@ void MethodDesc::PitchNativeCode()
MethodTable * pMT = GetMethodTable();
_ASSERTE(pMT != nullptr);
- CodeHeader* pCH = ((CodeHeader*)(pCode & ~1)) - 1;
+ CodeHeader* pCH = dac_cast<PTR_CodeHeader>(PCODEToPINSTR(pCode)) - 1;
_ASSERTE(pCH->GetMethodDesc() == this);
HostCodeHeap* pHeap = HostCodeHeap::GetCodeHeap((TADDR)pCode);
@@ -436,11 +436,8 @@ void MethodDesc::PitchNativeCode()
const char* szClassName = className.GetUTF8(scratch);
const char* szMethodSig = methodSig.GetUTF8(scratch);
- if (CLRConfig::GetConfigValue(CLRConfig::INTERNAL_JitPitchPrintStat) != 0)
- {
- printf("Pitched %lld %lld %s :: %s %s\n",
- s_PitchedMethodCounter, pitchedBytes, szClassName, GetName(), szMethodSig);
- }
+ printf("Pitched %lu %lu %s :: %s %s\n",
+ s_PitchedMethodCounter, pitchedBytes, szClassName, GetName(), szMethodSig);
}
DACNotify::DoJITPitchingNotification(this);
@@ -514,7 +511,7 @@ EXTERN_C void SavePitchingCandidate(MethodDesc* pMD, ULONG sizeOfCode)
SimpleWriteLockHolder swlh(s_totalNCSizeLock);
s_totalNCSize += sizeOfCode;
if (CLRConfig::GetConfigValue(CLRConfig::INTERNAL_JitPitchPrintStat) != 0)
- printf("jitted %lld (bytes) pitched %lld (bytes)\n", s_totalNCSize, s_jitPitchedBytes);
+ printf("jitted %lu (bytes) pitched %lu (bytes)\n", s_totalNCSize, s_jitPitchedBytes);
}
}
#endif
diff --git a/src/vm/dynamicmethod.cpp b/src/vm/dynamicmethod.cpp
index c997565fb1..806ab57805 100644
--- a/src/vm/dynamicmethod.cpp
+++ b/src/vm/dynamicmethod.cpp
@@ -795,7 +795,7 @@ struct HostCodeHeap::TrackAllocation * HostCodeHeap::GetTrackAllocation(TADDR co
{
LIMITED_METHOD_CONTRACT;
- CodeHeader * pHdr = dac_cast<PTR_CodeHeader>(codeStart) - 1;
+ CodeHeader * pHdr = dac_cast<PTR_CodeHeader>(PCODEToPINSTR(codeStart)) - 1;
// Pointer to the TrackAllocation record is stored just before the code header
return *((TrackAllocation **)(pHdr) - 1);
diff --git a/src/vm/prestub.cpp b/src/vm/prestub.cpp
index 7705dc0f41..5e9fc116e0 100644
--- a/src/vm/prestub.cpp
+++ b/src/vm/prestub.cpp
@@ -887,7 +887,7 @@ PCODE MethodDesc::JitCompileCodeLocked(PrepareCodeConfig* pConfig, JitListLockEn
#if defined(FEATURE_JIT_PITCHING)
else
{
- SavePitchingCandidate(this, sizeOfCode);
+ SavePitchingCandidate(this, *pSizeOfCode);
}
#endif
}