Skip to content

Commit 43aab06

Browse files
authored
Merge pull request microsoft#123 from microsoft/dev/jander/d2m
2 parents 8877aec + 57f16b8 commit 43aab06

File tree

9 files changed

+1311
-412
lines changed

9 files changed

+1311
-412
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ Please format the changes as follows:
77
+ BugFixes:
88
+ Updates:
99

10+
# 1.0.27
11+
+ New:
12+
+ Added support for ICorProfilerInfo10
13+
1014
# 1.0.26
1115
Same functionality as 1.0.25.
1216

build/Version.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
-->
1313
<SemanticVersionMajor>1</SemanticVersionMajor>
1414
<SemanticVersionMinor>0</SemanticVersionMinor>
15-
<SemanticVersionPatch>26</SemanticVersionPatch>
15+
<SemanticVersionPatch>27</SemanticVersionPatch>
1616

1717
<FileVersionMajor>15</FileVersionMajor>
1818
<FileVersionMinor>1</FileVersionMinor>
@@ -38,7 +38,7 @@
3838
Update for every public release.
3939
Format is YYYY-MM-DD
4040
-->
41-
<SemanticVersionDate>2019-08-01</SemanticVersionDate>
41+
<SemanticVersionDate>2019-08-07</SemanticVersionDate>
4242

4343
<!--
4444
Build version is used to distinguish internally built NuGet packages.

inc/clr/prof/corprof.h

Lines changed: 1216 additions & 407 deletions
Large diffs are not rendered by default.

inc/clr/prof/corprof.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Source: https://github.com/dotnet/coreclr/blob/v3.0.0-preview8.19379.2/src/pal/prebuilt/inc/corprof.h

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ macro (build_init build_language build_type)
8484
# that part.
8585
include_directories(${REPOSITORY_ROOT}/bin/${CMAKE_BUILD_TYPE}/x64)
8686

87+
include_directories(${REPOSITORY_ROOT}/inc/clr/prof) # Must be ahead of Core CLR PAL
8788
include_directories(${REPOSITORY_ROOT}/src/unix/inc)
8889
include_directories(${REPOSITORY_ROOT}/src/unix/inc/atl)
8990
include_directories(${REPOSITORY_ROOT}/src/unix/inc/empty)

src/InstrumentationEngine.NuGet.Headers/InstrumentationEngine.Headers.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<title>Microsoft Instrumentation Engine Headers</title>
99
<authors>$authors$</authors>
1010
<owners>$authors$</owners>
11-
<projectUrl>https://dotnet.microsoft.com</projectUrl>
11+
<projectUrl>https://github.com/Microsoft/CLRInstrumentationEngine</projectUrl>
1212
<license type="file">$licenseFile$</license>
1313
<iconUrl>http://go.microsoft.com/fwlink/?LinkID=288859</iconUrl>
1414
<requireLicenseAcceptance>true</requireLicenseAcceptance>

src/InstrumentationEngine.NuGet/InstrumentationEngine.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<title>Microsoft Instrumentation Engine</title>
99
<authors>$authors$</authors>
1010
<owners>$authors$</owners>
11-
<projectUrl>https://dotnet.microsoft.com</projectUrl>
11+
<projectUrl>https://github.com/Microsoft/CLRInstrumentationEngine</projectUrl>
1212
<license type="file">$licenseFile$</license>
1313
<iconUrl>http://go.microsoft.com/fwlink/?LinkID=288859</iconUrl>
1414
<requireLicenseAcceptance>true</requireLicenseAcceptance>

src/InstrumentationEngine/CorProfilerInfoWrapper.cpp

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ MicrosoftInstrumentationEngine::CCorProfilerInfoWrapper::CCorProfilerInfoWrapper
6767
{
6868
return;
6969
}
70+
71+
hr = m_pRealCorProfilerInfo->QueryInterface(__uuidof(ICorProfilerInfo10), (LPVOID*)&m_pRealCorProfilerInfo10);
72+
if (FAILED(hr))
73+
{
74+
return;
75+
}
7076
}
7177

7278
HRESULT MicrosoftInstrumentationEngine::CCorProfilerInfoWrapper::QueryInterface(
@@ -138,6 +144,12 @@ HRESULT MicrosoftInstrumentationEngine::CCorProfilerInfoWrapper::QueryInterface(
138144
*ppvObject = (ICorProfilerInfo9*)this;
139145
return S_OK;
140146
}
147+
else if (riid == __uuidof(ICorProfilerInfo10) && m_pRealCorProfilerInfo10 != NULL)
148+
{
149+
AddRef();
150+
*ppvObject = (ICorProfilerInfo10*)this;
151+
return S_OK;
152+
}
141153
return E_NOINTERFACE;
142154
}
143155

@@ -1106,4 +1118,51 @@ HRESULT MicrosoftInstrumentationEngine::CCorProfilerInfoWrapper::GetCodeInfo4(
11061118
{
11071119
IfNullRet(m_pRealCorProfilerInfo9);
11081120
return m_pRealCorProfilerInfo9->GetCodeInfo4(pNativeCodeStartAddress, cCodeInfos, pcCodeInfos, codeInfos);
1121+
}
1122+
1123+
// ICorProfilerInfo10
1124+
HRESULT MicrosoftInstrumentationEngine::CCorProfilerInfoWrapper::EnumerateObjectReferences(
1125+
_In_ ObjectID objectId,
1126+
_In_ ObjectReferenceCallback callback,
1127+
_In_ void *clientData)
1128+
{
1129+
IfNullRet(m_pRealCorProfilerInfo10);
1130+
return m_pRealCorProfilerInfo10->EnumerateObjectReferences(objectId, callback, clientData);
1131+
}
1132+
1133+
HRESULT MicrosoftInstrumentationEngine::CCorProfilerInfoWrapper::IsFrozenObject(
1134+
_In_ ObjectID objectId,
1135+
_Out_ BOOL *pbFrozen)
1136+
{
1137+
IfNullRet(m_pRealCorProfilerInfo10);
1138+
return m_pRealCorProfilerInfo10->IsFrozenObject(objectId, pbFrozen);
1139+
}
1140+
1141+
HRESULT MicrosoftInstrumentationEngine::CCorProfilerInfoWrapper::GetLOHObjectSizeThreshold(
1142+
_Out_ DWORD *pThreshold)
1143+
{
1144+
IfNullRet(m_pRealCorProfilerInfo10);
1145+
return m_pRealCorProfilerInfo10->GetLOHObjectSizeThreshold(pThreshold);
1146+
}
1147+
1148+
HRESULT MicrosoftInstrumentationEngine::CCorProfilerInfoWrapper::RequestReJITWithInliners(
1149+
_In_ DWORD dwRejitFlags,
1150+
_In_ ULONG cFunctions,
1151+
_In_reads_(cFunctions) ModuleID moduleIds[],
1152+
_In_reads_(cFunctions) mdMethodDef methodIds[])
1153+
{
1154+
IfNullRet(m_pRealCorProfilerInfo10);
1155+
return m_pRealCorProfilerInfo10->RequestReJITWithInliners(dwRejitFlags, cFunctions, moduleIds, methodIds);
1156+
}
1157+
1158+
HRESULT MicrosoftInstrumentationEngine::CCorProfilerInfoWrapper::SuspendRuntime(void)
1159+
{
1160+
IfNullRet(m_pRealCorProfilerInfo10);
1161+
return m_pRealCorProfilerInfo10->SuspendRuntime();
1162+
}
1163+
1164+
HRESULT MicrosoftInstrumentationEngine::CCorProfilerInfoWrapper::ResumeRuntime(void)
1165+
{
1166+
IfNullRet(m_pRealCorProfilerInfo10);
1167+
return m_pRealCorProfilerInfo10->ResumeRuntime();
11091168
}

src/InstrumentationEngine/CorProfilerInfoWrapper.h

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace MicrosoftInstrumentationEngine
1212
class CProfilerManager;
1313

1414
class CCorProfilerInfoWrapper :
15-
public ICorProfilerInfo9
15+
public ICorProfilerInfo10
1616
{
1717
private:
1818
LONG m_refcount;
@@ -26,6 +26,7 @@ namespace MicrosoftInstrumentationEngine
2626
CComPtr<ICorProfilerInfo7> m_pRealCorProfilerInfo7;
2727
CComPtr<ICorProfilerInfo8> m_pRealCorProfilerInfo8;
2828
CComPtr<ICorProfilerInfo9> m_pRealCorProfilerInfo9;
29+
CComPtr<ICorProfilerInfo10> m_pRealCorProfilerInfo10;
2930

3031
// Non-addref'd Back pointer the profiler manager.
3132
CProfilerManager* m_pProfilerManager;
@@ -613,5 +614,29 @@ namespace MicrosoftInstrumentationEngine
613614
_In_ ULONG32 cCodeInfos,
614615
_Out_ ULONG32 *pcCodeInfos,
615616
_Out_writes_(cCodeInfos) COR_PRF_CODE_INFO codeInfos[]);
617+
618+
// ICorProfilerInfo10
619+
public:
620+
STDMETHOD(EnumerateObjectReferences)(
621+
_In_ ObjectID objectId,
622+
_In_ ObjectReferenceCallback callback,
623+
_In_ void *clientData);
624+
625+
STDMETHOD(IsFrozenObject)(
626+
_In_ ObjectID objectId,
627+
_Out_ BOOL *pbFrozen);
628+
629+
STDMETHOD(GetLOHObjectSizeThreshold)(
630+
_Out_ DWORD *pThreshold);
631+
632+
STDMETHOD(RequestReJITWithInliners)(
633+
_In_ DWORD dwRejitFlags,
634+
_In_ ULONG cFunctions,
635+
_In_reads_(cFunctions) ModuleID moduleIds[],
636+
_In_reads_(cFunctions) mdMethodDef methodIds[]);
637+
638+
STDMETHOD(SuspendRuntime)(void);
639+
640+
STDMETHOD(ResumeRuntime)(void);
616641
};
617642
}

0 commit comments

Comments
 (0)