Skip to content

Commit 09b983e

Browse files
authored
Allow JIT to know if dynamic pgo is active (#101575)
When dynamic PGO is active we would like for all methods to have some profile data, so we don't have to handle a mixture of profiled and unprofiled methods during or after inlining. But to reduce profiling overhead, the JIT will not instrument methods that have straight-line control flow, or flow where all branches lead to throws (aka "minimal profiling"). When the JIT tries to recover profile data for these methods it won't get any data back. SO there is a fairly high volume of these profiled/unprofiled mixtures today and they lead to various poor decisions in the JIT. This change enables the JIT to see if dynamic PGO is active. The JIT does not yet do anything with the information. A subsequent change will have the JIT synthesize data for methods with no profile data in this case. We could also solve this by creating a placeholder PGO schema for theswith no data, but it seems simpler and less resource intensive to have the runtime tell the JIT that dynamic PGO is active. This also changes the JIT GUID for the new API surface. Contributes to #93020.
1 parent dad01da commit 09b983e

19 files changed

+62
-38
lines changed

src/coreclr/inc/corjit.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,8 @@ class ICorJitInfo : public ICorDynamicInfo
452452
uint32_t * pCountSchemaItems, // OUT: pointer to the count of schema items in `pSchema` array.
453453
uint8_t ** pInstrumentationData, // OUT: `*pInstrumentationData` is set to the address of the instrumentation data
454454
// (pointer will not remain valid after jit completes).
455-
PgoSource * pPgoSource // OUT: value describing source of pgo data
455+
PgoSource * pPgoSource, // OUT: value describing source of pgo data
456+
bool * pDynamicPgo // OUT: dynamic PGO is enabled (valid even when return value is failure)
456457
) = 0;
457458

458459
// Allocate a profile buffer for use in the current process

src/coreclr/inc/icorjitinfoimpl_generated.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,8 @@ JITINTERFACE_HRESULT getPgoInstrumentationResults(
711711
ICorJitInfo::PgoInstrumentationSchema** pSchema,
712712
uint32_t* pCountSchemaItems,
713713
uint8_t** pInstrumentationData,
714-
ICorJitInfo::PgoSource* pgoSource) override;
714+
ICorJitInfo::PgoSource* pPgoSource,
715+
bool* pDynamicPgo) override;
715716

716717
JITINTERFACE_HRESULT allocPgoInstrumentationBySchema(
717718
CORINFO_METHOD_HANDLE ftnHnd,

src/coreclr/inc/jiteeversionguid.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ typedef const GUID *LPCGUID;
4343
#define GUID_DEFINED
4444
#endif // !GUID_DEFINED
4545

46-
constexpr GUID JITEEVersionIdentifier = { /* 8f046bcb-ca5f-4692-9277-898b71cb7938 */
47-
0x8f046bcb,
48-
0xca5f,
49-
0x4692,
50-
{0x92, 0x77, 0x89, 0x8b, 0x71, 0xcb, 0x79, 0x38}
46+
constexpr GUID JITEEVersionIdentifier = { /* 32d71f8e-c1f5-41cb-88cc-4e8504cabf40 */
47+
0x32d71f8e,
48+
0xc1f5,
49+
0x41cb,
50+
{0x88, 0xcc, 0x4e, 0x85, 0x04, 0xca, 0xbf, 0x40}
5151
};
5252

5353
//////////////////////////////////////////////////////////////////////////////////////////////////////////

src/coreclr/jit/ICorJitInfo_wrapper_generated.hpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -1666,10 +1666,11 @@ JITINTERFACE_HRESULT WrapICorJitInfo::getPgoInstrumentationResults(
16661666
ICorJitInfo::PgoInstrumentationSchema** pSchema,
16671667
uint32_t* pCountSchemaItems,
16681668
uint8_t** pInstrumentationData,
1669-
ICorJitInfo::PgoSource* pgoSource)
1669+
ICorJitInfo::PgoSource* pPgoSource,
1670+
bool* pDynamicPgo)
16701671
{
16711672
API_ENTER(getPgoInstrumentationResults);
1672-
JITINTERFACE_HRESULT temp = wrapHnd->getPgoInstrumentationResults(ftnHnd, pSchema, pCountSchemaItems, pInstrumentationData, pgoSource);
1673+
JITINTERFACE_HRESULT temp = wrapHnd->getPgoInstrumentationResults(ftnHnd, pSchema, pCountSchemaItems, pInstrumentationData, pPgoSource, pDynamicPgo);
16731674
API_LEAVE(getPgoInstrumentationResults);
16741675
return temp;
16751676
}

src/coreclr/jit/compiler.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -2791,11 +2791,13 @@ void Compiler::compInitOptions(JitFlags* jitFlags)
27912791
fgPgoHaveWeights = false;
27922792
fgPgoSynthesized = false;
27932793
fgPgoConsistent = false;
2794+
fgPgoDynamic = false;
27942795

27952796
if (jitFlags->IsSet(JitFlags::JIT_FLAG_BBOPT))
27962797
{
2797-
fgPgoQueryResult = info.compCompHnd->getPgoInstrumentationResults(info.compMethodHnd, &fgPgoSchema,
2798-
&fgPgoSchemaCount, &fgPgoData, &fgPgoSource);
2798+
fgPgoQueryResult =
2799+
info.compCompHnd->getPgoInstrumentationResults(info.compMethodHnd, &fgPgoSchema, &fgPgoSchemaCount,
2800+
&fgPgoData, &fgPgoSource, &fgPgoDynamic);
27992801

28002802
// a failed result that also has a non-NULL fgPgoSchema
28012803
// indicates that the ILSize for the method no longer matches
@@ -2818,6 +2820,7 @@ void Compiler::compInitOptions(JitFlags* jitFlags)
28182820
fgPgoData = nullptr;
28192821
fgPgoSchema = nullptr;
28202822
fgPgoDisabled = true;
2823+
fgPgoDynamic = false;
28212824
}
28222825
#ifdef DEBUG
28232826
// Optionally, enable use of profile data for only some methods.

src/coreclr/jit/compiler.h

+1
Original file line numberDiff line numberDiff line change
@@ -6285,6 +6285,7 @@ class Compiler
62856285
unsigned fgPgoInlineeNoPgoSingleBlock;
62866286
bool fgPgoHaveWeights;
62876287
bool fgPgoSynthesized;
6288+
bool fgPgoDynamic;
62886289
bool fgPgoConsistent;
62896290

62906291
#ifdef DEBUG

src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -4261,7 +4261,7 @@ public static void ComputeJitPgoInstrumentationSchema(Func<object, IntPtr> objec
42614261
}
42624262

42634263
private HRESULT getPgoInstrumentationResults(CORINFO_METHOD_STRUCT_* ftnHnd, ref PgoInstrumentationSchema* pSchema, ref uint countSchemaItems, byte** pInstrumentationData,
4264-
ref PgoSource pPgoSource)
4264+
ref PgoSource pPgoSource, ref bool pDynamicPgo)
42654265
{
42664266
MethodDesc methodDesc = HandleToObject(ftnHnd);
42674267

@@ -4308,6 +4308,7 @@ private HRESULT getPgoInstrumentationResults(CORINFO_METHOD_STRUCT_* ftnHnd, ref
43084308
countSchemaItems = pgoResults.countSchemaItems;
43094309
*pInstrumentationData = pgoResults.pInstrumentationData;
43104310
pPgoSource = PgoSource.Static;
4311+
pDynamicPgo = false;
43114312
return pgoResults.hr;
43124313
}
43134314

src/coreclr/tools/Common/JitInterface/CorInfoImpl_generated.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2489,12 +2489,12 @@ private static void _reportFatalError(IntPtr thisHandle, IntPtr* ppException, Co
24892489
}
24902490

24912491
[UnmanagedCallersOnly]
2492-
private static HRESULT _getPgoInstrumentationResults(IntPtr thisHandle, IntPtr* ppException, CORINFO_METHOD_STRUCT_* ftnHnd, PgoInstrumentationSchema** pSchema, uint* pCountSchemaItems, byte** pInstrumentationData, PgoSource* pgoSource)
2492+
private static HRESULT _getPgoInstrumentationResults(IntPtr thisHandle, IntPtr* ppException, CORINFO_METHOD_STRUCT_* ftnHnd, PgoInstrumentationSchema** pSchema, uint* pCountSchemaItems, byte** pInstrumentationData, PgoSource* pPgoSource, bool* pDynamicPgo)
24932493
{
24942494
var _this = GetThis(thisHandle);
24952495
try
24962496
{
2497-
return _this.getPgoInstrumentationResults(ftnHnd, ref *pSchema, ref *pCountSchemaItems, pInstrumentationData, ref *pgoSource);
2497+
return _this.getPgoInstrumentationResults(ftnHnd, ref *pSchema, ref *pCountSchemaItems, pInstrumentationData, ref *pPgoSource, ref *pDynamicPgo);
24982498
}
24992499
catch (Exception ex)
25002500
{
@@ -2764,7 +2764,7 @@ private static IntPtr GetUnmanagedCallbacks()
27642764
callbacks[165] = (delegate* unmanaged<IntPtr, IntPtr*, uint, byte*, IntPtr, byte>)&_logMsg;
27652765
callbacks[166] = (delegate* unmanaged<IntPtr, IntPtr*, byte*, int, byte*, int>)&_doAssert;
27662766
callbacks[167] = (delegate* unmanaged<IntPtr, IntPtr*, CorJitResult, void>)&_reportFatalError;
2767-
callbacks[168] = (delegate* unmanaged<IntPtr, IntPtr*, CORINFO_METHOD_STRUCT_*, PgoInstrumentationSchema**, uint*, byte**, PgoSource*, HRESULT>)&_getPgoInstrumentationResults;
2767+
callbacks[168] = (delegate* unmanaged<IntPtr, IntPtr*, CORINFO_METHOD_STRUCT_*, PgoInstrumentationSchema**, uint*, byte**, PgoSource*, bool*, HRESULT>)&_getPgoInstrumentationResults;
27682768
callbacks[169] = (delegate* unmanaged<IntPtr, IntPtr*, CORINFO_METHOD_STRUCT_*, PgoInstrumentationSchema*, uint, byte**, HRESULT>)&_allocPgoInstrumentationBySchema;
27692769
callbacks[170] = (delegate* unmanaged<IntPtr, IntPtr*, uint, CORINFO_SIG_INFO*, CORINFO_METHOD_STRUCT_*, void>)&_recordCallSite;
27702770
callbacks[171] = (delegate* unmanaged<IntPtr, IntPtr*, void*, void*, void*, ushort, int, void>)&_recordRelocation;

src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ FUNCTIONS
331331
bool logMsg(unsigned level, const char* fmt, va_list args)
332332
int doAssert(const char* szFile, int iLine, const char* szExpr)
333333
void reportFatalError(CorJitResult result)
334-
JITINTERFACE_HRESULT getPgoInstrumentationResults(CORINFO_METHOD_HANDLE ftnHnd, ICorJitInfo::PgoInstrumentationSchema** pSchema, uint32_t* pCountSchemaItems, uint8_t**pInstrumentationData, ICorJitInfo::PgoSource* pgoSource)
334+
JITINTERFACE_HRESULT getPgoInstrumentationResults(CORINFO_METHOD_HANDLE ftnHnd, ICorJitInfo::PgoInstrumentationSchema** pSchema, uint32_t* pCountSchemaItems, uint8_t**pInstrumentationData, ICorJitInfo::PgoSource* pPgoSource, bool* pDynamicPgo)
335335
JITINTERFACE_HRESULT allocPgoInstrumentationBySchema(CORINFO_METHOD_HANDLE ftnHnd, ICorJitInfo::PgoInstrumentationSchema* pSchema, uint32_t countSchemaItems, uint8_t** pInstrumentationData)
336336
void recordCallSite(uint32_t instrOffset, CORINFO_SIG_INFO* callSig, CORINFO_METHOD_HANDLE methodHandle)
337337
void recordRelocation(void* location, void* locationRW, void* target, uint16_t fRelocType, int32_t addlDelta)

src/coreclr/tools/aot/jitinterface/jitinterface_generated.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ struct JitInterfaceCallbacks
179179
bool (* logMsg)(void * thisHandle, CorInfoExceptionClass** ppException, unsigned level, const char* fmt, va_list args);
180180
int (* doAssert)(void * thisHandle, CorInfoExceptionClass** ppException, const char* szFile, int iLine, const char* szExpr);
181181
void (* reportFatalError)(void * thisHandle, CorInfoExceptionClass** ppException, CorJitResult result);
182-
JITINTERFACE_HRESULT (* getPgoInstrumentationResults)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftnHnd, ICorJitInfo::PgoInstrumentationSchema** pSchema, uint32_t* pCountSchemaItems, uint8_t** pInstrumentationData, ICorJitInfo::PgoSource* pgoSource);
182+
JITINTERFACE_HRESULT (* getPgoInstrumentationResults)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftnHnd, ICorJitInfo::PgoInstrumentationSchema** pSchema, uint32_t* pCountSchemaItems, uint8_t** pInstrumentationData, ICorJitInfo::PgoSource* pPgoSource, bool* pDynamicPgo);
183183
JITINTERFACE_HRESULT (* allocPgoInstrumentationBySchema)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftnHnd, ICorJitInfo::PgoInstrumentationSchema* pSchema, uint32_t countSchemaItems, uint8_t** pInstrumentationData);
184184
void (* recordCallSite)(void * thisHandle, CorInfoExceptionClass** ppException, uint32_t instrOffset, CORINFO_SIG_INFO* callSig, CORINFO_METHOD_HANDLE methodHandle);
185185
void (* recordRelocation)(void * thisHandle, CorInfoExceptionClass** ppException, void* location, void* locationRW, void* target, uint16_t fRelocType, int32_t addlDelta);
@@ -1843,10 +1843,11 @@ class JitInterfaceWrapper : public ICorJitInfo
18431843
ICorJitInfo::PgoInstrumentationSchema** pSchema,
18441844
uint32_t* pCountSchemaItems,
18451845
uint8_t** pInstrumentationData,
1846-
ICorJitInfo::PgoSource* pgoSource)
1846+
ICorJitInfo::PgoSource* pPgoSource,
1847+
bool* pDynamicPgo)
18471848
{
18481849
CorInfoExceptionClass* pException = nullptr;
1849-
JITINTERFACE_HRESULT temp = _callbacks->getPgoInstrumentationResults(_thisHandle, &pException, ftnHnd, pSchema, pCountSchemaItems, pInstrumentationData, pgoSource);
1850+
JITINTERFACE_HRESULT temp = _callbacks->getPgoInstrumentationResults(_thisHandle, &pException, ftnHnd, pSchema, pCountSchemaItems, pInstrumentationData, pPgoSource, pDynamicPgo);
18501851
if (pException != nullptr) throw pException;
18511852
return temp;
18521853
}

src/coreclr/tools/superpmi/superpmi-shared/agnostic.h

+1
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,7 @@ struct Agnostic_GetPgoInstrumentationResults
519519
DWORD dataByteCount;
520520
DWORD result;
521521
DWORD pgoSource;
522+
DWORD dynamicPgo;
522523
};
523524

524525
struct Agnostic_GetProfilingHandle

src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp

+11-5
Original file line numberDiff line numberDiff line change
@@ -5724,6 +5724,7 @@ void MethodContext::recGetPgoInstrumentationResults(CORINFO_METHOD_HANDLE ftnHnd
57245724
UINT32* pCountSchemaItems,
57255725
BYTE** pInstrumentationData,
57265726
ICorJitInfo::PgoSource* pPgoSource,
5727+
bool* pDynamicPgo,
57275728
HRESULT result)
57285729
{
57295730
if (GetPgoInstrumentationResults == nullptr)
@@ -5754,15 +5755,16 @@ void MethodContext::recGetPgoInstrumentationResults(CORINFO_METHOD_HANDLE ftnHnd
57545755
value.dataByteCount = (unsigned)maxOffset;
57555756
value.result = (DWORD)result;
57565757
value.pgoSource = (DWORD)*pPgoSource;
5758+
value.dynamicPgo = (DWORD)*pDynamicPgo;
57575759

57585760
DWORDLONG key = CastHandle(ftnHnd);
57595761
GetPgoInstrumentationResults->Add(key, value);
57605762
DEBUG_REC(dmpGetPgoInstrumentationResults(key, value));
57615763
}
57625764
void MethodContext::dmpGetPgoInstrumentationResults(DWORDLONG key, const Agnostic_GetPgoInstrumentationResults& value)
57635765
{
5764-
printf("GetPgoInstrumentationResults key ftn-%016" PRIX64 ", value res-%08X schemaCnt-%u profileBufSize-%u source-%u schema{",
5765-
key, value.result, value.countSchemaItems, value.dataByteCount, value.pgoSource);
5766+
printf("GetPgoInstrumentationResults key ftn-%016" PRIX64 ", value res-%08X schemaCnt-%u profileBufSize-%u source-%u dynamic-%u schema{",
5767+
key, value.result, value.countSchemaItems, value.dataByteCount, value.pgoSource, value.dynamicPgo);
57665768

57675769
if (value.countSchemaItems > 0)
57685770
{
@@ -5838,7 +5840,8 @@ HRESULT MethodContext::repGetPgoInstrumentationResults(CORINFO_METHOD_HANDLE ftn
58385840
ICorJitInfo::PgoInstrumentationSchema** pSchema,
58395841
UINT32* pCountSchemaItems,
58405842
BYTE** pInstrumentationData,
5841-
ICorJitInfo::PgoSource* pPgoSource)
5843+
ICorJitInfo::PgoSource* pPgoSource,
5844+
bool* pDynamicPgo)
58425845
{
58435846
DWORDLONG key = CastHandle(ftnHnd);
58445847
Agnostic_GetPgoInstrumentationResults tempValue = LookupByKeyOrMiss(GetPgoInstrumentationResults, key, ": key %016" PRIX64 "", key);
@@ -5848,6 +5851,7 @@ HRESULT MethodContext::repGetPgoInstrumentationResults(CORINFO_METHOD_HANDLE ftn
58485851
*pCountSchemaItems = (UINT32)tempValue.countSchemaItems;
58495852
*pInstrumentationData = (BYTE*)GetPgoInstrumentationResults->GetBuffer(tempValue.data_index);
58505853
*pPgoSource = (ICorJitInfo::PgoSource)tempValue.pgoSource;
5854+
*pDynamicPgo = (bool)tempValue.dynamicPgo;
58515855

58525856
ICorJitInfo::PgoInstrumentationSchema* pOutSchema = (ICorJitInfo::PgoInstrumentationSchema*)AllocJitTempBuffer(tempValue.countSchemaItems * sizeof(ICorJitInfo::PgoInstrumentationSchema));
58535857

@@ -7183,7 +7187,8 @@ int MethodContext::dumpMethodIdentityInfoToBuffer(char* buff, int len, bool igno
71837187
UINT32 schemaCount = 0;
71847188
BYTE* schemaData = nullptr;
71857189
ICorJitInfo::PgoSource pgoSource = ICorJitInfo::PgoSource::Unknown;
7186-
HRESULT pgoHR = repGetPgoInstrumentationResults(pInfo->ftn, &schema, &schemaCount, &schemaData, &pgoSource);
7190+
bool dynamicPgo = false;
7191+
HRESULT pgoHR = repGetPgoInstrumentationResults(pInfo->ftn, &schema, &schemaCount, &schemaData, &pgoSource, &dynamicPgo);
71877192

71887193
size_t minOffset = (size_t) ~0;
71897194
size_t maxOffset = 0;
@@ -7281,7 +7286,8 @@ bool MethodContext::hasPgoData(bool& hasEdgeProfile, bool& hasClassProfile, bool
72817286
ICorJitInfo::PgoInstrumentationSchema* schema = nullptr;
72827287
UINT32 schemaCount = 0;
72837288
BYTE* schemaData = nullptr;
7284-
HRESULT pgoHR = repGetPgoInstrumentationResults(info.ftn, &schema, &schemaCount, &schemaData, &pgoSource);
7289+
bool dynamicPgo;
7290+
HRESULT pgoHR = repGetPgoInstrumentationResults(info.ftn, &schema, &schemaCount, &schemaData, &pgoSource, &dynamicPgo);
72857291

72867292
if (SUCCEEDED(pgoHR))
72877293
{

src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -711,9 +711,9 @@ class MethodContext
711711
HRESULT repAllocPgoInstrumentationBySchema(CORINFO_METHOD_HANDLE ftnHnd, ICorJitInfo::PgoInstrumentationSchema* pSchema, UINT32 countSchemaItems, BYTE** pInstrumentationData);
712712
bool repAllocPgoInstrumentationBySchemaRecorded(CORINFO_METHOD_HANDLE ftnHnd, ICorJitInfo::PgoInstrumentationSchema* pSchema, UINT32 countSchemaItems, BYTE** pInstrumentationData);
713713

714-
void recGetPgoInstrumentationResults(CORINFO_METHOD_HANDLE ftnHnd, ICorJitInfo::PgoInstrumentationSchema** pSchema, UINT32* pCountSchemaItems, BYTE** pInstrumentationData, ICorJitInfo::PgoSource* pPgoSource, HRESULT result);
714+
void recGetPgoInstrumentationResults(CORINFO_METHOD_HANDLE ftnHnd, ICorJitInfo::PgoInstrumentationSchema** pSchema, UINT32* pCountSchemaItems, BYTE** pInstrumentationData, ICorJitInfo::PgoSource* pPgoSource, bool* pDynamicPgo, HRESULT result);
715715
void dmpGetPgoInstrumentationResults(DWORDLONG key, const Agnostic_GetPgoInstrumentationResults& value);
716-
HRESULT repGetPgoInstrumentationResults(CORINFO_METHOD_HANDLE ftnHnd, ICorJitInfo::PgoInstrumentationSchema** pSchema, UINT32* pCountSchemaItems, BYTE** pInstrumentationData, ICorJitInfo::PgoSource* pPgoSource);
716+
HRESULT repGetPgoInstrumentationResults(CORINFO_METHOD_HANDLE ftnHnd, ICorJitInfo::PgoInstrumentationSchema** pSchema, UINT32* pCountSchemaItems, BYTE** pInstrumentationData, ICorJitInfo::PgoSource* pPgoSource, bool* pDynamicPgo);
717717

718718
void recIsMoreSpecificType(CORINFO_CLASS_HANDLE cls1, CORINFO_CLASS_HANDLE cls2, bool result);
719719
void dmpIsMoreSpecificType(DLDL key, DWORD value);

src/coreclr/tools/superpmi/superpmi-shim-collector/icorjitinfo.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -1947,11 +1947,12 @@ HRESULT interceptor_ICJI::getPgoInstrumentationResults(CORINFO_METHOD_HANDLE
19471947
PgoInstrumentationSchema **pSchema, // pointer to the schema table which describes the instrumentation results (pointer will not remain valid after jit completes)
19481948
uint32_t * pCountSchemaItems, // pointer to the count schema items
19491949
uint8_t ** pInstrumentationData, // pointer to the actual instrumentation data (pointer will not remain valid after jit completes)
1950-
PgoSource* pPgoSource)
1950+
PgoSource* pPgoSource,
1951+
bool* pDynamicPgo)
19511952
{
19521953
mc->cr->AddCall("getPgoInstrumentationResults");
1953-
HRESULT temp = original_ICorJitInfo->getPgoInstrumentationResults(ftnHnd, pSchema, pCountSchemaItems, pInstrumentationData, pPgoSource);
1954-
mc->recGetPgoInstrumentationResults(ftnHnd, pSchema, pCountSchemaItems, pInstrumentationData, pPgoSource, temp);
1954+
HRESULT temp = original_ICorJitInfo->getPgoInstrumentationResults(ftnHnd, pSchema, pCountSchemaItems, pInstrumentationData, pPgoSource, pDynamicPgo);
1955+
mc->recGetPgoInstrumentationResults(ftnHnd, pSchema, pCountSchemaItems, pInstrumentationData, pPgoSource, pDynamicPgo, temp);
19551956
return temp;
19561957
}
19571958

src/coreclr/tools/superpmi/superpmi-shim-counter/icorjitinfo_generated.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -1374,10 +1374,11 @@ JITINTERFACE_HRESULT interceptor_ICJI::getPgoInstrumentationResults(
13741374
ICorJitInfo::PgoInstrumentationSchema** pSchema,
13751375
uint32_t* pCountSchemaItems,
13761376
uint8_t** pInstrumentationData,
1377-
ICorJitInfo::PgoSource* pgoSource)
1377+
ICorJitInfo::PgoSource* pPgoSource,
1378+
bool* pDynamicPgo)
13781379
{
13791380
mcs->AddCall("getPgoInstrumentationResults");
1380-
return original_ICorJitInfo->getPgoInstrumentationResults(ftnHnd, pSchema, pCountSchemaItems, pInstrumentationData, pgoSource);
1381+
return original_ICorJitInfo->getPgoInstrumentationResults(ftnHnd, pSchema, pCountSchemaItems, pInstrumentationData, pPgoSource, pDynamicPgo);
13811382
}
13821383

13831384
JITINTERFACE_HRESULT interceptor_ICJI::allocPgoInstrumentationBySchema(

src/coreclr/tools/superpmi/superpmi-shim-simple/icorjitinfo_generated.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -1206,9 +1206,10 @@ JITINTERFACE_HRESULT interceptor_ICJI::getPgoInstrumentationResults(
12061206
ICorJitInfo::PgoInstrumentationSchema** pSchema,
12071207
uint32_t* pCountSchemaItems,
12081208
uint8_t** pInstrumentationData,
1209-
ICorJitInfo::PgoSource* pgoSource)
1209+
ICorJitInfo::PgoSource* pPgoSource,
1210+
bool* pDynamicPgo)
12101211
{
1211-
return original_ICorJitInfo->getPgoInstrumentationResults(ftnHnd, pSchema, pCountSchemaItems, pInstrumentationData, pgoSource);
1212+
return original_ICorJitInfo->getPgoInstrumentationResults(ftnHnd, pSchema, pCountSchemaItems, pInstrumentationData, pPgoSource, pDynamicPgo);
12121213
}
12131214

12141215
JITINTERFACE_HRESULT interceptor_ICJI::allocPgoInstrumentationBySchema(

0 commit comments

Comments
 (0)