diff --git a/src/coreclr/inc/jiteeversionguid.h b/src/coreclr/inc/jiteeversionguid.h index a682e1d22240b..5f4c584fc93a5 100644 --- a/src/coreclr/inc/jiteeversionguid.h +++ b/src/coreclr/inc/jiteeversionguid.h @@ -43,11 +43,11 @@ typedef const GUID *LPCGUID; #define GUID_DEFINED #endif // !GUID_DEFINED -constexpr GUID JITEEVersionIdentifier = { /* a19264d9-82b9-4aa4-833f-ee4b52352d7e */ - 0xa19264d9, - 0x82b9, - 0x4aa4, - {0x83, 0x3f, 0xee, 0x4b, 0x52, 0x35, 0x2d, 0x7e} +constexpr GUID JITEEVersionIdentifier = { /* 0cb8113f-52e5-444f-b713-dcb749b5d211 */ + 0x0cb8113f, + 0x52e5, + 0x444f, + {0xb7, 0x13, 0xdc, 0xb7, 0x49, 0xb5, 0xd2, 0x11} }; ////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/coreclr/jit/fgprofile.cpp b/src/coreclr/jit/fgprofile.cpp index 6438b8aa95c42..f3fe032a4c363 100644 --- a/src/coreclr/jit/fgprofile.cpp +++ b/src/coreclr/jit/fgprofile.cpp @@ -2315,15 +2315,16 @@ class ValueHistogramProbeInserter // \--* LCL_VAR long tmp // - const unsigned lenTmpNum = compiler->lvaGrabTemp(true DEBUGARG("length histogram profile tmp")); - GenTree* storeLenToTemp = compiler->gtNewTempStore(lenTmpNum, *lenArgRef); - GenTree* lengthLocal = compiler->gtNewLclvNode(lenTmpNum, genActualType(*lenArgRef)); - GenTreeOp* lengthNode = compiler->gtNewOperNode(GT_COMMA, lengthLocal->TypeGet(), storeLenToTemp, lengthLocal); - GenTree* histNode = compiler->gtNewIconNode(reinterpret_cast(hist), TYP_I_IMPL); - unsigned helper = is32 ? CORINFO_HELP_VALUEPROFILE32 : CORINFO_HELP_VALUEPROFILE64; + const unsigned lenTmpNum = compiler->lvaGrabTemp(true DEBUGARG("length histogram profile tmp")); + GenTree* storeLenToTemp = compiler->gtNewTempStore(lenTmpNum, *lenArgRef); + GenTree* lengthLocal = compiler->gtNewLclvNode(lenTmpNum, genActualType(*lenArgRef)); + GenTreeOp* lengthNode = compiler->gtNewOperNode(GT_COMMA, lengthLocal->TypeGet(), storeLenToTemp, lengthLocal); + GenTree* histNode = compiler->gtNewIconNode(reinterpret_cast(hist), TYP_I_IMPL); + unsigned helper = is32 ? CORINFO_HELP_VALUEPROFILE32 : CORINFO_HELP_VALUEPROFILE64; GenTreeCall* helperCallNode = compiler->gtNewHelperCallNode(helper, TYP_VOID, lengthNode, histNode); - *lenArgRef = compiler->gtNewOperNode(GT_COMMA, lengthLocal->TypeGet(), helperCallNode, compiler->gtCloneExpr(lengthLocal)); + *lenArgRef = compiler->gtNewOperNode(GT_COMMA, lengthLocal->TypeGet(), helperCallNode, + compiler->gtCloneExpr(lengthLocal)); m_instrCount++; } }; @@ -2677,7 +2678,7 @@ PhaseStatus Compiler::fgInstrumentMethod() const PhaseStatus earlyExitPhaseStatus = madeAnticipatoryChanges ? PhaseStatus::MODIFIED_EVERYTHING : PhaseStatus::MODIFIED_NOTHING; - // Optionally, when jitting, if there were no class probes and only one count probe, + // Optionally, when jitting, if there were no class probes, no value probes and only one count probe, // suppress instrumentation. // // We leave instrumentation in place when prejitting as the sample hits in the method @@ -2699,8 +2700,8 @@ PhaseStatus Compiler::fgInstrumentMethod() if (minimalProbeMode && (fgCountInstrumentor->SchemaCount() == 1) && (fgHistogramInstrumentor->SchemaCount() == 0) && (fgValueInstrumentor->SchemaCount() == 0)) { - JITDUMP( - "Not instrumenting method: minimal probing enabled, and method has only one counter and no class probes\n"); + JITDUMP("Not instrumenting method: minimal probing enabled, and method has only one counter and no class and " + "no value probes\n"); return earlyExitPhaseStatus; } diff --git a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp index 8de63b165c8ed..9cc5a79a7a327 100644 --- a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp +++ b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp @@ -5779,6 +5779,18 @@ void MethodContext::dmpGetPgoInstrumentationResults(DWORDLONG key, const Agnosti printf("[%u] %016" PRIX64 " ", j, CastHandle(*(uintptr_t*)(pInstrumentationData + pBuf[i].Offset + j * sizeof(uintptr_t)))); } break; + case ICorJitInfo::PgoInstrumentationKind::ValueHistogramIntCount: + printf("V %u", *(unsigned*)(pInstrumentationData + pBuf[i].Offset)); + break; + case ICorJitInfo::PgoInstrumentationKind::ValueHistogramLongCount: + printf("V %" PRIu64 "", *(uint64_t*)(pInstrumentationData + pBuf[i].Offset)); + break; + case ICorJitInfo::PgoInstrumentationKind::ValueHistogram: + for (unsigned int j = 0; j < pBuf[i].Count; j++) + { + printf("[%u] %lld", j, (int64_t)*(intptr_t*)(pInstrumentationData + pBuf[i].Offset + j * sizeof(uintptr_t))); + } + break; case ICorJitInfo::PgoInstrumentationKind::GetLikelyClass: case ICorJitInfo::PgoInstrumentationKind::GetLikelyMethod: {