Skip to content

Commit

Permalink
Fix SPMI collect (#99762)
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorBo authored Mar 14, 2024
1 parent 136b100 commit 689cf79
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/coreclr/inc/jiteeversionguid.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ typedef const GUID *LPCGUID;
#define GUID_DEFINED
#endif // !GUID_DEFINED

constexpr GUID JITEEVersionIdentifier = { /* 35afdf61-5417-4bd7-9302-48efa2507603 */
0x35afdf61,
0x5417,
0x4bd7,
{0x93, 0x02, 0x48, 0xef, 0xa2, 0x50, 0x76, 0x03}
constexpr GUID JITEEVersionIdentifier = { /* 6fd660c7-96be-4832-a84c-4200141f7d08 */
0x6fd660c7,
0x96be,
0x4832,
{0xa8, 0x4c, 0x42, 0x00, 0x14, 0x1f, 0x7d, 0x08}
};

//////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/tools/superpmi/superpmi-shared/agnostic.h
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,8 @@ struct Agnostic_EmbedGenericHandle

struct Agnostic_ExpandRawHandleIntrinsic
{
Agnostic_CORINFO_RESOLVED_TOKEN ResolvedToken;
DWORDLONG hCallerHandle;
Agnostic_CORINFO_RESOLVED_TOKENin ResolvedToken;
DWORDLONG hCallerHandle;
};

struct Agnostic_CORINFO_GENERICHANDLE_RESULT
Expand Down
7 changes: 4 additions & 3 deletions src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,7 @@ void MethodContext::recExpandRawHandleIntrinsic(CORINFO_RESOLVED_TOKEN* pResolve

Agnostic_ExpandRawHandleIntrinsic key;
ZeroMemory(&key, sizeof(key)); // Zero key including any struct padding
key.ResolvedToken = SpmiRecordsHelper::StoreAgnostic_CORINFO_RESOLVED_TOKEN(pResolvedToken, ExpandRawHandleIntrinsic);
key.ResolvedToken = SpmiRecordsHelper::CreateAgnostic_CORINFO_RESOLVED_TOKENin(pResolvedToken);
key.hCallerHandle = CastHandle(callerHandle);

Agnostic_CORINFO_GENERICHANDLE_RESULT value;
Expand All @@ -1691,7 +1691,7 @@ void MethodContext::recExpandRawHandleIntrinsic(CORINFO_RESOLVED_TOKEN* pResolve
void MethodContext::dmpExpandRawHandleIntrinsic(const Agnostic_ExpandRawHandleIntrinsic& key, const Agnostic_CORINFO_GENERICHANDLE_RESULT& result)
{
printf("ExpandRawHandleIntrinsic key: %s, value %s cth-%016" PRIx64 " ht-%u",
SpmiDumpHelper::DumpAgnostic_CORINFO_RESOLVED_TOKEN(key.ResolvedToken).c_str(),
SpmiDumpHelper::DumpAgnostic_CORINFO_RESOLVED_TOKENin(key.ResolvedToken).c_str(),
SpmiDumpHelper::DumpAgnostic_CORINFO_LOOKUP(result.lookup).c_str(),
result.compileTimeHandle,
result.handleType);
Expand All @@ -1701,7 +1701,7 @@ void MethodContext::repExpandRawHandleIntrinsic(CORINFO_RESOLVED_TOKEN* pResolve
Agnostic_ExpandRawHandleIntrinsic key;
ZeroMemory(&key, sizeof(key)); // Zero key including any struct padding

key.ResolvedToken = SpmiRecordsHelper::RestoreAgnostic_CORINFO_RESOLVED_TOKEN(pResolvedToken, ExpandRawHandleIntrinsic);
key.ResolvedToken = SpmiRecordsHelper::CreateAgnostic_CORINFO_RESOLVED_TOKENin(pResolvedToken);
key.hCallerHandle = CastHandle(callerHandle);

Agnostic_CORINFO_GENERICHANDLE_RESULT value =
Expand Down Expand Up @@ -3153,6 +3153,7 @@ void MethodContext::repEmbedGenericHandle(CORINFO_RESOLVED_TOKEN* pResolve
ZeroMemory(&key, sizeof(key)); // Zero key including any struct padding
key.ResolvedToken = SpmiRecordsHelper::RestoreAgnostic_CORINFO_RESOLVED_TOKEN(pResolvedToken, EmbedGenericHandle);
key.fEmbedParent = (DWORD)fEmbedParent;
key.hCallerHandle = CastHandle(callerHandle);

Agnostic_CORINFO_GENERICHANDLE_RESULT value = LookupByKeyOrMissNoMessage(EmbedGenericHandle, key);

Expand Down

0 comments on commit 689cf79

Please sign in to comment.