Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show optimization tiers for runtime major version >= 3 (including 5) #785

Merged
merged 2 commits into from
Jan 29, 2020
Merged
Show file tree
Hide file tree
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
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