Skip to content

Commit

Permalink
Show optimization tiers for runtime major version >= 3 (including 5) (#…
Browse files Browse the repository at this point in the history
…785)

Show optimization tiers for runtime major version >= 3 (including 5)
  • Loading branch information
kouvel authored Jan 29, 2020
1 parent 771558e commit 9ff35f1
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
39 changes: 38 additions & 1 deletion src/SOS/Strike/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2858,7 +2858,7 @@ void DumpTieredNativeCodeAddressInfo(struct DacpTieredVersionData * pTieredVersi
ExtOut(" ReJIT ID: %d\n", rejitID);
DMLOut(" IL Addr: %s\n", DMLIL(ilAddr));

if (IsRuntimeVersion(3)) {
if (IsRuntimeVersionAtLeast(3)) {
for(int i = cTieredVersionData - 1; i >= 0; --i)
{
const char *descriptor = NULL;
Expand Down Expand Up @@ -3345,6 +3345,43 @@ bool IsRuntimeVersion(VS_FIXEDFILEINFO& fileInfo, DWORD major)
return false;
}

bool IsRuntimeVersionAtLeast(DWORD major)
{
VS_FIXEDFILEINFO fileInfo;
if (GetEEVersion(&fileInfo, nullptr, 0))
{
return IsRuntimeVersionAtLeast(fileInfo, major);
}
return false;
}

bool IsRuntimeVersionAtLeast(VS_FIXEDFILEINFO& fileInfo, DWORD major)
{
switch (major)
{
case 3:
if (HIWORD(fileInfo.dwFileVersionMS) == 4 && LOWORD(fileInfo.dwFileVersionMS) == 700)
{
return true;
}
// fall through

case 5:
if (HIWORD(fileInfo.dwFileVersionMS) >= 5)
{
return true;
}
// fall through

break;

default:
_ASSERTE(FALSE);
break;
}
return false;
}

#ifndef FEATURE_PAL

BOOL GetSOSVersion(VS_FIXEDFILEINFO *pFileInfo)
Expand Down
2 changes: 2 additions & 0 deletions src/SOS/Strike/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -1550,6 +1550,8 @@ ULONG DisplayILOperation(const UINT indentCount, BYTE* pBuffer, ULONG position,
BOOL GetEEVersion(VS_FIXEDFILEINFO* pFileInfo, char* fileVersionBuffer, int fileVersionBufferSizeInBytes);
bool IsRuntimeVersion(DWORD major);
bool IsRuntimeVersion(VS_FIXEDFILEINFO& fileInfo, DWORD major);
bool IsRuntimeVersionAtLeast(DWORD major);
bool IsRuntimeVersionAtLeast(VS_FIXEDFILEINFO& fileInfo, DWORD major);
#ifndef FEATURE_PAL
BOOL IsRetailBuild (size_t base);
BOOL GetSOSVersion(VS_FIXEDFILEINFO *pFileInfo);
Expand Down

0 comments on commit 9ff35f1

Please sign in to comment.