From 29f1087f2dcb9a116039a06d8e568b60b122bc89 Mon Sep 17 00:00:00 2001 From: David Mason Date: Tue, 9 Jun 2020 00:21:44 -0700 Subject: [PATCH 1/7] Dac changes for pinned object heap --- src/coreclr/src/debug/daccess/daccess.cpp | 4 + src/coreclr/src/debug/daccess/dacimpl.h | 10 +- src/coreclr/src/debug/daccess/request.cpp | 162 ++ src/coreclr/src/inc/sospriv.idl | 16 + .../src/pal/prebuilt/idl/sospriv_i.cpp | 3 + src/coreclr/src/pal/prebuilt/inc/sospriv.h | 1641 +++++++++-------- 6 files changed, 1083 insertions(+), 753 deletions(-) diff --git a/src/coreclr/src/debug/daccess/daccess.cpp b/src/coreclr/src/debug/daccess/daccess.cpp index cd848b1d88f366..f3ef8217b7637e 100644 --- a/src/coreclr/src/debug/daccess/daccess.cpp +++ b/src/coreclr/src/debug/daccess/daccess.cpp @@ -3290,6 +3290,10 @@ ClrDataAccess::QueryInterface(THIS_ { ifaceRet = static_cast(this); } + else if (IsEqualIID(interfaceId, __uuidof(ISOSDacInterface8))) + { + ifaceRet = static_cast(this); + } else { *iface = NULL; diff --git a/src/coreclr/src/debug/daccess/dacimpl.h b/src/coreclr/src/debug/daccess/dacimpl.h index 29183751fb53e9..03a3cf8c07ed14 100644 --- a/src/coreclr/src/debug/daccess/dacimpl.h +++ b/src/coreclr/src/debug/daccess/dacimpl.h @@ -840,7 +840,8 @@ class ClrDataAccess public ISOSDacInterface4, public ISOSDacInterface5, public ISOSDacInterface6, - public ISOSDacInterface7 + public ISOSDacInterface7, + public ISOSDacInterface8 { public: ClrDataAccess(ICorDebugDataTarget * pTarget, ICLRDataTarget * pLegacyTarget=0); @@ -1195,6 +1196,13 @@ class ClrDataAccess virtual HRESULT STDMETHODCALLTYPE GetProfilerModifiedILInformation(CLRDATA_ADDRESS methodDesc, struct DacpProfilerILData *pILData); virtual HRESULT STDMETHODCALLTYPE GetMethodsWithProfilerModifiedIL(CLRDATA_ADDRESS mod, CLRDATA_ADDRESS *methodDescs, int cMethodDescs, int *pcMethodDescs); + // ISOSDacInterface8 + virtual HRESULT STDMETHODCALLTYPE GetGenerationTable(unsigned int cGenerations, struct DacpGenerationData *pGenerationData, unsigned int *pNeeded); + virtual HRESULT STDMETHODCALLTYPE GetFinalizationFillPointers(unsigned int cFillPointers, CLRDATA_ADDRESS *pFinalizationFillPointers, unsigned int *pNeeded); + + virtual HRESULT STDMETHODCALLTYPE GetGenerationTableSvr(CLRDATA_ADDRESS heapAddr, unsigned int cGenerations, struct DacpGenerationData *pGenerationData, unsigned int *pNeeded); + virtual HRESULT STDMETHODCALLTYPE GetFinalizationFillPointersSvr(CLRDATA_ADDRESS heapAddr, unsigned int cFillPointers, CLRDATA_ADDRESS *pFinalizationFillPointers, unsigned int *pNeeded); + // // ClrDataAccess. // diff --git a/src/coreclr/src/debug/daccess/request.cpp b/src/coreclr/src/debug/daccess/request.cpp index a0f75236cb8877..0f4abed4488e69 100644 --- a/src/coreclr/src/debug/daccess/request.cpp +++ b/src/coreclr/src/debug/daccess/request.cpp @@ -4500,3 +4500,165 @@ HRESULT ClrDataAccess::GetMethodsWithProfilerModifiedIL(CLRDATA_ADDRESS mod, CLR return hr; } + +HRESULT ClrDataAccess::GetGenerationTable(unsigned int cGenerations, struct DacpGenerationData *pGenerationData, unsigned int *pNeeded) +{ + if (cGenerations > 0 && pGenerationData == NULL) + { + return E_INVALIDARG; + } + + SOSDacEnter(); + + HRESULT hr = S_OK; + unsigned int numGenerationTableEntries = NUMBERGENERATIONS + 1; + if (pNeeded != NULL) + { + *pNeeded = numGenerationTableEntries; + } + + if (cGenerations < numGenerationTableEntries) + { + hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); + } + else + { + for (unsigned int i=0; i < numGenerationTableEntries; i++) + { + DPTR(dac_generation) generation = GenerationTableIndex(g_gcDacGlobals->generation_table, i); + pGenerationData[i].start_segment = (CLRDATA_ADDRESS) dac_cast(generation->start_segment); + + pGenerationData[i].allocation_start = (CLRDATA_ADDRESS) generation->allocation_start; + + DPTR(gc_alloc_context) alloc_context = dac_cast(generation) + offsetof(dac_generation, allocation_context); + pGenerationData[i].allocContextPtr = (CLRDATA_ADDRESS)alloc_context->alloc_ptr; + pGenerationData[i].allocContextLimit = (CLRDATA_ADDRESS)alloc_context->alloc_limit; + } + } + + SOSDacLeave(); + return hr; +} + +HRESULT ClrDataAccess::GetFinalizationFillPointers(unsigned int cFillPointers, CLRDATA_ADDRESS *pFinalizationFillPointers, unsigned int *pNeeded) +{ + if (cFillPointers > 0 && pFinalizationFillPointers == NULL) + { + return E_INVALIDARG; + } + + SOSDacEnter(); + + HRESULT hr = S_OK; + unsigned int numFillPointers = NUMBERGENERATIONS + 1 + dac_finalize_queue::ExtraSegCount; + if (pNeeded != NULL) + { + *pNeeded = numFillPointers; + } + + if (cFillPointers < numFillPointers) + { + hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); + } + else + { + if (g_gcDacGlobals->finalize_queue.IsValid()) + { + DPTR(dac_finalize_queue) fq = Dereference(g_gcDacGlobals->finalize_queue); + DPTR(uint8_t*) fillPointersTable = dac_cast(fq) + offsetof(dac_finalize_queue, m_FillPointers); + for (unsigned int i = 0; i < numFillPointers; i++) + { + pFinalizationFillPointers[i] = (CLRDATA_ADDRESS)*TableIndex(fillPointersTable, i, sizeof(uint8_t*)); + } + } + } + + SOSDacLeave(); + return hr; +} + +HRESULT ClrDataAccess::GetGenerationTableSvr(CLRDATA_ADDRESS heapAddr, unsigned int cGenerations, struct DacpGenerationData *pGenerationData, unsigned int *pNeeded) +{ + if (heapAddr == NULL || (cGenerations > 0 && pGenerationData == NULL)) + { + return E_INVALIDARG; + } + + SOSDacEnter(); + + HRESULT hr = S_OK; +#ifdef FEATURE_SVR_GC + // NUMBERGENERATIONS is hardcoded to the previous number of generations, doesn't account for POH + unsigned int numGenerationTableEntries = NUMBERGENERATIONS + 1; + if (pNeeded != NULL) + { + *pNeeded = numGenerationTableEntries; + } + + if (cGenerations < numGenerationTableEntries) + { + hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); + } + else + { + DPTR(dac_gc_heap) pHeap = __DPtr(TO_TADDR(heapAddr)); + + for (unsigned int i = 0; i < numGenerationTableEntries; ++i) + { + DPTR(dac_generation) generation = ServerGenerationTableIndex(pHeap, i); + pGenerationData[i].start_segment = (CLRDATA_ADDRESS)dac_cast(generation->start_segment); + pGenerationData[i].allocation_start = (CLRDATA_ADDRESS)(ULONG_PTR)generation->allocation_start; + DPTR(gc_alloc_context) alloc_context = dac_cast(generation) + offsetof(dac_generation, allocation_context); + pGenerationData[i].allocContextPtr = (CLRDATA_ADDRESS)(ULONG_PTR) alloc_context->alloc_ptr; + pGenerationData[i].allocContextLimit = (CLRDATA_ADDRESS)(ULONG_PTR) alloc_context->alloc_limit; + } + + } +#else + hr = E_NOTIMPL; +#endif + + SOSDacLeave(); + return hr; +} + +HRESULT ClrDataAccess::GetFinalizationFillPointersSvr(CLRDATA_ADDRESS heapAddr, unsigned int cFillPointers, CLRDATA_ADDRESS *pFinalizationFillPointers, unsigned int *pNeeded) +{ + if (heapAddr == NULL || (cFillPointers > 0 && pFinalizationFillPointers == NULL)) + { + return E_INVALIDARG; + } + + SOSDacEnter(); + + HRESULT hr = S_OK; +#ifdef FEATURE_SVR_GC + // NUMBERGENERATIONS is hardcoded to the previous number of generations, doesn't account for POH + unsigned int numFillPointers = NUMBERGENERATIONS + 1 + dac_finalize_queue::ExtraSegCount; + if (pNeeded != NULL) + { + *pNeeded = numFillPointers; + } + + if (cFillPointers < numFillPointers) + { + hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); + } + else + { + DPTR(dac_gc_heap) pHeap = __DPtr(TO_TADDR(heapAddr)); + + DPTR(dac_finalize_queue) fq = pHeap->finalize_queue; + DPTR(uint8_t*) pFillPointerArray= dac_cast(fq) + offsetof(dac_finalize_queue, m_FillPointers); + for(unsigned int i = 0; i < numFillPointers; ++i) + { + pFinalizationFillPointers[i] = (CLRDATA_ADDRESS) pFillPointerArray[i]; + } + } +#else + hr = E_NOTIMPL; +#endif + + SOSDacLeave(); + return hr; +} diff --git a/src/coreclr/src/inc/sospriv.idl b/src/coreclr/src/inc/sospriv.idl index d0b92626f528f9..c265d724866d57 100644 --- a/src/coreclr/src/inc/sospriv.idl +++ b/src/coreclr/src/inc/sospriv.idl @@ -390,3 +390,19 @@ interface ISOSDacInterface7 : IUnknown HRESULT GetProfilerModifiedILInformation(CLRDATA_ADDRESS methodDesc, struct DacpProfilerILData *pILData); HRESULT GetMethodsWithProfilerModifiedIL(CLRDATA_ADDRESS mod, CLRDATA_ADDRESS *methodDescs, int cMethodDescs, int *pcMethodDescs); }; + +[ + object, + local, + uuid(c12f35a9-e55c-4520-a894-b3dc5165dfce) +] +interface ISOSDacInterface8 : IUnknown +{ + // WKS + HRESULT GetGenerationTable(unsigned int cGenerations, struct DacpGenerationData *pGenerationData, unsigned int *pNeeded); + HRESULT GetFinalizationFillPointers(unsigned int cFillPointers, CLRDATA_ADDRESS *pFinalizationFillPointers, unsigned int *pNeeded); + + // SVR + HRESULT GetGenerationTableSvr(CLRDATA_ADDRESS heapAddr, unsigned int cGenerations, struct DacpGenerationData *pGenerationData, unsigned int *pNeeded); + HRESULT GetFinalizationFillPointersSvr(CLRDATA_ADDRESS heapAddr, unsigned int cFillPointers, CLRDATA_ADDRESS *pFinalizationFillPointers, unsigned int *pNeeded); +} diff --git a/src/coreclr/src/pal/prebuilt/idl/sospriv_i.cpp b/src/coreclr/src/pal/prebuilt/idl/sospriv_i.cpp index 792fdfbc2ab7cd..55de43254315e9 100644 --- a/src/coreclr/src/pal/prebuilt/idl/sospriv_i.cpp +++ b/src/coreclr/src/pal/prebuilt/idl/sospriv_i.cpp @@ -93,6 +93,9 @@ MIDL_DEFINE_GUID(IID, IID_ISOSDacInterface6,0x11206399,0x4B66,0x4EDB,0x98,0xEA,0 MIDL_DEFINE_GUID(IID, IID_ISOSDacInterface7,0xc1020dde,0xfe98,0x4536,0xa5,0x3b,0xf3,0x5a,0x74,0xc3,0x27,0xeb); + +MIDL_DEFINE_GUID(IID, IID_ISOSDacInterface8,0xc12f35a9,0xe55c,0x4520,0xa8,0x94,0xb3,0xdc,0x51,0x65,0xdf,0xce); + #undef MIDL_DEFINE_GUID #ifdef __cplusplus diff --git a/src/coreclr/src/pal/prebuilt/inc/sospriv.h b/src/coreclr/src/pal/prebuilt/inc/sospriv.h index 2f03eb0134e697..243a7a7677a94f 100644 --- a/src/coreclr/src/pal/prebuilt/inc/sospriv.h +++ b/src/coreclr/src/pal/prebuilt/inc/sospriv.h @@ -6,11 +6,11 @@ /* File created by MIDL compiler version 8.01.0622 */ /* at Mon Jan 18 19:14:07 2038 */ -/* Compiler settings for C:/git/diagnostics/src/inc/sospriv.idl: - Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.01.0622 +/* Compiler settings for C:/git/runtime/src/coreclr/src/inc/sospriv.idl: + Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.01.0622 protocol : dce , ms_ext, c_ext, robust - error checks: allocation ref bounds_check enum stub_data - VC __declspec() decoration level: + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: __declspec(uuid()), __declspec(selectany), __declspec(novtable) DECLSPEC_UUID(), MIDL_INTERFACE() */ @@ -43,7 +43,7 @@ #pragma once #endif -/* Forward Declarations */ +/* Forward Declarations */ #ifndef __ISOSEnum_FWD_DEFINED__ #define __ISOSEnum_FWD_DEFINED__ @@ -122,17 +122,24 @@ typedef interface ISOSDacInterface7 ISOSDacInterface7; #endif /* __ISOSDacInterface7_FWD_DEFINED__ */ +#ifndef __ISOSDacInterface8_FWD_DEFINED__ +#define __ISOSDacInterface8_FWD_DEFINED__ +typedef interface ISOSDacInterface8 ISOSDacInterface8; + +#endif /* __ISOSDacInterface8_FWD_DEFINED__ */ + + /* header files for imported files */ #include "unknwn.h" #include "xclrdata.h" #ifdef __cplusplus extern "C"{ -#endif +#endif /* interface __MIDL_itf_sospriv_0000_0000 */ -/* [local] */ +/* [local] */ @@ -176,24 +183,24 @@ typedef int VCSHeapType; #endif typedef enum { TYPEDEFTOMETHODTABLE, TYPEREFTOMETHODTABLE } ModuleMapType; typedef enum {IndcellHeap, LookupHeap, ResolveHeap, DispatchHeap, CacheEntryHeap} VCSHeapType; -typedef void ( *MODULEMAPTRAVERSE )( +typedef void ( *MODULEMAPTRAVERSE )( UINT index, CLRDATA_ADDRESS methodTable, LPVOID token); -typedef void ( *VISITHEAP )( +typedef void ( *VISITHEAP )( CLRDATA_ADDRESS blockData, size_t blockSize, BOOL blockIsCurrentBlock); -typedef BOOL ( *VISITRCWFORCLEANUP )( +typedef BOOL ( *VISITRCWFORCLEANUP )( CLRDATA_ADDRESS RCW, CLRDATA_ADDRESS Context, CLRDATA_ADDRESS Thread, BOOL bIsFreeThreaded, LPVOID token); -typedef BOOL ( *DUMPEHINFO )( +typedef BOOL ( *DUMPEHINFO )( UINT clauseIndex, UINT totalClauses, struct DACEHInfo *pEHInfo, @@ -223,57 +230,57 @@ extern RPC_IF_HANDLE __MIDL_itf_sospriv_0000_0000_v0_0_s_ifspec; #define __ISOSEnum_INTERFACE_DEFINED__ /* interface ISOSEnum */ -/* [uuid][local][object] */ +/* [uuid][local][object] */ EXTERN_C const IID IID_ISOSEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("286CA186-E763-4F61-9760-487D43AE4341") ISOSEnum : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE Skip( + virtual HRESULT STDMETHODCALLTYPE Skip( /* [in] */ unsigned int count) = 0; - + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCount( + + virtual HRESULT STDMETHODCALLTYPE GetCount( /* [out] */ unsigned int *pCount) = 0; - + }; - - + + #else /* C style interface */ typedef struct ISOSEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ISOSEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ISOSEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ISOSEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ISOSEnum * This, /* [in] */ unsigned int count); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ISOSEnum * This); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ISOSEnum * This, /* [out] */ unsigned int *pCount); - + END_INTERFACE } ISOSEnumVtbl; @@ -282,29 +289,29 @@ EXTERN_C const IID IID_ISOSEnum; CONST_VTBL struct ISOSEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ISOSEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ISOSEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ISOSEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ISOSEnum_Skip(This,count) \ - ( (This)->lpVtbl -> Skip(This,count) ) + ( (This)->lpVtbl -> Skip(This,count) ) #define ISOSEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) + ( (This)->lpVtbl -> Reset(This) ) #define ISOSEnum_GetCount(This,pCount) \ - ( (This)->lpVtbl -> GetCount(This,pCount) ) + ( (This)->lpVtbl -> GetCount(This,pCount) ) #endif /* COBJMACROS */ @@ -321,60 +328,60 @@ EXTERN_C const IID IID_ISOSEnum; #define __ISOSHandleEnum_INTERFACE_DEFINED__ /* interface ISOSHandleEnum */ -/* [uuid][local][object] */ +/* [uuid][local][object] */ EXTERN_C const IID IID_ISOSHandleEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("3E269830-4A2B-4301-8EE2-D6805B29B2FA") ISOSHandleEnum : public ISOSEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ unsigned int count, /* [length_is][size_is][out] */ SOSHandleData handles[ ], /* [out] */ unsigned int *pNeeded) = 0; - + }; - - + + #else /* C style interface */ typedef struct ISOSHandleEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ISOSHandleEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ISOSHandleEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ISOSHandleEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ISOSHandleEnum * This, /* [in] */ unsigned int count); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ISOSHandleEnum * This); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ISOSHandleEnum * This, /* [out] */ unsigned int *pCount); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ISOSHandleEnum * This, /* [in] */ unsigned int count, /* [length_is][size_is][out] */ SOSHandleData handles[ ], /* [out] */ unsigned int *pNeeded); - + END_INTERFACE } ISOSHandleEnumVtbl; @@ -383,33 +390,33 @@ EXTERN_C const IID IID_ISOSHandleEnum; CONST_VTBL struct ISOSHandleEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ISOSHandleEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ISOSHandleEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ISOSHandleEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ISOSHandleEnum_Skip(This,count) \ - ( (This)->lpVtbl -> Skip(This,count) ) + ( (This)->lpVtbl -> Skip(This,count) ) #define ISOSHandleEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) + ( (This)->lpVtbl -> Reset(This) ) #define ISOSHandleEnum_GetCount(This,pCount) \ - ( (This)->lpVtbl -> GetCount(This,pCount) ) + ( (This)->lpVtbl -> GetCount(This,pCount) ) #define ISOSHandleEnum_Next(This,count,handles,pNeeded) \ - ( (This)->lpVtbl -> Next(This,count,handles,pNeeded) ) + ( (This)->lpVtbl -> Next(This,count,handles,pNeeded) ) #endif /* COBJMACROS */ @@ -423,18 +430,18 @@ EXTERN_C const IID IID_ISOSHandleEnum; /* interface __MIDL_itf_sospriv_0000_0002 */ -/* [local] */ +/* [local] */ #ifndef _SOS_StackReference_ #define _SOS_StackReference_ -typedef +typedef enum SOSStackSourceType { SOS_StackSourceIP = 0, - SOS_StackSourceFrame = ( SOS_StackSourceIP + 1 ) + SOS_StackSourceFrame = ( SOS_StackSourceIP + 1 ) } SOSStackSourceType; -typedef +typedef enum SOSRefFlags { SOSRefInterior = 1, @@ -471,60 +478,60 @@ extern RPC_IF_HANDLE __MIDL_itf_sospriv_0000_0002_v0_0_s_ifspec; #define __ISOSStackRefErrorEnum_INTERFACE_DEFINED__ /* interface ISOSStackRefErrorEnum */ -/* [uuid][local][object] */ +/* [uuid][local][object] */ EXTERN_C const IID IID_ISOSStackRefErrorEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("774F4E1B-FB7B-491B-976D-A8130FE355E9") ISOSStackRefErrorEnum : public ISOSEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ unsigned int count, /* [length_is][size_is][out] */ SOSStackRefError ref[ ], /* [out] */ unsigned int *pFetched) = 0; - + }; - - + + #else /* C style interface */ typedef struct ISOSStackRefErrorEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ISOSStackRefErrorEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ISOSStackRefErrorEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ISOSStackRefErrorEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ISOSStackRefErrorEnum * This, /* [in] */ unsigned int count); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ISOSStackRefErrorEnum * This); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ISOSStackRefErrorEnum * This, /* [out] */ unsigned int *pCount); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ISOSStackRefErrorEnum * This, /* [in] */ unsigned int count, /* [length_is][size_is][out] */ SOSStackRefError ref[ ], /* [out] */ unsigned int *pFetched); - + END_INTERFACE } ISOSStackRefErrorEnumVtbl; @@ -533,33 +540,33 @@ EXTERN_C const IID IID_ISOSStackRefErrorEnum; CONST_VTBL struct ISOSStackRefErrorEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ISOSStackRefErrorEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ISOSStackRefErrorEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ISOSStackRefErrorEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ISOSStackRefErrorEnum_Skip(This,count) \ - ( (This)->lpVtbl -> Skip(This,count) ) + ( (This)->lpVtbl -> Skip(This,count) ) #define ISOSStackRefErrorEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) + ( (This)->lpVtbl -> Reset(This) ) #define ISOSStackRefErrorEnum_GetCount(This,pCount) \ - ( (This)->lpVtbl -> GetCount(This,pCount) ) + ( (This)->lpVtbl -> GetCount(This,pCount) ) #define ISOSStackRefErrorEnum_Next(This,count,ref,pFetched) \ - ( (This)->lpVtbl -> Next(This,count,ref,pFetched) ) + ( (This)->lpVtbl -> Next(This,count,ref,pFetched) ) #endif /* COBJMACROS */ @@ -576,67 +583,67 @@ EXTERN_C const IID IID_ISOSStackRefErrorEnum; #define __ISOSStackRefEnum_INTERFACE_DEFINED__ /* interface ISOSStackRefEnum */ -/* [uuid][local][object] */ +/* [uuid][local][object] */ EXTERN_C const IID IID_ISOSStackRefEnum; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("8FA642BD-9F10-4799-9AA3-512AE78C77EE") ISOSStackRefEnum : public ISOSEnum { public: - virtual HRESULT STDMETHODCALLTYPE Next( + virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ unsigned int count, /* [length_is][size_is][out] */ SOSStackRefData ref[ ], /* [out] */ unsigned int *pFetched) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnumerateErrors( + + virtual HRESULT STDMETHODCALLTYPE EnumerateErrors( /* [out] */ ISOSStackRefErrorEnum **ppEnum) = 0; - + }; - - + + #else /* C style interface */ typedef struct ISOSStackRefEnumVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ISOSStackRefEnum * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ISOSStackRefEnum * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ISOSStackRefEnum * This); - - HRESULT ( STDMETHODCALLTYPE *Skip )( + + HRESULT ( STDMETHODCALLTYPE *Skip )( ISOSStackRefEnum * This, /* [in] */ unsigned int count); - - HRESULT ( STDMETHODCALLTYPE *Reset )( + + HRESULT ( STDMETHODCALLTYPE *Reset )( ISOSStackRefEnum * This); - - HRESULT ( STDMETHODCALLTYPE *GetCount )( + + HRESULT ( STDMETHODCALLTYPE *GetCount )( ISOSStackRefEnum * This, /* [out] */ unsigned int *pCount); - - HRESULT ( STDMETHODCALLTYPE *Next )( + + HRESULT ( STDMETHODCALLTYPE *Next )( ISOSStackRefEnum * This, /* [in] */ unsigned int count, /* [length_is][size_is][out] */ SOSStackRefData ref[ ], /* [out] */ unsigned int *pFetched); - - HRESULT ( STDMETHODCALLTYPE *EnumerateErrors )( + + HRESULT ( STDMETHODCALLTYPE *EnumerateErrors )( ISOSStackRefEnum * This, /* [out] */ ISOSStackRefErrorEnum **ppEnum); - + END_INTERFACE } ISOSStackRefEnumVtbl; @@ -645,36 +652,36 @@ EXTERN_C const IID IID_ISOSStackRefEnum; CONST_VTBL struct ISOSStackRefEnumVtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ISOSStackRefEnum_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ISOSStackRefEnum_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ISOSStackRefEnum_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ISOSStackRefEnum_Skip(This,count) \ - ( (This)->lpVtbl -> Skip(This,count) ) + ( (This)->lpVtbl -> Skip(This,count) ) #define ISOSStackRefEnum_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) + ( (This)->lpVtbl -> Reset(This) ) #define ISOSStackRefEnum_GetCount(This,pCount) \ - ( (This)->lpVtbl -> GetCount(This,pCount) ) + ( (This)->lpVtbl -> GetCount(This,pCount) ) #define ISOSStackRefEnum_Next(This,count,ref,pFetched) \ - ( (This)->lpVtbl -> Next(This,count,ref,pFetched) ) + ( (This)->lpVtbl -> Next(This,count,ref,pFetched) ) #define ISOSStackRefEnum_EnumerateErrors(This,ppEnum) \ - ( (This)->lpVtbl -> EnumerateErrors(This,ppEnum) ) + ( (This)->lpVtbl -> EnumerateErrors(This,ppEnum) ) #endif /* COBJMACROS */ @@ -691,546 +698,546 @@ EXTERN_C const IID IID_ISOSStackRefEnum; #define __ISOSDacInterface_INTERFACE_DEFINED__ /* interface ISOSDacInterface */ -/* [uuid][local][object] */ +/* [uuid][local][object] */ EXTERN_C const IID IID_ISOSDacInterface; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("436f00f2-b42a-4b9f-870c-e73db66ae930") ISOSDacInterface : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetThreadStoreData( + virtual HRESULT STDMETHODCALLTYPE GetThreadStoreData( struct DacpThreadStoreData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAppDomainStoreData( + + virtual HRESULT STDMETHODCALLTYPE GetAppDomainStoreData( struct DacpAppDomainStoreData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAppDomainList( + + virtual HRESULT STDMETHODCALLTYPE GetAppDomainList( unsigned int count, CLRDATA_ADDRESS values[ ], unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAppDomainData( + + virtual HRESULT STDMETHODCALLTYPE GetAppDomainData( CLRDATA_ADDRESS addr, struct DacpAppDomainData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAppDomainName( + + virtual HRESULT STDMETHODCALLTYPE GetAppDomainName( CLRDATA_ADDRESS addr, unsigned int count, WCHAR *name, unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetDomainFromContext( + + virtual HRESULT STDMETHODCALLTYPE GetDomainFromContext( CLRDATA_ADDRESS context, CLRDATA_ADDRESS *domain) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAssemblyList( + + virtual HRESULT STDMETHODCALLTYPE GetAssemblyList( CLRDATA_ADDRESS appDomain, int count, CLRDATA_ADDRESS values[ ], int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAssemblyData( + + virtual HRESULT STDMETHODCALLTYPE GetAssemblyData( CLRDATA_ADDRESS baseDomainPtr, CLRDATA_ADDRESS assembly, struct DacpAssemblyData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAssemblyName( + + virtual HRESULT STDMETHODCALLTYPE GetAssemblyName( CLRDATA_ADDRESS assembly, unsigned int count, WCHAR *name, unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetModule( + + virtual HRESULT STDMETHODCALLTYPE GetModule( CLRDATA_ADDRESS addr, IXCLRDataModule **mod) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetModuleData( + + virtual HRESULT STDMETHODCALLTYPE GetModuleData( CLRDATA_ADDRESS moduleAddr, struct DacpModuleData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE TraverseModuleMap( + + virtual HRESULT STDMETHODCALLTYPE TraverseModuleMap( ModuleMapType mmt, CLRDATA_ADDRESS moduleAddr, MODULEMAPTRAVERSE pCallback, LPVOID token) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAssemblyModuleList( + + virtual HRESULT STDMETHODCALLTYPE GetAssemblyModuleList( CLRDATA_ADDRESS assembly, unsigned int count, CLRDATA_ADDRESS modules[ ], unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetILForModule( + + virtual HRESULT STDMETHODCALLTYPE GetILForModule( CLRDATA_ADDRESS moduleAddr, DWORD rva, CLRDATA_ADDRESS *il) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetThreadData( + + virtual HRESULT STDMETHODCALLTYPE GetThreadData( CLRDATA_ADDRESS thread, struct DacpThreadData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetThreadFromThinlockID( + + virtual HRESULT STDMETHODCALLTYPE GetThreadFromThinlockID( UINT thinLockId, CLRDATA_ADDRESS *pThread) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetStackLimits( + + virtual HRESULT STDMETHODCALLTYPE GetStackLimits( CLRDATA_ADDRESS threadPtr, CLRDATA_ADDRESS *lower, CLRDATA_ADDRESS *upper, CLRDATA_ADDRESS *fp) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetMethodDescData( + + virtual HRESULT STDMETHODCALLTYPE GetMethodDescData( CLRDATA_ADDRESS methodDesc, CLRDATA_ADDRESS ip, struct DacpMethodDescData *data, ULONG cRevertedRejitVersions, struct DacpReJitData *rgRevertedRejitData, ULONG *pcNeededRevertedRejitData) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetMethodDescPtrFromIP( + + virtual HRESULT STDMETHODCALLTYPE GetMethodDescPtrFromIP( CLRDATA_ADDRESS ip, CLRDATA_ADDRESS *ppMD) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetMethodDescName( + + virtual HRESULT STDMETHODCALLTYPE GetMethodDescName( CLRDATA_ADDRESS methodDesc, unsigned int count, WCHAR *name, unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetMethodDescPtrFromFrame( + + virtual HRESULT STDMETHODCALLTYPE GetMethodDescPtrFromFrame( CLRDATA_ADDRESS frameAddr, CLRDATA_ADDRESS *ppMD) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetMethodDescFromToken( + + virtual HRESULT STDMETHODCALLTYPE GetMethodDescFromToken( CLRDATA_ADDRESS moduleAddr, mdToken token, CLRDATA_ADDRESS *methodDesc) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetMethodDescTransparencyData( + + virtual HRESULT STDMETHODCALLTYPE GetMethodDescTransparencyData( CLRDATA_ADDRESS methodDesc, struct DacpMethodDescTransparencyData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCodeHeaderData( + + virtual HRESULT STDMETHODCALLTYPE GetCodeHeaderData( CLRDATA_ADDRESS ip, struct DacpCodeHeaderData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetJitManagerList( + + virtual HRESULT STDMETHODCALLTYPE GetJitManagerList( unsigned int count, struct DacpJitManagerInfo *managers, unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetJitHelperFunctionName( + + virtual HRESULT STDMETHODCALLTYPE GetJitHelperFunctionName( CLRDATA_ADDRESS ip, unsigned int count, char *name, unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetJumpThunkTarget( + + virtual HRESULT STDMETHODCALLTYPE GetJumpThunkTarget( T_CONTEXT *ctx, CLRDATA_ADDRESS *targetIP, CLRDATA_ADDRESS *targetMD) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetThreadpoolData( + + virtual HRESULT STDMETHODCALLTYPE GetThreadpoolData( struct DacpThreadpoolData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetWorkRequestData( + + virtual HRESULT STDMETHODCALLTYPE GetWorkRequestData( CLRDATA_ADDRESS addrWorkRequest, struct DacpWorkRequestData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetHillClimbingLogEntry( + + virtual HRESULT STDMETHODCALLTYPE GetHillClimbingLogEntry( CLRDATA_ADDRESS addr, struct DacpHillClimbingLogEntry *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetObjectData( + + virtual HRESULT STDMETHODCALLTYPE GetObjectData( CLRDATA_ADDRESS objAddr, struct DacpObjectData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetObjectStringData( + + virtual HRESULT STDMETHODCALLTYPE GetObjectStringData( CLRDATA_ADDRESS obj, unsigned int count, WCHAR *stringData, unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetObjectClassName( + + virtual HRESULT STDMETHODCALLTYPE GetObjectClassName( CLRDATA_ADDRESS obj, unsigned int count, WCHAR *className, unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetMethodTableName( + + virtual HRESULT STDMETHODCALLTYPE GetMethodTableName( CLRDATA_ADDRESS mt, unsigned int count, WCHAR *mtName, unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetMethodTableData( + + virtual HRESULT STDMETHODCALLTYPE GetMethodTableData( CLRDATA_ADDRESS mt, struct DacpMethodTableData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetMethodTableSlot( + + virtual HRESULT STDMETHODCALLTYPE GetMethodTableSlot( CLRDATA_ADDRESS mt, unsigned int slot, CLRDATA_ADDRESS *value) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetMethodTableFieldData( + + virtual HRESULT STDMETHODCALLTYPE GetMethodTableFieldData( CLRDATA_ADDRESS mt, struct DacpMethodTableFieldData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetMethodTableTransparencyData( + + virtual HRESULT STDMETHODCALLTYPE GetMethodTableTransparencyData( CLRDATA_ADDRESS mt, struct DacpMethodTableTransparencyData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetMethodTableForEEClass( + + virtual HRESULT STDMETHODCALLTYPE GetMethodTableForEEClass( CLRDATA_ADDRESS eeClass, CLRDATA_ADDRESS *value) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFieldDescData( + + virtual HRESULT STDMETHODCALLTYPE GetFieldDescData( CLRDATA_ADDRESS fieldDesc, struct DacpFieldDescData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFrameName( + + virtual HRESULT STDMETHODCALLTYPE GetFrameName( CLRDATA_ADDRESS vtable, unsigned int count, WCHAR *frameName, unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetPEFileBase( + + virtual HRESULT STDMETHODCALLTYPE GetPEFileBase( CLRDATA_ADDRESS addr, CLRDATA_ADDRESS *base) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetPEFileName( + + virtual HRESULT STDMETHODCALLTYPE GetPEFileName( CLRDATA_ADDRESS addr, unsigned int count, WCHAR *fileName, unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetGCHeapData( + + virtual HRESULT STDMETHODCALLTYPE GetGCHeapData( struct DacpGcHeapData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetGCHeapList( + + virtual HRESULT STDMETHODCALLTYPE GetGCHeapList( unsigned int count, CLRDATA_ADDRESS heaps[ ], unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetGCHeapDetails( + + virtual HRESULT STDMETHODCALLTYPE GetGCHeapDetails( CLRDATA_ADDRESS heap, struct DacpGcHeapDetails *details) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetGCHeapStaticData( + + virtual HRESULT STDMETHODCALLTYPE GetGCHeapStaticData( struct DacpGcHeapDetails *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetHeapSegmentData( + + virtual HRESULT STDMETHODCALLTYPE GetHeapSegmentData( CLRDATA_ADDRESS seg, struct DacpHeapSegmentData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetOOMData( + + virtual HRESULT STDMETHODCALLTYPE GetOOMData( CLRDATA_ADDRESS oomAddr, struct DacpOomData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetOOMStaticData( + + virtual HRESULT STDMETHODCALLTYPE GetOOMStaticData( struct DacpOomData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetHeapAnalyzeData( + + virtual HRESULT STDMETHODCALLTYPE GetHeapAnalyzeData( CLRDATA_ADDRESS addr, struct DacpGcHeapAnalyzeData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetHeapAnalyzeStaticData( + + virtual HRESULT STDMETHODCALLTYPE GetHeapAnalyzeStaticData( struct DacpGcHeapAnalyzeData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetDomainLocalModuleData( + + virtual HRESULT STDMETHODCALLTYPE GetDomainLocalModuleData( CLRDATA_ADDRESS addr, struct DacpDomainLocalModuleData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetDomainLocalModuleDataFromAppDomain( + + virtual HRESULT STDMETHODCALLTYPE GetDomainLocalModuleDataFromAppDomain( CLRDATA_ADDRESS appDomainAddr, int moduleID, struct DacpDomainLocalModuleData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetDomainLocalModuleDataFromModule( + + virtual HRESULT STDMETHODCALLTYPE GetDomainLocalModuleDataFromModule( CLRDATA_ADDRESS moduleAddr, struct DacpDomainLocalModuleData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetThreadLocalModuleData( + + virtual HRESULT STDMETHODCALLTYPE GetThreadLocalModuleData( CLRDATA_ADDRESS thread, unsigned int index, struct DacpThreadLocalModuleData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetSyncBlockData( + + virtual HRESULT STDMETHODCALLTYPE GetSyncBlockData( unsigned int number, struct DacpSyncBlockData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetSyncBlockCleanupData( + + virtual HRESULT STDMETHODCALLTYPE GetSyncBlockCleanupData( CLRDATA_ADDRESS addr, struct DacpSyncBlockCleanupData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetHandleEnum( + + virtual HRESULT STDMETHODCALLTYPE GetHandleEnum( ISOSHandleEnum **ppHandleEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetHandleEnumForTypes( + + virtual HRESULT STDMETHODCALLTYPE GetHandleEnumForTypes( unsigned int types[ ], unsigned int count, ISOSHandleEnum **ppHandleEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetHandleEnumForGC( + + virtual HRESULT STDMETHODCALLTYPE GetHandleEnumForGC( unsigned int gen, ISOSHandleEnum **ppHandleEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE TraverseEHInfo( + + virtual HRESULT STDMETHODCALLTYPE TraverseEHInfo( CLRDATA_ADDRESS ip, DUMPEHINFO pCallback, LPVOID token) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetNestedExceptionData( + + virtual HRESULT STDMETHODCALLTYPE GetNestedExceptionData( CLRDATA_ADDRESS exception, CLRDATA_ADDRESS *exceptionObject, CLRDATA_ADDRESS *nextNestedException) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetStressLogAddress( + + virtual HRESULT STDMETHODCALLTYPE GetStressLogAddress( CLRDATA_ADDRESS *stressLog) = 0; - - virtual HRESULT STDMETHODCALLTYPE TraverseLoaderHeap( + + virtual HRESULT STDMETHODCALLTYPE TraverseLoaderHeap( CLRDATA_ADDRESS loaderHeapAddr, VISITHEAP pCallback) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCodeHeapList( + + virtual HRESULT STDMETHODCALLTYPE GetCodeHeapList( CLRDATA_ADDRESS jitManager, unsigned int count, struct DacpJitCodeHeapInfo *codeHeaps, unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE TraverseVirtCallStubHeap( + + virtual HRESULT STDMETHODCALLTYPE TraverseVirtCallStubHeap( CLRDATA_ADDRESS pAppDomain, VCSHeapType heaptype, VISITHEAP pCallback) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetUsefulGlobals( + + virtual HRESULT STDMETHODCALLTYPE GetUsefulGlobals( struct DacpUsefulGlobalsData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetClrWatsonBuckets( + + virtual HRESULT STDMETHODCALLTYPE GetClrWatsonBuckets( CLRDATA_ADDRESS thread, void *pGenericModeBlock) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetTLSIndex( + + virtual HRESULT STDMETHODCALLTYPE GetTLSIndex( ULONG *pIndex) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetDacModuleHandle( + + virtual HRESULT STDMETHODCALLTYPE GetDacModuleHandle( HMODULE *phModule) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetRCWData( + + virtual HRESULT STDMETHODCALLTYPE GetRCWData( CLRDATA_ADDRESS addr, struct DacpRCWData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetRCWInterfaces( + + virtual HRESULT STDMETHODCALLTYPE GetRCWInterfaces( CLRDATA_ADDRESS rcw, unsigned int count, struct DacpCOMInterfacePointerData *interfaces, unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCCWData( + + virtual HRESULT STDMETHODCALLTYPE GetCCWData( CLRDATA_ADDRESS ccw, struct DacpCCWData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetCCWInterfaces( + + virtual HRESULT STDMETHODCALLTYPE GetCCWInterfaces( CLRDATA_ADDRESS ccw, unsigned int count, struct DacpCOMInterfacePointerData *interfaces, unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE TraverseRCWCleanupList( + + virtual HRESULT STDMETHODCALLTYPE TraverseRCWCleanupList( CLRDATA_ADDRESS cleanupListPtr, VISITRCWFORCLEANUP pCallback, LPVOID token) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetStackReferences( + + virtual HRESULT STDMETHODCALLTYPE GetStackReferences( /* [in] */ DWORD osThreadID, /* [out] */ ISOSStackRefEnum **ppEnum) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetRegisterName( + + virtual HRESULT STDMETHODCALLTYPE GetRegisterName( /* [in] */ int regName, /* [in] */ unsigned int count, /* [out] */ WCHAR *buffer, /* [out] */ unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetThreadAllocData( + + virtual HRESULT STDMETHODCALLTYPE GetThreadAllocData( CLRDATA_ADDRESS thread, struct DacpAllocData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetHeapAllocData( + + virtual HRESULT STDMETHODCALLTYPE GetHeapAllocData( unsigned int count, struct DacpGenerationAllocData *data, unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFailedAssemblyList( + + virtual HRESULT STDMETHODCALLTYPE GetFailedAssemblyList( CLRDATA_ADDRESS appDomain, int count, CLRDATA_ADDRESS values[ ], unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetPrivateBinPaths( + + virtual HRESULT STDMETHODCALLTYPE GetPrivateBinPaths( CLRDATA_ADDRESS appDomain, int count, WCHAR *paths, unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAssemblyLocation( + + virtual HRESULT STDMETHODCALLTYPE GetAssemblyLocation( CLRDATA_ADDRESS assembly, int count, WCHAR *location, unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAppDomainConfigFile( + + virtual HRESULT STDMETHODCALLTYPE GetAppDomainConfigFile( CLRDATA_ADDRESS appDomain, int count, WCHAR *configFile, unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetApplicationBase( + + virtual HRESULT STDMETHODCALLTYPE GetApplicationBase( CLRDATA_ADDRESS appDomain, int count, WCHAR *base, unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFailedAssemblyData( + + virtual HRESULT STDMETHODCALLTYPE GetFailedAssemblyData( CLRDATA_ADDRESS assembly, unsigned int *pContext, HRESULT *pResult) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFailedAssemblyLocation( + + virtual HRESULT STDMETHODCALLTYPE GetFailedAssemblyLocation( CLRDATA_ADDRESS assesmbly, unsigned int count, WCHAR *location, unsigned int *pNeeded) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetFailedAssemblyDisplayName( + + virtual HRESULT STDMETHODCALLTYPE GetFailedAssemblyDisplayName( CLRDATA_ADDRESS assembly, unsigned int count, WCHAR *name, unsigned int *pNeeded) = 0; - + }; - - + + #else /* C style interface */ typedef struct ISOSDacInterfaceVtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ISOSDacInterface * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ISOSDacInterface * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ISOSDacInterface * This); - - HRESULT ( STDMETHODCALLTYPE *GetThreadStoreData )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadStoreData )( ISOSDacInterface * This, struct DacpThreadStoreData *data); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainStoreData )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainStoreData )( ISOSDacInterface * This, struct DacpAppDomainStoreData *data); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainList )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainList )( ISOSDacInterface * This, unsigned int count, CLRDATA_ADDRESS values[ ], unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainData )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainData )( ISOSDacInterface * This, CLRDATA_ADDRESS addr, struct DacpAppDomainData *data); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainName )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainName )( ISOSDacInterface * This, CLRDATA_ADDRESS addr, unsigned int count, WCHAR *name, unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetDomainFromContext )( + + HRESULT ( STDMETHODCALLTYPE *GetDomainFromContext )( ISOSDacInterface * This, CLRDATA_ADDRESS context, CLRDATA_ADDRESS *domain); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyList )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyList )( ISOSDacInterface * This, CLRDATA_ADDRESS appDomain, int count, CLRDATA_ADDRESS values[ ], int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyData )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyData )( ISOSDacInterface * This, CLRDATA_ADDRESS baseDomainPtr, CLRDATA_ADDRESS assembly, struct DacpAssemblyData *data); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyName )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyName )( ISOSDacInterface * This, CLRDATA_ADDRESS assembly, unsigned int count, WCHAR *name, unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetModule )( + + HRESULT ( STDMETHODCALLTYPE *GetModule )( ISOSDacInterface * This, CLRDATA_ADDRESS addr, IXCLRDataModule **mod); - - HRESULT ( STDMETHODCALLTYPE *GetModuleData )( + + HRESULT ( STDMETHODCALLTYPE *GetModuleData )( ISOSDacInterface * This, CLRDATA_ADDRESS moduleAddr, struct DacpModuleData *data); - - HRESULT ( STDMETHODCALLTYPE *TraverseModuleMap )( + + HRESULT ( STDMETHODCALLTYPE *TraverseModuleMap )( ISOSDacInterface * This, ModuleMapType mmt, CLRDATA_ADDRESS moduleAddr, MODULEMAPTRAVERSE pCallback, LPVOID token); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyModuleList )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyModuleList )( ISOSDacInterface * This, CLRDATA_ADDRESS assembly, unsigned int count, CLRDATA_ADDRESS modules[ ], unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetILForModule )( + + HRESULT ( STDMETHODCALLTYPE *GetILForModule )( ISOSDacInterface * This, CLRDATA_ADDRESS moduleAddr, DWORD rva, CLRDATA_ADDRESS *il); - - HRESULT ( STDMETHODCALLTYPE *GetThreadData )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadData )( ISOSDacInterface * This, CLRDATA_ADDRESS thread, struct DacpThreadData *data); - - HRESULT ( STDMETHODCALLTYPE *GetThreadFromThinlockID )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadFromThinlockID )( ISOSDacInterface * This, UINT thinLockId, CLRDATA_ADDRESS *pThread); - - HRESULT ( STDMETHODCALLTYPE *GetStackLimits )( + + HRESULT ( STDMETHODCALLTYPE *GetStackLimits )( ISOSDacInterface * This, CLRDATA_ADDRESS threadPtr, CLRDATA_ADDRESS *lower, CLRDATA_ADDRESS *upper, CLRDATA_ADDRESS *fp); - - HRESULT ( STDMETHODCALLTYPE *GetMethodDescData )( + + HRESULT ( STDMETHODCALLTYPE *GetMethodDescData )( ISOSDacInterface * This, CLRDATA_ADDRESS methodDesc, CLRDATA_ADDRESS ip, @@ -1238,397 +1245,397 @@ EXTERN_C const IID IID_ISOSDacInterface; ULONG cRevertedRejitVersions, struct DacpReJitData *rgRevertedRejitData, ULONG *pcNeededRevertedRejitData); - - HRESULT ( STDMETHODCALLTYPE *GetMethodDescPtrFromIP )( + + HRESULT ( STDMETHODCALLTYPE *GetMethodDescPtrFromIP )( ISOSDacInterface * This, CLRDATA_ADDRESS ip, CLRDATA_ADDRESS *ppMD); - - HRESULT ( STDMETHODCALLTYPE *GetMethodDescName )( + + HRESULT ( STDMETHODCALLTYPE *GetMethodDescName )( ISOSDacInterface * This, CLRDATA_ADDRESS methodDesc, unsigned int count, WCHAR *name, unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetMethodDescPtrFromFrame )( + + HRESULT ( STDMETHODCALLTYPE *GetMethodDescPtrFromFrame )( ISOSDacInterface * This, CLRDATA_ADDRESS frameAddr, CLRDATA_ADDRESS *ppMD); - - HRESULT ( STDMETHODCALLTYPE *GetMethodDescFromToken )( + + HRESULT ( STDMETHODCALLTYPE *GetMethodDescFromToken )( ISOSDacInterface * This, CLRDATA_ADDRESS moduleAddr, mdToken token, CLRDATA_ADDRESS *methodDesc); - - HRESULT ( STDMETHODCALLTYPE *GetMethodDescTransparencyData )( + + HRESULT ( STDMETHODCALLTYPE *GetMethodDescTransparencyData )( ISOSDacInterface * This, CLRDATA_ADDRESS methodDesc, struct DacpMethodDescTransparencyData *data); - - HRESULT ( STDMETHODCALLTYPE *GetCodeHeaderData )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeHeaderData )( ISOSDacInterface * This, CLRDATA_ADDRESS ip, struct DacpCodeHeaderData *data); - - HRESULT ( STDMETHODCALLTYPE *GetJitManagerList )( + + HRESULT ( STDMETHODCALLTYPE *GetJitManagerList )( ISOSDacInterface * This, unsigned int count, struct DacpJitManagerInfo *managers, unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetJitHelperFunctionName )( + + HRESULT ( STDMETHODCALLTYPE *GetJitHelperFunctionName )( ISOSDacInterface * This, CLRDATA_ADDRESS ip, unsigned int count, char *name, unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetJumpThunkTarget )( + + HRESULT ( STDMETHODCALLTYPE *GetJumpThunkTarget )( ISOSDacInterface * This, T_CONTEXT *ctx, CLRDATA_ADDRESS *targetIP, CLRDATA_ADDRESS *targetMD); - - HRESULT ( STDMETHODCALLTYPE *GetThreadpoolData )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadpoolData )( ISOSDacInterface * This, struct DacpThreadpoolData *data); - - HRESULT ( STDMETHODCALLTYPE *GetWorkRequestData )( + + HRESULT ( STDMETHODCALLTYPE *GetWorkRequestData )( ISOSDacInterface * This, CLRDATA_ADDRESS addrWorkRequest, struct DacpWorkRequestData *data); - - HRESULT ( STDMETHODCALLTYPE *GetHillClimbingLogEntry )( + + HRESULT ( STDMETHODCALLTYPE *GetHillClimbingLogEntry )( ISOSDacInterface * This, CLRDATA_ADDRESS addr, struct DacpHillClimbingLogEntry *data); - - HRESULT ( STDMETHODCALLTYPE *GetObjectData )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectData )( ISOSDacInterface * This, CLRDATA_ADDRESS objAddr, struct DacpObjectData *data); - - HRESULT ( STDMETHODCALLTYPE *GetObjectStringData )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectStringData )( ISOSDacInterface * This, CLRDATA_ADDRESS obj, unsigned int count, WCHAR *stringData, unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetObjectClassName )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectClassName )( ISOSDacInterface * This, CLRDATA_ADDRESS obj, unsigned int count, WCHAR *className, unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetMethodTableName )( + + HRESULT ( STDMETHODCALLTYPE *GetMethodTableName )( ISOSDacInterface * This, CLRDATA_ADDRESS mt, unsigned int count, WCHAR *mtName, unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetMethodTableData )( + + HRESULT ( STDMETHODCALLTYPE *GetMethodTableData )( ISOSDacInterface * This, CLRDATA_ADDRESS mt, struct DacpMethodTableData *data); - - HRESULT ( STDMETHODCALLTYPE *GetMethodTableSlot )( + + HRESULT ( STDMETHODCALLTYPE *GetMethodTableSlot )( ISOSDacInterface * This, CLRDATA_ADDRESS mt, unsigned int slot, CLRDATA_ADDRESS *value); - - HRESULT ( STDMETHODCALLTYPE *GetMethodTableFieldData )( + + HRESULT ( STDMETHODCALLTYPE *GetMethodTableFieldData )( ISOSDacInterface * This, CLRDATA_ADDRESS mt, struct DacpMethodTableFieldData *data); - - HRESULT ( STDMETHODCALLTYPE *GetMethodTableTransparencyData )( + + HRESULT ( STDMETHODCALLTYPE *GetMethodTableTransparencyData )( ISOSDacInterface * This, CLRDATA_ADDRESS mt, struct DacpMethodTableTransparencyData *data); - - HRESULT ( STDMETHODCALLTYPE *GetMethodTableForEEClass )( + + HRESULT ( STDMETHODCALLTYPE *GetMethodTableForEEClass )( ISOSDacInterface * This, CLRDATA_ADDRESS eeClass, CLRDATA_ADDRESS *value); - - HRESULT ( STDMETHODCALLTYPE *GetFieldDescData )( + + HRESULT ( STDMETHODCALLTYPE *GetFieldDescData )( ISOSDacInterface * This, CLRDATA_ADDRESS fieldDesc, struct DacpFieldDescData *data); - - HRESULT ( STDMETHODCALLTYPE *GetFrameName )( + + HRESULT ( STDMETHODCALLTYPE *GetFrameName )( ISOSDacInterface * This, CLRDATA_ADDRESS vtable, unsigned int count, WCHAR *frameName, unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetPEFileBase )( + + HRESULT ( STDMETHODCALLTYPE *GetPEFileBase )( ISOSDacInterface * This, CLRDATA_ADDRESS addr, CLRDATA_ADDRESS *base); - - HRESULT ( STDMETHODCALLTYPE *GetPEFileName )( + + HRESULT ( STDMETHODCALLTYPE *GetPEFileName )( ISOSDacInterface * This, CLRDATA_ADDRESS addr, unsigned int count, WCHAR *fileName, unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetGCHeapData )( + + HRESULT ( STDMETHODCALLTYPE *GetGCHeapData )( ISOSDacInterface * This, struct DacpGcHeapData *data); - - HRESULT ( STDMETHODCALLTYPE *GetGCHeapList )( + + HRESULT ( STDMETHODCALLTYPE *GetGCHeapList )( ISOSDacInterface * This, unsigned int count, CLRDATA_ADDRESS heaps[ ], unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetGCHeapDetails )( + + HRESULT ( STDMETHODCALLTYPE *GetGCHeapDetails )( ISOSDacInterface * This, CLRDATA_ADDRESS heap, struct DacpGcHeapDetails *details); - - HRESULT ( STDMETHODCALLTYPE *GetGCHeapStaticData )( + + HRESULT ( STDMETHODCALLTYPE *GetGCHeapStaticData )( ISOSDacInterface * This, struct DacpGcHeapDetails *data); - - HRESULT ( STDMETHODCALLTYPE *GetHeapSegmentData )( + + HRESULT ( STDMETHODCALLTYPE *GetHeapSegmentData )( ISOSDacInterface * This, CLRDATA_ADDRESS seg, struct DacpHeapSegmentData *data); - - HRESULT ( STDMETHODCALLTYPE *GetOOMData )( + + HRESULT ( STDMETHODCALLTYPE *GetOOMData )( ISOSDacInterface * This, CLRDATA_ADDRESS oomAddr, struct DacpOomData *data); - - HRESULT ( STDMETHODCALLTYPE *GetOOMStaticData )( + + HRESULT ( STDMETHODCALLTYPE *GetOOMStaticData )( ISOSDacInterface * This, struct DacpOomData *data); - - HRESULT ( STDMETHODCALLTYPE *GetHeapAnalyzeData )( + + HRESULT ( STDMETHODCALLTYPE *GetHeapAnalyzeData )( ISOSDacInterface * This, CLRDATA_ADDRESS addr, struct DacpGcHeapAnalyzeData *data); - - HRESULT ( STDMETHODCALLTYPE *GetHeapAnalyzeStaticData )( + + HRESULT ( STDMETHODCALLTYPE *GetHeapAnalyzeStaticData )( ISOSDacInterface * This, struct DacpGcHeapAnalyzeData *data); - - HRESULT ( STDMETHODCALLTYPE *GetDomainLocalModuleData )( + + HRESULT ( STDMETHODCALLTYPE *GetDomainLocalModuleData )( ISOSDacInterface * This, CLRDATA_ADDRESS addr, struct DacpDomainLocalModuleData *data); - - HRESULT ( STDMETHODCALLTYPE *GetDomainLocalModuleDataFromAppDomain )( + + HRESULT ( STDMETHODCALLTYPE *GetDomainLocalModuleDataFromAppDomain )( ISOSDacInterface * This, CLRDATA_ADDRESS appDomainAddr, int moduleID, struct DacpDomainLocalModuleData *data); - - HRESULT ( STDMETHODCALLTYPE *GetDomainLocalModuleDataFromModule )( + + HRESULT ( STDMETHODCALLTYPE *GetDomainLocalModuleDataFromModule )( ISOSDacInterface * This, CLRDATA_ADDRESS moduleAddr, struct DacpDomainLocalModuleData *data); - - HRESULT ( STDMETHODCALLTYPE *GetThreadLocalModuleData )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadLocalModuleData )( ISOSDacInterface * This, CLRDATA_ADDRESS thread, unsigned int index, struct DacpThreadLocalModuleData *data); - - HRESULT ( STDMETHODCALLTYPE *GetSyncBlockData )( + + HRESULT ( STDMETHODCALLTYPE *GetSyncBlockData )( ISOSDacInterface * This, unsigned int number, struct DacpSyncBlockData *data); - - HRESULT ( STDMETHODCALLTYPE *GetSyncBlockCleanupData )( + + HRESULT ( STDMETHODCALLTYPE *GetSyncBlockCleanupData )( ISOSDacInterface * This, CLRDATA_ADDRESS addr, struct DacpSyncBlockCleanupData *data); - - HRESULT ( STDMETHODCALLTYPE *GetHandleEnum )( + + HRESULT ( STDMETHODCALLTYPE *GetHandleEnum )( ISOSDacInterface * This, ISOSHandleEnum **ppHandleEnum); - - HRESULT ( STDMETHODCALLTYPE *GetHandleEnumForTypes )( + + HRESULT ( STDMETHODCALLTYPE *GetHandleEnumForTypes )( ISOSDacInterface * This, unsigned int types[ ], unsigned int count, ISOSHandleEnum **ppHandleEnum); - - HRESULT ( STDMETHODCALLTYPE *GetHandleEnumForGC )( + + HRESULT ( STDMETHODCALLTYPE *GetHandleEnumForGC )( ISOSDacInterface * This, unsigned int gen, ISOSHandleEnum **ppHandleEnum); - - HRESULT ( STDMETHODCALLTYPE *TraverseEHInfo )( + + HRESULT ( STDMETHODCALLTYPE *TraverseEHInfo )( ISOSDacInterface * This, CLRDATA_ADDRESS ip, DUMPEHINFO pCallback, LPVOID token); - - HRESULT ( STDMETHODCALLTYPE *GetNestedExceptionData )( + + HRESULT ( STDMETHODCALLTYPE *GetNestedExceptionData )( ISOSDacInterface * This, CLRDATA_ADDRESS exception, CLRDATA_ADDRESS *exceptionObject, CLRDATA_ADDRESS *nextNestedException); - - HRESULT ( STDMETHODCALLTYPE *GetStressLogAddress )( + + HRESULT ( STDMETHODCALLTYPE *GetStressLogAddress )( ISOSDacInterface * This, CLRDATA_ADDRESS *stressLog); - - HRESULT ( STDMETHODCALLTYPE *TraverseLoaderHeap )( + + HRESULT ( STDMETHODCALLTYPE *TraverseLoaderHeap )( ISOSDacInterface * This, CLRDATA_ADDRESS loaderHeapAddr, VISITHEAP pCallback); - - HRESULT ( STDMETHODCALLTYPE *GetCodeHeapList )( + + HRESULT ( STDMETHODCALLTYPE *GetCodeHeapList )( ISOSDacInterface * This, CLRDATA_ADDRESS jitManager, unsigned int count, struct DacpJitCodeHeapInfo *codeHeaps, unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *TraverseVirtCallStubHeap )( + + HRESULT ( STDMETHODCALLTYPE *TraverseVirtCallStubHeap )( ISOSDacInterface * This, CLRDATA_ADDRESS pAppDomain, VCSHeapType heaptype, VISITHEAP pCallback); - - HRESULT ( STDMETHODCALLTYPE *GetUsefulGlobals )( + + HRESULT ( STDMETHODCALLTYPE *GetUsefulGlobals )( ISOSDacInterface * This, struct DacpUsefulGlobalsData *data); - - HRESULT ( STDMETHODCALLTYPE *GetClrWatsonBuckets )( + + HRESULT ( STDMETHODCALLTYPE *GetClrWatsonBuckets )( ISOSDacInterface * This, CLRDATA_ADDRESS thread, void *pGenericModeBlock); - - HRESULT ( STDMETHODCALLTYPE *GetTLSIndex )( + + HRESULT ( STDMETHODCALLTYPE *GetTLSIndex )( ISOSDacInterface * This, ULONG *pIndex); - - HRESULT ( STDMETHODCALLTYPE *GetDacModuleHandle )( + + HRESULT ( STDMETHODCALLTYPE *GetDacModuleHandle )( ISOSDacInterface * This, HMODULE *phModule); - - HRESULT ( STDMETHODCALLTYPE *GetRCWData )( + + HRESULT ( STDMETHODCALLTYPE *GetRCWData )( ISOSDacInterface * This, CLRDATA_ADDRESS addr, struct DacpRCWData *data); - - HRESULT ( STDMETHODCALLTYPE *GetRCWInterfaces )( + + HRESULT ( STDMETHODCALLTYPE *GetRCWInterfaces )( ISOSDacInterface * This, CLRDATA_ADDRESS rcw, unsigned int count, struct DacpCOMInterfacePointerData *interfaces, unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetCCWData )( + + HRESULT ( STDMETHODCALLTYPE *GetCCWData )( ISOSDacInterface * This, CLRDATA_ADDRESS ccw, struct DacpCCWData *data); - - HRESULT ( STDMETHODCALLTYPE *GetCCWInterfaces )( + + HRESULT ( STDMETHODCALLTYPE *GetCCWInterfaces )( ISOSDacInterface * This, CLRDATA_ADDRESS ccw, unsigned int count, struct DacpCOMInterfacePointerData *interfaces, unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *TraverseRCWCleanupList )( + + HRESULT ( STDMETHODCALLTYPE *TraverseRCWCleanupList )( ISOSDacInterface * This, CLRDATA_ADDRESS cleanupListPtr, VISITRCWFORCLEANUP pCallback, LPVOID token); - - HRESULT ( STDMETHODCALLTYPE *GetStackReferences )( + + HRESULT ( STDMETHODCALLTYPE *GetStackReferences )( ISOSDacInterface * This, /* [in] */ DWORD osThreadID, /* [out] */ ISOSStackRefEnum **ppEnum); - - HRESULT ( STDMETHODCALLTYPE *GetRegisterName )( + + HRESULT ( STDMETHODCALLTYPE *GetRegisterName )( ISOSDacInterface * This, /* [in] */ int regName, /* [in] */ unsigned int count, /* [out] */ WCHAR *buffer, /* [out] */ unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetThreadAllocData )( + + HRESULT ( STDMETHODCALLTYPE *GetThreadAllocData )( ISOSDacInterface * This, CLRDATA_ADDRESS thread, struct DacpAllocData *data); - - HRESULT ( STDMETHODCALLTYPE *GetHeapAllocData )( + + HRESULT ( STDMETHODCALLTYPE *GetHeapAllocData )( ISOSDacInterface * This, unsigned int count, struct DacpGenerationAllocData *data, unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetFailedAssemblyList )( + + HRESULT ( STDMETHODCALLTYPE *GetFailedAssemblyList )( ISOSDacInterface * This, CLRDATA_ADDRESS appDomain, int count, CLRDATA_ADDRESS values[ ], unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetPrivateBinPaths )( + + HRESULT ( STDMETHODCALLTYPE *GetPrivateBinPaths )( ISOSDacInterface * This, CLRDATA_ADDRESS appDomain, int count, WCHAR *paths, unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetAssemblyLocation )( + + HRESULT ( STDMETHODCALLTYPE *GetAssemblyLocation )( ISOSDacInterface * This, CLRDATA_ADDRESS assembly, int count, WCHAR *location, unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetAppDomainConfigFile )( + + HRESULT ( STDMETHODCALLTYPE *GetAppDomainConfigFile )( ISOSDacInterface * This, CLRDATA_ADDRESS appDomain, int count, WCHAR *configFile, unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetApplicationBase )( + + HRESULT ( STDMETHODCALLTYPE *GetApplicationBase )( ISOSDacInterface * This, CLRDATA_ADDRESS appDomain, int count, WCHAR *base, unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetFailedAssemblyData )( + + HRESULT ( STDMETHODCALLTYPE *GetFailedAssemblyData )( ISOSDacInterface * This, CLRDATA_ADDRESS assembly, unsigned int *pContext, HRESULT *pResult); - - HRESULT ( STDMETHODCALLTYPE *GetFailedAssemblyLocation )( + + HRESULT ( STDMETHODCALLTYPE *GetFailedAssemblyLocation )( ISOSDacInterface * This, CLRDATA_ADDRESS assesmbly, unsigned int count, WCHAR *location, unsigned int *pNeeded); - - HRESULT ( STDMETHODCALLTYPE *GetFailedAssemblyDisplayName )( + + HRESULT ( STDMETHODCALLTYPE *GetFailedAssemblyDisplayName )( ISOSDacInterface * This, CLRDATA_ADDRESS assembly, unsigned int count, WCHAR *name, unsigned int *pNeeded); - + END_INTERFACE } ISOSDacInterfaceVtbl; @@ -1637,284 +1644,284 @@ EXTERN_C const IID IID_ISOSDacInterface; CONST_VTBL struct ISOSDacInterfaceVtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ISOSDacInterface_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ISOSDacInterface_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ISOSDacInterface_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ISOSDacInterface_GetThreadStoreData(This,data) \ - ( (This)->lpVtbl -> GetThreadStoreData(This,data) ) + ( (This)->lpVtbl -> GetThreadStoreData(This,data) ) #define ISOSDacInterface_GetAppDomainStoreData(This,data) \ - ( (This)->lpVtbl -> GetAppDomainStoreData(This,data) ) + ( (This)->lpVtbl -> GetAppDomainStoreData(This,data) ) #define ISOSDacInterface_GetAppDomainList(This,count,values,pNeeded) \ - ( (This)->lpVtbl -> GetAppDomainList(This,count,values,pNeeded) ) + ( (This)->lpVtbl -> GetAppDomainList(This,count,values,pNeeded) ) #define ISOSDacInterface_GetAppDomainData(This,addr,data) \ - ( (This)->lpVtbl -> GetAppDomainData(This,addr,data) ) + ( (This)->lpVtbl -> GetAppDomainData(This,addr,data) ) #define ISOSDacInterface_GetAppDomainName(This,addr,count,name,pNeeded) \ - ( (This)->lpVtbl -> GetAppDomainName(This,addr,count,name,pNeeded) ) + ( (This)->lpVtbl -> GetAppDomainName(This,addr,count,name,pNeeded) ) #define ISOSDacInterface_GetDomainFromContext(This,context,domain) \ - ( (This)->lpVtbl -> GetDomainFromContext(This,context,domain) ) + ( (This)->lpVtbl -> GetDomainFromContext(This,context,domain) ) #define ISOSDacInterface_GetAssemblyList(This,appDomain,count,values,pNeeded) \ - ( (This)->lpVtbl -> GetAssemblyList(This,appDomain,count,values,pNeeded) ) + ( (This)->lpVtbl -> GetAssemblyList(This,appDomain,count,values,pNeeded) ) #define ISOSDacInterface_GetAssemblyData(This,baseDomainPtr,assembly,data) \ - ( (This)->lpVtbl -> GetAssemblyData(This,baseDomainPtr,assembly,data) ) + ( (This)->lpVtbl -> GetAssemblyData(This,baseDomainPtr,assembly,data) ) #define ISOSDacInterface_GetAssemblyName(This,assembly,count,name,pNeeded) \ - ( (This)->lpVtbl -> GetAssemblyName(This,assembly,count,name,pNeeded) ) + ( (This)->lpVtbl -> GetAssemblyName(This,assembly,count,name,pNeeded) ) #define ISOSDacInterface_GetModule(This,addr,mod) \ - ( (This)->lpVtbl -> GetModule(This,addr,mod) ) + ( (This)->lpVtbl -> GetModule(This,addr,mod) ) #define ISOSDacInterface_GetModuleData(This,moduleAddr,data) \ - ( (This)->lpVtbl -> GetModuleData(This,moduleAddr,data) ) + ( (This)->lpVtbl -> GetModuleData(This,moduleAddr,data) ) #define ISOSDacInterface_TraverseModuleMap(This,mmt,moduleAddr,pCallback,token) \ - ( (This)->lpVtbl -> TraverseModuleMap(This,mmt,moduleAddr,pCallback,token) ) + ( (This)->lpVtbl -> TraverseModuleMap(This,mmt,moduleAddr,pCallback,token) ) #define ISOSDacInterface_GetAssemblyModuleList(This,assembly,count,modules,pNeeded) \ - ( (This)->lpVtbl -> GetAssemblyModuleList(This,assembly,count,modules,pNeeded) ) + ( (This)->lpVtbl -> GetAssemblyModuleList(This,assembly,count,modules,pNeeded) ) #define ISOSDacInterface_GetILForModule(This,moduleAddr,rva,il) \ - ( (This)->lpVtbl -> GetILForModule(This,moduleAddr,rva,il) ) + ( (This)->lpVtbl -> GetILForModule(This,moduleAddr,rva,il) ) #define ISOSDacInterface_GetThreadData(This,thread,data) \ - ( (This)->lpVtbl -> GetThreadData(This,thread,data) ) + ( (This)->lpVtbl -> GetThreadData(This,thread,data) ) #define ISOSDacInterface_GetThreadFromThinlockID(This,thinLockId,pThread) \ - ( (This)->lpVtbl -> GetThreadFromThinlockID(This,thinLockId,pThread) ) + ( (This)->lpVtbl -> GetThreadFromThinlockID(This,thinLockId,pThread) ) #define ISOSDacInterface_GetStackLimits(This,threadPtr,lower,upper,fp) \ - ( (This)->lpVtbl -> GetStackLimits(This,threadPtr,lower,upper,fp) ) + ( (This)->lpVtbl -> GetStackLimits(This,threadPtr,lower,upper,fp) ) #define ISOSDacInterface_GetMethodDescData(This,methodDesc,ip,data,cRevertedRejitVersions,rgRevertedRejitData,pcNeededRevertedRejitData) \ - ( (This)->lpVtbl -> GetMethodDescData(This,methodDesc,ip,data,cRevertedRejitVersions,rgRevertedRejitData,pcNeededRevertedRejitData) ) + ( (This)->lpVtbl -> GetMethodDescData(This,methodDesc,ip,data,cRevertedRejitVersions,rgRevertedRejitData,pcNeededRevertedRejitData) ) #define ISOSDacInterface_GetMethodDescPtrFromIP(This,ip,ppMD) \ - ( (This)->lpVtbl -> GetMethodDescPtrFromIP(This,ip,ppMD) ) + ( (This)->lpVtbl -> GetMethodDescPtrFromIP(This,ip,ppMD) ) #define ISOSDacInterface_GetMethodDescName(This,methodDesc,count,name,pNeeded) \ - ( (This)->lpVtbl -> GetMethodDescName(This,methodDesc,count,name,pNeeded) ) + ( (This)->lpVtbl -> GetMethodDescName(This,methodDesc,count,name,pNeeded) ) #define ISOSDacInterface_GetMethodDescPtrFromFrame(This,frameAddr,ppMD) \ - ( (This)->lpVtbl -> GetMethodDescPtrFromFrame(This,frameAddr,ppMD) ) + ( (This)->lpVtbl -> GetMethodDescPtrFromFrame(This,frameAddr,ppMD) ) #define ISOSDacInterface_GetMethodDescFromToken(This,moduleAddr,token,methodDesc) \ - ( (This)->lpVtbl -> GetMethodDescFromToken(This,moduleAddr,token,methodDesc) ) + ( (This)->lpVtbl -> GetMethodDescFromToken(This,moduleAddr,token,methodDesc) ) #define ISOSDacInterface_GetMethodDescTransparencyData(This,methodDesc,data) \ - ( (This)->lpVtbl -> GetMethodDescTransparencyData(This,methodDesc,data) ) + ( (This)->lpVtbl -> GetMethodDescTransparencyData(This,methodDesc,data) ) #define ISOSDacInterface_GetCodeHeaderData(This,ip,data) \ - ( (This)->lpVtbl -> GetCodeHeaderData(This,ip,data) ) + ( (This)->lpVtbl -> GetCodeHeaderData(This,ip,data) ) #define ISOSDacInterface_GetJitManagerList(This,count,managers,pNeeded) \ - ( (This)->lpVtbl -> GetJitManagerList(This,count,managers,pNeeded) ) + ( (This)->lpVtbl -> GetJitManagerList(This,count,managers,pNeeded) ) #define ISOSDacInterface_GetJitHelperFunctionName(This,ip,count,name,pNeeded) \ - ( (This)->lpVtbl -> GetJitHelperFunctionName(This,ip,count,name,pNeeded) ) + ( (This)->lpVtbl -> GetJitHelperFunctionName(This,ip,count,name,pNeeded) ) #define ISOSDacInterface_GetJumpThunkTarget(This,ctx,targetIP,targetMD) \ - ( (This)->lpVtbl -> GetJumpThunkTarget(This,ctx,targetIP,targetMD) ) + ( (This)->lpVtbl -> GetJumpThunkTarget(This,ctx,targetIP,targetMD) ) #define ISOSDacInterface_GetThreadpoolData(This,data) \ - ( (This)->lpVtbl -> GetThreadpoolData(This,data) ) + ( (This)->lpVtbl -> GetThreadpoolData(This,data) ) #define ISOSDacInterface_GetWorkRequestData(This,addrWorkRequest,data) \ - ( (This)->lpVtbl -> GetWorkRequestData(This,addrWorkRequest,data) ) + ( (This)->lpVtbl -> GetWorkRequestData(This,addrWorkRequest,data) ) #define ISOSDacInterface_GetHillClimbingLogEntry(This,addr,data) \ - ( (This)->lpVtbl -> GetHillClimbingLogEntry(This,addr,data) ) + ( (This)->lpVtbl -> GetHillClimbingLogEntry(This,addr,data) ) #define ISOSDacInterface_GetObjectData(This,objAddr,data) \ - ( (This)->lpVtbl -> GetObjectData(This,objAddr,data) ) + ( (This)->lpVtbl -> GetObjectData(This,objAddr,data) ) #define ISOSDacInterface_GetObjectStringData(This,obj,count,stringData,pNeeded) \ - ( (This)->lpVtbl -> GetObjectStringData(This,obj,count,stringData,pNeeded) ) + ( (This)->lpVtbl -> GetObjectStringData(This,obj,count,stringData,pNeeded) ) #define ISOSDacInterface_GetObjectClassName(This,obj,count,className,pNeeded) \ - ( (This)->lpVtbl -> GetObjectClassName(This,obj,count,className,pNeeded) ) + ( (This)->lpVtbl -> GetObjectClassName(This,obj,count,className,pNeeded) ) #define ISOSDacInterface_GetMethodTableName(This,mt,count,mtName,pNeeded) \ - ( (This)->lpVtbl -> GetMethodTableName(This,mt,count,mtName,pNeeded) ) + ( (This)->lpVtbl -> GetMethodTableName(This,mt,count,mtName,pNeeded) ) #define ISOSDacInterface_GetMethodTableData(This,mt,data) \ - ( (This)->lpVtbl -> GetMethodTableData(This,mt,data) ) + ( (This)->lpVtbl -> GetMethodTableData(This,mt,data) ) #define ISOSDacInterface_GetMethodTableSlot(This,mt,slot,value) \ - ( (This)->lpVtbl -> GetMethodTableSlot(This,mt,slot,value) ) + ( (This)->lpVtbl -> GetMethodTableSlot(This,mt,slot,value) ) #define ISOSDacInterface_GetMethodTableFieldData(This,mt,data) \ - ( (This)->lpVtbl -> GetMethodTableFieldData(This,mt,data) ) + ( (This)->lpVtbl -> GetMethodTableFieldData(This,mt,data) ) #define ISOSDacInterface_GetMethodTableTransparencyData(This,mt,data) \ - ( (This)->lpVtbl -> GetMethodTableTransparencyData(This,mt,data) ) + ( (This)->lpVtbl -> GetMethodTableTransparencyData(This,mt,data) ) #define ISOSDacInterface_GetMethodTableForEEClass(This,eeClass,value) \ - ( (This)->lpVtbl -> GetMethodTableForEEClass(This,eeClass,value) ) + ( (This)->lpVtbl -> GetMethodTableForEEClass(This,eeClass,value) ) #define ISOSDacInterface_GetFieldDescData(This,fieldDesc,data) \ - ( (This)->lpVtbl -> GetFieldDescData(This,fieldDesc,data) ) + ( (This)->lpVtbl -> GetFieldDescData(This,fieldDesc,data) ) #define ISOSDacInterface_GetFrameName(This,vtable,count,frameName,pNeeded) \ - ( (This)->lpVtbl -> GetFrameName(This,vtable,count,frameName,pNeeded) ) + ( (This)->lpVtbl -> GetFrameName(This,vtable,count,frameName,pNeeded) ) #define ISOSDacInterface_GetPEFileBase(This,addr,base) \ - ( (This)->lpVtbl -> GetPEFileBase(This,addr,base) ) + ( (This)->lpVtbl -> GetPEFileBase(This,addr,base) ) #define ISOSDacInterface_GetPEFileName(This,addr,count,fileName,pNeeded) \ - ( (This)->lpVtbl -> GetPEFileName(This,addr,count,fileName,pNeeded) ) + ( (This)->lpVtbl -> GetPEFileName(This,addr,count,fileName,pNeeded) ) #define ISOSDacInterface_GetGCHeapData(This,data) \ - ( (This)->lpVtbl -> GetGCHeapData(This,data) ) + ( (This)->lpVtbl -> GetGCHeapData(This,data) ) #define ISOSDacInterface_GetGCHeapList(This,count,heaps,pNeeded) \ - ( (This)->lpVtbl -> GetGCHeapList(This,count,heaps,pNeeded) ) + ( (This)->lpVtbl -> GetGCHeapList(This,count,heaps,pNeeded) ) #define ISOSDacInterface_GetGCHeapDetails(This,heap,details) \ - ( (This)->lpVtbl -> GetGCHeapDetails(This,heap,details) ) + ( (This)->lpVtbl -> GetGCHeapDetails(This,heap,details) ) #define ISOSDacInterface_GetGCHeapStaticData(This,data) \ - ( (This)->lpVtbl -> GetGCHeapStaticData(This,data) ) + ( (This)->lpVtbl -> GetGCHeapStaticData(This,data) ) #define ISOSDacInterface_GetHeapSegmentData(This,seg,data) \ - ( (This)->lpVtbl -> GetHeapSegmentData(This,seg,data) ) + ( (This)->lpVtbl -> GetHeapSegmentData(This,seg,data) ) #define ISOSDacInterface_GetOOMData(This,oomAddr,data) \ - ( (This)->lpVtbl -> GetOOMData(This,oomAddr,data) ) + ( (This)->lpVtbl -> GetOOMData(This,oomAddr,data) ) #define ISOSDacInterface_GetOOMStaticData(This,data) \ - ( (This)->lpVtbl -> GetOOMStaticData(This,data) ) + ( (This)->lpVtbl -> GetOOMStaticData(This,data) ) #define ISOSDacInterface_GetHeapAnalyzeData(This,addr,data) \ - ( (This)->lpVtbl -> GetHeapAnalyzeData(This,addr,data) ) + ( (This)->lpVtbl -> GetHeapAnalyzeData(This,addr,data) ) #define ISOSDacInterface_GetHeapAnalyzeStaticData(This,data) \ - ( (This)->lpVtbl -> GetHeapAnalyzeStaticData(This,data) ) + ( (This)->lpVtbl -> GetHeapAnalyzeStaticData(This,data) ) #define ISOSDacInterface_GetDomainLocalModuleData(This,addr,data) \ - ( (This)->lpVtbl -> GetDomainLocalModuleData(This,addr,data) ) + ( (This)->lpVtbl -> GetDomainLocalModuleData(This,addr,data) ) #define ISOSDacInterface_GetDomainLocalModuleDataFromAppDomain(This,appDomainAddr,moduleID,data) \ - ( (This)->lpVtbl -> GetDomainLocalModuleDataFromAppDomain(This,appDomainAddr,moduleID,data) ) + ( (This)->lpVtbl -> GetDomainLocalModuleDataFromAppDomain(This,appDomainAddr,moduleID,data) ) #define ISOSDacInterface_GetDomainLocalModuleDataFromModule(This,moduleAddr,data) \ - ( (This)->lpVtbl -> GetDomainLocalModuleDataFromModule(This,moduleAddr,data) ) + ( (This)->lpVtbl -> GetDomainLocalModuleDataFromModule(This,moduleAddr,data) ) #define ISOSDacInterface_GetThreadLocalModuleData(This,thread,index,data) \ - ( (This)->lpVtbl -> GetThreadLocalModuleData(This,thread,index,data) ) + ( (This)->lpVtbl -> GetThreadLocalModuleData(This,thread,index,data) ) #define ISOSDacInterface_GetSyncBlockData(This,number,data) \ - ( (This)->lpVtbl -> GetSyncBlockData(This,number,data) ) + ( (This)->lpVtbl -> GetSyncBlockData(This,number,data) ) #define ISOSDacInterface_GetSyncBlockCleanupData(This,addr,data) \ - ( (This)->lpVtbl -> GetSyncBlockCleanupData(This,addr,data) ) + ( (This)->lpVtbl -> GetSyncBlockCleanupData(This,addr,data) ) #define ISOSDacInterface_GetHandleEnum(This,ppHandleEnum) \ - ( (This)->lpVtbl -> GetHandleEnum(This,ppHandleEnum) ) + ( (This)->lpVtbl -> GetHandleEnum(This,ppHandleEnum) ) #define ISOSDacInterface_GetHandleEnumForTypes(This,types,count,ppHandleEnum) \ - ( (This)->lpVtbl -> GetHandleEnumForTypes(This,types,count,ppHandleEnum) ) + ( (This)->lpVtbl -> GetHandleEnumForTypes(This,types,count,ppHandleEnum) ) #define ISOSDacInterface_GetHandleEnumForGC(This,gen,ppHandleEnum) \ - ( (This)->lpVtbl -> GetHandleEnumForGC(This,gen,ppHandleEnum) ) + ( (This)->lpVtbl -> GetHandleEnumForGC(This,gen,ppHandleEnum) ) #define ISOSDacInterface_TraverseEHInfo(This,ip,pCallback,token) \ - ( (This)->lpVtbl -> TraverseEHInfo(This,ip,pCallback,token) ) + ( (This)->lpVtbl -> TraverseEHInfo(This,ip,pCallback,token) ) #define ISOSDacInterface_GetNestedExceptionData(This,exception,exceptionObject,nextNestedException) \ - ( (This)->lpVtbl -> GetNestedExceptionData(This,exception,exceptionObject,nextNestedException) ) + ( (This)->lpVtbl -> GetNestedExceptionData(This,exception,exceptionObject,nextNestedException) ) #define ISOSDacInterface_GetStressLogAddress(This,stressLog) \ - ( (This)->lpVtbl -> GetStressLogAddress(This,stressLog) ) + ( (This)->lpVtbl -> GetStressLogAddress(This,stressLog) ) #define ISOSDacInterface_TraverseLoaderHeap(This,loaderHeapAddr,pCallback) \ - ( (This)->lpVtbl -> TraverseLoaderHeap(This,loaderHeapAddr,pCallback) ) + ( (This)->lpVtbl -> TraverseLoaderHeap(This,loaderHeapAddr,pCallback) ) #define ISOSDacInterface_GetCodeHeapList(This,jitManager,count,codeHeaps,pNeeded) \ - ( (This)->lpVtbl -> GetCodeHeapList(This,jitManager,count,codeHeaps,pNeeded) ) + ( (This)->lpVtbl -> GetCodeHeapList(This,jitManager,count,codeHeaps,pNeeded) ) #define ISOSDacInterface_TraverseVirtCallStubHeap(This,pAppDomain,heaptype,pCallback) \ - ( (This)->lpVtbl -> TraverseVirtCallStubHeap(This,pAppDomain,heaptype,pCallback) ) + ( (This)->lpVtbl -> TraverseVirtCallStubHeap(This,pAppDomain,heaptype,pCallback) ) #define ISOSDacInterface_GetUsefulGlobals(This,data) \ - ( (This)->lpVtbl -> GetUsefulGlobals(This,data) ) + ( (This)->lpVtbl -> GetUsefulGlobals(This,data) ) #define ISOSDacInterface_GetClrWatsonBuckets(This,thread,pGenericModeBlock) \ - ( (This)->lpVtbl -> GetClrWatsonBuckets(This,thread,pGenericModeBlock) ) + ( (This)->lpVtbl -> GetClrWatsonBuckets(This,thread,pGenericModeBlock) ) #define ISOSDacInterface_GetTLSIndex(This,pIndex) \ - ( (This)->lpVtbl -> GetTLSIndex(This,pIndex) ) + ( (This)->lpVtbl -> GetTLSIndex(This,pIndex) ) #define ISOSDacInterface_GetDacModuleHandle(This,phModule) \ - ( (This)->lpVtbl -> GetDacModuleHandle(This,phModule) ) + ( (This)->lpVtbl -> GetDacModuleHandle(This,phModule) ) #define ISOSDacInterface_GetRCWData(This,addr,data) \ - ( (This)->lpVtbl -> GetRCWData(This,addr,data) ) + ( (This)->lpVtbl -> GetRCWData(This,addr,data) ) #define ISOSDacInterface_GetRCWInterfaces(This,rcw,count,interfaces,pNeeded) \ - ( (This)->lpVtbl -> GetRCWInterfaces(This,rcw,count,interfaces,pNeeded) ) + ( (This)->lpVtbl -> GetRCWInterfaces(This,rcw,count,interfaces,pNeeded) ) #define ISOSDacInterface_GetCCWData(This,ccw,data) \ - ( (This)->lpVtbl -> GetCCWData(This,ccw,data) ) + ( (This)->lpVtbl -> GetCCWData(This,ccw,data) ) #define ISOSDacInterface_GetCCWInterfaces(This,ccw,count,interfaces,pNeeded) \ - ( (This)->lpVtbl -> GetCCWInterfaces(This,ccw,count,interfaces,pNeeded) ) + ( (This)->lpVtbl -> GetCCWInterfaces(This,ccw,count,interfaces,pNeeded) ) #define ISOSDacInterface_TraverseRCWCleanupList(This,cleanupListPtr,pCallback,token) \ - ( (This)->lpVtbl -> TraverseRCWCleanupList(This,cleanupListPtr,pCallback,token) ) + ( (This)->lpVtbl -> TraverseRCWCleanupList(This,cleanupListPtr,pCallback,token) ) #define ISOSDacInterface_GetStackReferences(This,osThreadID,ppEnum) \ - ( (This)->lpVtbl -> GetStackReferences(This,osThreadID,ppEnum) ) + ( (This)->lpVtbl -> GetStackReferences(This,osThreadID,ppEnum) ) #define ISOSDacInterface_GetRegisterName(This,regName,count,buffer,pNeeded) \ - ( (This)->lpVtbl -> GetRegisterName(This,regName,count,buffer,pNeeded) ) + ( (This)->lpVtbl -> GetRegisterName(This,regName,count,buffer,pNeeded) ) #define ISOSDacInterface_GetThreadAllocData(This,thread,data) \ - ( (This)->lpVtbl -> GetThreadAllocData(This,thread,data) ) + ( (This)->lpVtbl -> GetThreadAllocData(This,thread,data) ) #define ISOSDacInterface_GetHeapAllocData(This,count,data,pNeeded) \ - ( (This)->lpVtbl -> GetHeapAllocData(This,count,data,pNeeded) ) + ( (This)->lpVtbl -> GetHeapAllocData(This,count,data,pNeeded) ) #define ISOSDacInterface_GetFailedAssemblyList(This,appDomain,count,values,pNeeded) \ - ( (This)->lpVtbl -> GetFailedAssemblyList(This,appDomain,count,values,pNeeded) ) + ( (This)->lpVtbl -> GetFailedAssemblyList(This,appDomain,count,values,pNeeded) ) #define ISOSDacInterface_GetPrivateBinPaths(This,appDomain,count,paths,pNeeded) \ - ( (This)->lpVtbl -> GetPrivateBinPaths(This,appDomain,count,paths,pNeeded) ) + ( (This)->lpVtbl -> GetPrivateBinPaths(This,appDomain,count,paths,pNeeded) ) #define ISOSDacInterface_GetAssemblyLocation(This,assembly,count,location,pNeeded) \ - ( (This)->lpVtbl -> GetAssemblyLocation(This,assembly,count,location,pNeeded) ) + ( (This)->lpVtbl -> GetAssemblyLocation(This,assembly,count,location,pNeeded) ) #define ISOSDacInterface_GetAppDomainConfigFile(This,appDomain,count,configFile,pNeeded) \ - ( (This)->lpVtbl -> GetAppDomainConfigFile(This,appDomain,count,configFile,pNeeded) ) + ( (This)->lpVtbl -> GetAppDomainConfigFile(This,appDomain,count,configFile,pNeeded) ) #define ISOSDacInterface_GetApplicationBase(This,appDomain,count,base,pNeeded) \ - ( (This)->lpVtbl -> GetApplicationBase(This,appDomain,count,base,pNeeded) ) + ( (This)->lpVtbl -> GetApplicationBase(This,appDomain,count,base,pNeeded) ) #define ISOSDacInterface_GetFailedAssemblyData(This,assembly,pContext,pResult) \ - ( (This)->lpVtbl -> GetFailedAssemblyData(This,assembly,pContext,pResult) ) + ( (This)->lpVtbl -> GetFailedAssemblyData(This,assembly,pContext,pResult) ) #define ISOSDacInterface_GetFailedAssemblyLocation(This,assesmbly,count,location,pNeeded) \ - ( (This)->lpVtbl -> GetFailedAssemblyLocation(This,assesmbly,count,location,pNeeded) ) + ( (This)->lpVtbl -> GetFailedAssemblyLocation(This,assesmbly,count,location,pNeeded) ) #define ISOSDacInterface_GetFailedAssemblyDisplayName(This,assembly,count,name,pNeeded) \ - ( (This)->lpVtbl -> GetFailedAssemblyDisplayName(This,assembly,count,name,pNeeded) ) + ( (This)->lpVtbl -> GetFailedAssemblyDisplayName(This,assembly,count,name,pNeeded) ) #endif /* COBJMACROS */ @@ -1931,56 +1938,56 @@ EXTERN_C const IID IID_ISOSDacInterface; #define __ISOSDacInterface2_INTERFACE_DEFINED__ /* interface ISOSDacInterface2 */ -/* [uuid][local][object] */ +/* [uuid][local][object] */ EXTERN_C const IID IID_ISOSDacInterface2; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("A16026EC-96F4-40BA-87FB-5575986FB7AF") ISOSDacInterface2 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetObjectExceptionData( + virtual HRESULT STDMETHODCALLTYPE GetObjectExceptionData( CLRDATA_ADDRESS objAddr, struct DacpExceptionObjectData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE IsRCWDCOMProxy( + + virtual HRESULT STDMETHODCALLTYPE IsRCWDCOMProxy( CLRDATA_ADDRESS rcwAddr, BOOL *isDCOMProxy) = 0; - + }; - - + + #else /* C style interface */ typedef struct ISOSDacInterface2Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ISOSDacInterface2 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ISOSDacInterface2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ISOSDacInterface2 * This); - - HRESULT ( STDMETHODCALLTYPE *GetObjectExceptionData )( + + HRESULT ( STDMETHODCALLTYPE *GetObjectExceptionData )( ISOSDacInterface2 * This, CLRDATA_ADDRESS objAddr, struct DacpExceptionObjectData *data); - - HRESULT ( STDMETHODCALLTYPE *IsRCWDCOMProxy )( + + HRESULT ( STDMETHODCALLTYPE *IsRCWDCOMProxy )( ISOSDacInterface2 * This, CLRDATA_ADDRESS rcwAddr, BOOL *isDCOMProxy); - + END_INTERFACE } ISOSDacInterface2Vtbl; @@ -1989,26 +1996,26 @@ EXTERN_C const IID IID_ISOSDacInterface2; CONST_VTBL struct ISOSDacInterface2Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ISOSDacInterface2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ISOSDacInterface2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ISOSDacInterface2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ISOSDacInterface2_GetObjectExceptionData(This,objAddr,data) \ - ( (This)->lpVtbl -> GetObjectExceptionData(This,objAddr,data) ) + ( (This)->lpVtbl -> GetObjectExceptionData(This,objAddr,data) ) #define ISOSDacInterface2_IsRCWDCOMProxy(This,rcwAddr,isDCOMProxy) \ - ( (This)->lpVtbl -> IsRCWDCOMProxy(This,rcwAddr,isDCOMProxy) ) + ( (This)->lpVtbl -> IsRCWDCOMProxy(This,rcwAddr,isDCOMProxy) ) #endif /* COBJMACROS */ @@ -2025,61 +2032,61 @@ EXTERN_C const IID IID_ISOSDacInterface2; #define __ISOSDacInterface3_INTERFACE_DEFINED__ /* interface ISOSDacInterface3 */ -/* [uuid][local][object] */ +/* [uuid][local][object] */ EXTERN_C const IID IID_ISOSDacInterface3; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("B08C5CDC-FD8A-49C5-AB38-5FEEF35235B4") ISOSDacInterface3 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetGCInterestingInfoData( + virtual HRESULT STDMETHODCALLTYPE GetGCInterestingInfoData( CLRDATA_ADDRESS interestingInfoAddr, struct DacpGCInterestingInfoData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetGCInterestingInfoStaticData( + + virtual HRESULT STDMETHODCALLTYPE GetGCInterestingInfoStaticData( struct DacpGCInterestingInfoData *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetGCGlobalMechanisms( + + virtual HRESULT STDMETHODCALLTYPE GetGCGlobalMechanisms( size_t *globalMechanisms) = 0; - + }; - - + + #else /* C style interface */ typedef struct ISOSDacInterface3Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ISOSDacInterface3 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ISOSDacInterface3 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ISOSDacInterface3 * This); - - HRESULT ( STDMETHODCALLTYPE *GetGCInterestingInfoData )( + + HRESULT ( STDMETHODCALLTYPE *GetGCInterestingInfoData )( ISOSDacInterface3 * This, CLRDATA_ADDRESS interestingInfoAddr, struct DacpGCInterestingInfoData *data); - - HRESULT ( STDMETHODCALLTYPE *GetGCInterestingInfoStaticData )( + + HRESULT ( STDMETHODCALLTYPE *GetGCInterestingInfoStaticData )( ISOSDacInterface3 * This, struct DacpGCInterestingInfoData *data); - - HRESULT ( STDMETHODCALLTYPE *GetGCGlobalMechanisms )( + + HRESULT ( STDMETHODCALLTYPE *GetGCGlobalMechanisms )( ISOSDacInterface3 * This, size_t *globalMechanisms); - + END_INTERFACE } ISOSDacInterface3Vtbl; @@ -2088,29 +2095,29 @@ EXTERN_C const IID IID_ISOSDacInterface3; CONST_VTBL struct ISOSDacInterface3Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ISOSDacInterface3_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ISOSDacInterface3_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ISOSDacInterface3_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ISOSDacInterface3_GetGCInterestingInfoData(This,interestingInfoAddr,data) \ - ( (This)->lpVtbl -> GetGCInterestingInfoData(This,interestingInfoAddr,data) ) + ( (This)->lpVtbl -> GetGCInterestingInfoData(This,interestingInfoAddr,data) ) #define ISOSDacInterface3_GetGCInterestingInfoStaticData(This,data) \ - ( (This)->lpVtbl -> GetGCInterestingInfoStaticData(This,data) ) + ( (This)->lpVtbl -> GetGCInterestingInfoStaticData(This,data) ) #define ISOSDacInterface3_GetGCGlobalMechanisms(This,globalMechanisms) \ - ( (This)->lpVtbl -> GetGCGlobalMechanisms(This,globalMechanisms) ) + ( (This)->lpVtbl -> GetGCGlobalMechanisms(This,globalMechanisms) ) #endif /* COBJMACROS */ @@ -2127,49 +2134,49 @@ EXTERN_C const IID IID_ISOSDacInterface3; #define __ISOSDacInterface4_INTERFACE_DEFINED__ /* interface ISOSDacInterface4 */ -/* [uuid][local][object] */ +/* [uuid][local][object] */ EXTERN_C const IID IID_ISOSDacInterface4; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("74B9D34C-A612-4B07-93DD-5462178FCE11") ISOSDacInterface4 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetClrNotification( + virtual HRESULT STDMETHODCALLTYPE GetClrNotification( CLRDATA_ADDRESS arguments[ ], int count, int *pNeeded) = 0; - + }; - - + + #else /* C style interface */ typedef struct ISOSDacInterface4Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ISOSDacInterface4 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ISOSDacInterface4 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ISOSDacInterface4 * This); - - HRESULT ( STDMETHODCALLTYPE *GetClrNotification )( + + HRESULT ( STDMETHODCALLTYPE *GetClrNotification )( ISOSDacInterface4 * This, CLRDATA_ADDRESS arguments[ ], int count, int *pNeeded); - + END_INTERFACE } ISOSDacInterface4Vtbl; @@ -2178,23 +2185,23 @@ EXTERN_C const IID IID_ISOSDacInterface4; CONST_VTBL struct ISOSDacInterface4Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ISOSDacInterface4_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ISOSDacInterface4_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ISOSDacInterface4_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ISOSDacInterface4_GetClrNotification(This,arguments,count,pNeeded) \ - ( (This)->lpVtbl -> GetClrNotification(This,arguments,count,pNeeded) ) + ( (This)->lpVtbl -> GetClrNotification(This,arguments,count,pNeeded) ) #endif /* COBJMACROS */ @@ -2211,53 +2218,53 @@ EXTERN_C const IID IID_ISOSDacInterface4; #define __ISOSDacInterface5_INTERFACE_DEFINED__ /* interface ISOSDacInterface5 */ -/* [uuid][local][object] */ +/* [uuid][local][object] */ EXTERN_C const IID IID_ISOSDacInterface5; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("127d6abe-6c86-4e48-8e7b-220781c58101") ISOSDacInterface5 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetTieredVersions( + virtual HRESULT STDMETHODCALLTYPE GetTieredVersions( CLRDATA_ADDRESS methodDesc, int rejitId, struct DacpTieredVersionData *nativeCodeAddrs, int cNativeCodeAddrs, int *pcNativeCodeAddrs) = 0; - + }; - - + + #else /* C style interface */ typedef struct ISOSDacInterface5Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ISOSDacInterface5 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ISOSDacInterface5 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ISOSDacInterface5 * This); - - HRESULT ( STDMETHODCALLTYPE *GetTieredVersions )( + + HRESULT ( STDMETHODCALLTYPE *GetTieredVersions )( ISOSDacInterface5 * This, CLRDATA_ADDRESS methodDesc, int rejitId, struct DacpTieredVersionData *nativeCodeAddrs, int cNativeCodeAddrs, int *pcNativeCodeAddrs); - + END_INTERFACE } ISOSDacInterface5Vtbl; @@ -2266,23 +2273,23 @@ EXTERN_C const IID IID_ISOSDacInterface5; CONST_VTBL struct ISOSDacInterface5Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ISOSDacInterface5_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ISOSDacInterface5_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ISOSDacInterface5_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ISOSDacInterface5_GetTieredVersions(This,methodDesc,rejitId,nativeCodeAddrs,cNativeCodeAddrs,pcNativeCodeAddrs) \ - ( (This)->lpVtbl -> GetTieredVersions(This,methodDesc,rejitId,nativeCodeAddrs,cNativeCodeAddrs,pcNativeCodeAddrs) ) + ( (This)->lpVtbl -> GetTieredVersions(This,methodDesc,rejitId,nativeCodeAddrs,cNativeCodeAddrs,pcNativeCodeAddrs) ) #endif /* COBJMACROS */ @@ -2299,47 +2306,47 @@ EXTERN_C const IID IID_ISOSDacInterface5; #define __ISOSDacInterface6_INTERFACE_DEFINED__ /* interface ISOSDacInterface6 */ -/* [uuid][local][object] */ +/* [uuid][local][object] */ EXTERN_C const IID IID_ISOSDacInterface6; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("11206399-4B66-4EDB-98EA-85654E59AD45") ISOSDacInterface6 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetMethodTableCollectibleData( + virtual HRESULT STDMETHODCALLTYPE GetMethodTableCollectibleData( CLRDATA_ADDRESS mt, struct DacpMethodTableCollectibleData *data) = 0; - + }; - - + + #else /* C style interface */ typedef struct ISOSDacInterface6Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ISOSDacInterface6 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ISOSDacInterface6 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ISOSDacInterface6 * This); - - HRESULT ( STDMETHODCALLTYPE *GetMethodTableCollectibleData )( + + HRESULT ( STDMETHODCALLTYPE *GetMethodTableCollectibleData )( ISOSDacInterface6 * This, CLRDATA_ADDRESS mt, struct DacpMethodTableCollectibleData *data); - + END_INTERFACE } ISOSDacInterface6Vtbl; @@ -2348,23 +2355,23 @@ EXTERN_C const IID IID_ISOSDacInterface6; CONST_VTBL struct ISOSDacInterface6Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ISOSDacInterface6_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ISOSDacInterface6_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ISOSDacInterface6_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ISOSDacInterface6_GetMethodTableCollectibleData(This,mt,data) \ - ( (This)->lpVtbl -> GetMethodTableCollectibleData(This,mt,data) ) + ( (This)->lpVtbl -> GetMethodTableCollectibleData(This,mt,data) ) #endif /* COBJMACROS */ @@ -2381,80 +2388,80 @@ EXTERN_C const IID IID_ISOSDacInterface6; #define __ISOSDacInterface7_INTERFACE_DEFINED__ /* interface ISOSDacInterface7 */ -/* [uuid][local][object] */ +/* [uuid][local][object] */ EXTERN_C const IID IID_ISOSDacInterface7; #if defined(__cplusplus) && !defined(CINTERFACE) - + MIDL_INTERFACE("c1020dde-fe98-4536-a53b-f35a74c327eb") ISOSDacInterface7 : public IUnknown { public: - virtual HRESULT STDMETHODCALLTYPE GetPendingReJITID( + virtual HRESULT STDMETHODCALLTYPE GetPendingReJITID( CLRDATA_ADDRESS methodDesc, int *pRejitId) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetReJITInformation( + + virtual HRESULT STDMETHODCALLTYPE GetReJITInformation( CLRDATA_ADDRESS methodDesc, int rejitId, struct DacpReJitData2 *pRejitData) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetProfilerModifiedILInformation( + + virtual HRESULT STDMETHODCALLTYPE GetProfilerModifiedILInformation( CLRDATA_ADDRESS methodDesc, struct DacpProfilerILData *pILData) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetMethodsWithProfilerModifiedIL( + + virtual HRESULT STDMETHODCALLTYPE GetMethodsWithProfilerModifiedIL( CLRDATA_ADDRESS mod, CLRDATA_ADDRESS *methodDescs, int cMethodDescs, int *pcMethodDescs) = 0; - + }; - - + + #else /* C style interface */ typedef struct ISOSDacInterface7Vtbl { BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( ISOSDacInterface7 * This, /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ + /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( + + ULONG ( STDMETHODCALLTYPE *AddRef )( ISOSDacInterface7 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( + + ULONG ( STDMETHODCALLTYPE *Release )( ISOSDacInterface7 * This); - - HRESULT ( STDMETHODCALLTYPE *GetPendingReJITID )( + + HRESULT ( STDMETHODCALLTYPE *GetPendingReJITID )( ISOSDacInterface7 * This, CLRDATA_ADDRESS methodDesc, int *pRejitId); - - HRESULT ( STDMETHODCALLTYPE *GetReJITInformation )( + + HRESULT ( STDMETHODCALLTYPE *GetReJITInformation )( ISOSDacInterface7 * This, CLRDATA_ADDRESS methodDesc, int rejitId, struct DacpReJitData2 *pRejitData); - - HRESULT ( STDMETHODCALLTYPE *GetProfilerModifiedILInformation )( + + HRESULT ( STDMETHODCALLTYPE *GetProfilerModifiedILInformation )( ISOSDacInterface7 * This, CLRDATA_ADDRESS methodDesc, struct DacpProfilerILData *pILData); - - HRESULT ( STDMETHODCALLTYPE *GetMethodsWithProfilerModifiedIL )( + + HRESULT ( STDMETHODCALLTYPE *GetMethodsWithProfilerModifiedIL )( ISOSDacInterface7 * This, CLRDATA_ADDRESS mod, CLRDATA_ADDRESS *methodDescs, int cMethodDescs, int *pcMethodDescs); - + END_INTERFACE } ISOSDacInterface7Vtbl; @@ -2463,32 +2470,32 @@ EXTERN_C const IID IID_ISOSDacInterface7; CONST_VTBL struct ISOSDacInterface7Vtbl *lpVtbl; }; - + #ifdef COBJMACROS #define ISOSDacInterface7_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ISOSDacInterface7_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) + ( (This)->lpVtbl -> AddRef(This) ) #define ISOSDacInterface7_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) + ( (This)->lpVtbl -> Release(This) ) #define ISOSDacInterface7_GetPendingReJITID(This,methodDesc,pRejitId) \ - ( (This)->lpVtbl -> GetPendingReJITID(This,methodDesc,pRejitId) ) + ( (This)->lpVtbl -> GetPendingReJITID(This,methodDesc,pRejitId) ) #define ISOSDacInterface7_GetReJITInformation(This,methodDesc,rejitId,pRejitData) \ - ( (This)->lpVtbl -> GetReJITInformation(This,methodDesc,rejitId,pRejitData) ) + ( (This)->lpVtbl -> GetReJITInformation(This,methodDesc,rejitId,pRejitData) ) #define ISOSDacInterface7_GetProfilerModifiedILInformation(This,methodDesc,pILData) \ - ( (This)->lpVtbl -> GetProfilerModifiedILInformation(This,methodDesc,pILData) ) + ( (This)->lpVtbl -> GetProfilerModifiedILInformation(This,methodDesc,pILData) ) #define ISOSDacInterface7_GetMethodsWithProfilerModifiedIL(This,mod,methodDescs,cMethodDescs,pcMethodDescs) \ - ( (This)->lpVtbl -> GetMethodsWithProfilerModifiedIL(This,mod,methodDescs,cMethodDescs,pcMethodDescs) ) + ( (This)->lpVtbl -> GetMethodsWithProfilerModifiedIL(This,mod,methodDescs,cMethodDescs,pcMethodDescs) ) #endif /* COBJMACROS */ @@ -2501,6 +2508,136 @@ EXTERN_C const IID IID_ISOSDacInterface7; #endif /* __ISOSDacInterface7_INTERFACE_DEFINED__ */ +#ifndef __ISOSDacInterface8_INTERFACE_DEFINED__ +#define __ISOSDacInterface8_INTERFACE_DEFINED__ + +/* interface ISOSDacInterface8 */ +/* [uuid][local][object] */ + + +EXTERN_C const IID IID_ISOSDacInterface8; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("c12f35a9-e55c-4520-a894-b3dc5165dfce") + ISOSDacInterface8 : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetGenerationTable( + unsigned int cGenerations, + struct DacpGenerationData *pGenerationData, + unsigned int *pNeeded) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFinalizationFillPointers( + unsigned int cFillPointers, + CLRDATA_ADDRESS *pFinalizationFillPointers, + unsigned int *pNeeded) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetGenerationTableSvr( + CLRDATA_ADDRESS heapAddr, + unsigned int cGenerations, + struct DacpGenerationData *pGenerationData, + unsigned int *pNeeded) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFinalizationFillPointersSvr( + CLRDATA_ADDRESS heapAddr, + unsigned int cFillPointers, + CLRDATA_ADDRESS *pFinalizationFillPointers, + unsigned int *pNeeded) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ISOSDacInterface8Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISOSDacInterface8 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISOSDacInterface8 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISOSDacInterface8 * This); + + HRESULT ( STDMETHODCALLTYPE *GetGenerationTable )( + ISOSDacInterface8 * This, + unsigned int cGenerations, + struct DacpGenerationData *pGenerationData, + unsigned int *pNeeded); + + HRESULT ( STDMETHODCALLTYPE *GetFinalizationFillPointers )( + ISOSDacInterface8 * This, + unsigned int cFillPointers, + CLRDATA_ADDRESS *pFinalizationFillPointers, + unsigned int *pNeeded); + + HRESULT ( STDMETHODCALLTYPE *GetGenerationTableSvr )( + ISOSDacInterface8 * This, + CLRDATA_ADDRESS heapAddr, + unsigned int cGenerations, + struct DacpGenerationData *pGenerationData, + unsigned int *pNeeded); + + HRESULT ( STDMETHODCALLTYPE *GetFinalizationFillPointersSvr )( + ISOSDacInterface8 * This, + CLRDATA_ADDRESS heapAddr, + unsigned int cFillPointers, + CLRDATA_ADDRESS *pFinalizationFillPointers, + unsigned int *pNeeded); + + END_INTERFACE + } ISOSDacInterface8Vtbl; + + interface ISOSDacInterface8 + { + CONST_VTBL struct ISOSDacInterface8Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISOSDacInterface8_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ISOSDacInterface8_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ISOSDacInterface8_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ISOSDacInterface8_GetGenerationTable(This,cGenerations,pGenerationData,pNeeded) \ + ( (This)->lpVtbl -> GetGenerationTable(This,cGenerations,pGenerationData,pNeeded) ) + +#define ISOSDacInterface8_GetFinalizationFillPointers(This,cFillPointers,pFinalizationFillPointers,pNeeded) \ + ( (This)->lpVtbl -> GetFinalizationFillPointers(This,cFillPointers,pFinalizationFillPointers,pNeeded) ) + +#define ISOSDacInterface8_GetGenerationTableSvr(This,heapAddr,cGenerations,pGenerationData,pNeeded) \ + ( (This)->lpVtbl -> GetGenerationTableSvr(This,heapAddr,cGenerations,pGenerationData,pNeeded) ) + +#define ISOSDacInterface8_GetFinalizationFillPointersSvr(This,heapAddr,cFillPointers,pFinalizationFillPointers,pNeeded) \ + ( (This)->lpVtbl -> GetFinalizationFillPointersSvr(This,heapAddr,cFillPointers,pFinalizationFillPointers,pNeeded) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ISOSDacInterface8_INTERFACE_DEFINED__ */ + + /* Additional Prototypes for ALL interfaces */ /* end of Additional Prototypes */ From 73904d00aec7ff9ce8f3f324608d94743f50eca1 Mon Sep 17 00:00:00 2001 From: David Mason Date: Mon, 15 Jun 2020 23:32:49 -0700 Subject: [PATCH 2/7] code review feedback --- src/coreclr/src/debug/daccess/request.cpp | 4 +- src/coreclr/src/gc/gc.cpp | 165 +++++++++++----------- src/coreclr/src/gc/gcinterface.dac.h | 1 + 3 files changed, 86 insertions(+), 84 deletions(-) diff --git a/src/coreclr/src/debug/daccess/request.cpp b/src/coreclr/src/debug/daccess/request.cpp index 0f4abed4488e69..27ab230619bf1f 100644 --- a/src/coreclr/src/debug/daccess/request.cpp +++ b/src/coreclr/src/debug/daccess/request.cpp @@ -4589,7 +4589,7 @@ HRESULT ClrDataAccess::GetGenerationTableSvr(CLRDATA_ADDRESS heapAddr, unsigned HRESULT hr = S_OK; #ifdef FEATURE_SVR_GC // NUMBERGENERATIONS is hardcoded to the previous number of generations, doesn't account for POH - unsigned int numGenerationTableEntries = NUMBERGENERATIONS + 1; + unsigned int numGenerationTableEntries = (unsigned int)(g_gcDacGlobals->total_generation_count); if (pNeeded != NULL) { *pNeeded = numGenerationTableEntries; @@ -4634,7 +4634,7 @@ HRESULT ClrDataAccess::GetFinalizationFillPointersSvr(CLRDATA_ADDRESS heapAddr, HRESULT hr = S_OK; #ifdef FEATURE_SVR_GC // NUMBERGENERATIONS is hardcoded to the previous number of generations, doesn't account for POH - unsigned int numFillPointers = NUMBERGENERATIONS + 1 + dac_finalize_queue::ExtraSegCount; + unsigned int numFillPointers = (unsigned int)(g_gcDacGlobals->total_generation_count + dac_finalize_queue::ExtraSegCount); if (pNeeded != NULL) { *pNeeded = numFillPointers; diff --git a/src/coreclr/src/gc/gc.cpp b/src/coreclr/src/gc/gc.cpp index 4d25c7b74e05cc..ddd24f2e678fe0 100644 --- a/src/coreclr/src/gc/gc.cpp +++ b/src/coreclr/src/gc/gc.cpp @@ -196,10 +196,10 @@ gc_oh_num gen_to_oh(int gen) { switch (gen) { - case soh_gen0: + case soh_gen0: return gc_oh_num::soh; case soh_gen1: - return gc_oh_num::soh; + return gc_oh_num::soh; case soh_gen2: return gc_oh_num::soh; case loh_generation: @@ -1213,7 +1213,7 @@ class exclusive_sync void uoh_alloc_done_with_index (int index) { dprintf (3, ("uoh alloc: release lock on %Ix based on %d", (uint8_t *)alloc_objects[index], index)); - assert ((index >= 0) && (index < max_pending_allocs)); + assert ((index >= 0) && (index < max_pending_allocs)); alloc_objects[index] = (uint8_t*)0; } @@ -2021,7 +2021,7 @@ void stomp_write_barrier_initialize(uint8_t* ephemeral_low, uint8_t* ephemeral_h // Things we need to manually initialize: // gen0 min_size - based on cache // gen0/1 max_size - based on segment size -static static_data static_data_table[latency_level_last - latency_level_first + 1][total_generation_count] = +static static_data static_data_table[latency_level_last - latency_level_first + 1][total_generation_count] = { // latency_level_memory_footprint { @@ -3922,8 +3922,8 @@ struct initial_memory_details int current_block_large; int current_block_pinned; - enum - { + enum + { ALLATONCE = 1, EACH_GENERATION, EACH_BLOCK, @@ -3947,8 +3947,8 @@ struct initial_memory_details { switch (gen) { - case soh_gen0: - case soh_gen1: + case soh_gen0: + case soh_gen1: case soh_gen2: return initial_normal_heap[h_number].memory_base; case loh_generation: return initial_large_heap[h_number].memory_base; case poh_generation: return initial_pinned_heap[h_number].memory_base; @@ -3960,8 +3960,8 @@ struct initial_memory_details { switch (gen) { - case soh_gen0: - case soh_gen1: + case soh_gen0: + case soh_gen1: case soh_gen2: return block_size_normal; case loh_generation: return block_size_large; case poh_generation: return block_size_pinned; @@ -3981,7 +3981,7 @@ BOOL gc_heap::reserve_initial_memory (size_t normal_size, size_t large_size, siz assert (memory_details.initial_memory == 0); // soh + loh + poh segments * num_heaps - memory_details.initial_memory = new (nothrow) imemory_data[num_heaps * (total_generation_count - ephemeral_generation_count)]; + memory_details.initial_memory = new (nothrow) imemory_data[num_heaps * (total_generation_count - ephemeral_generation_count)]; if (memory_details.initial_memory == 0) { dprintf (2, ("failed to reserve %Id bytes for imemory_data", num_heaps * (total_generation_count - ephemeral_generation_count) * sizeof (imemory_data))); @@ -4049,7 +4049,7 @@ BOOL gc_heap::reserve_initial_memory (size_t normal_size, size_t large_size, siz for (int i = 0; i < memory_details.block_count; i++) { - memory_details.initial_normal_heap[i].memory_base = allatonce_block + + memory_details.initial_normal_heap[i].memory_base = allatonce_block + (i * normal_size); memory_details.initial_large_heap[i].memory_base = allatonce_block + (memory_details.block_count * normal_size) + (i * large_size); @@ -5655,7 +5655,7 @@ bool gc_heap::virtual_commit (void* address, size_t size, gc_oh_num oh, int h_nu { check_commit_cs.Enter(); committed_by_oh[oh] -= size; - + dprintf (1, ("commit failed, updating %Id to %Id", current_total_committed, (current_total_committed - size))); current_total_committed -= size; @@ -6039,7 +6039,7 @@ void gc_heap::fix_uoh_allocation_area() #endif // _DEBUG generation_alloc_context (generation_of (i)); assert (acontext->alloc_ptr == 0); - assert (acontext->alloc_limit == 0); + assert (acontext->alloc_limit == 0); #if 0 dprintf (3, ("UOH alloc context: gen: %Ix, ptr: %Ix, limit %Ix", @@ -9238,7 +9238,7 @@ int gc_heap::object_gennum_plan (uint8_t* o) heap_segment* gc_heap::make_heap_segment (uint8_t* new_pages, size_t size, gc_oh_num oh, int h_number) { - assert(oh != gc_oh_num::none); + assert(oh != gc_oh_num::none); size_t initial_commit = SEGMENT_INITIAL_COMMIT; if (!virtual_commit (new_pages, initial_commit, oh, h_number)) @@ -9797,11 +9797,11 @@ void gc_heap::make_generation (int gen_num, heap_segment* seg, uint8_t* start) gen->allocation_segment = seg; gen->plan_allocation_start = 0; gen->free_list_space = 0; - gen->pinned_allocated = 0; - gen->free_list_allocated = 0; + gen->pinned_allocated = 0; + gen->free_list_allocated = 0; gen->end_seg_allocated = 0; - gen->condemned_allocated = 0; - gen->sweep_allocated = 0; + gen->condemned_allocated = 0; + gen->sweep_allocated = 0; gen->free_obj_space = 0; gen->allocation_size = 0; gen->pinned_allocation_sweep_size = 0; @@ -11747,7 +11747,7 @@ void gc_heap::check_for_full_gc (int gen_num, size_t size) { return; } - + if (gen_num < max_generation) { gen_num = max_generation; @@ -12068,7 +12068,7 @@ BOOL gc_heap::a_fit_free_list_p (int gen_number, #ifdef BACKGROUND_GC void gc_heap::bgc_uoh_alloc_clr (uint8_t* alloc_start, - size_t size, + size_t size, alloc_context* acontext, uint32_t flags, int align_const, @@ -12148,7 +12148,7 @@ void gc_heap::bgc_uoh_alloc_clr (uint8_t* alloc_start, BOOL gc_heap::a_fit_free_list_uoh_p (size_t size, alloc_context* acontext, - uint32_t flags, + uint32_t flags, int align_const, int gen_number) { @@ -13185,7 +13185,7 @@ allocation_state gc_heap::allocate_uoh (int gen_number, can_use_existing_p = uoh_try_fit (gen_number, size, acontext, flags, align_const, &commit_failed_p, &oom_r); uoh_alloc_state = (can_use_existing_p ? - a_state_can_allocate : + a_state_can_allocate : (commit_failed_p ? a_state_trigger_full_compact_gc : a_state_acquire_seg)); @@ -13197,7 +13197,7 @@ allocation_state gc_heap::allocate_uoh (int gen_number, BOOL commit_failed_p = FALSE; BOOL can_use_existing_p = FALSE; - can_use_existing_p = uoh_try_fit (gen_number, size, acontext, flags, + can_use_existing_p = uoh_try_fit (gen_number, size, acontext, flags, align_const, &commit_failed_p, &oom_r); // Even after we got a new seg it doesn't necessarily mean we can allocate, // another LOH allocating thread could have beat us to acquire the msl so @@ -13246,9 +13246,9 @@ allocation_state gc_heap::allocate_uoh (int gen_number, current_full_compact_gc_count = get_full_compact_gc_count(); can_get_new_seg_p = uoh_get_new_seg (gen_number, size, &did_full_compacting_gc, &oom_r); - uoh_alloc_state = (can_get_new_seg_p ? - a_state_try_fit_new_seg : - (did_full_compacting_gc ? + uoh_alloc_state = (can_get_new_seg_p ? + a_state_try_fit_new_seg : + (did_full_compacting_gc ? a_state_check_retry_seg : a_state_check_and_wait_for_bgc)); break; @@ -13264,8 +13264,8 @@ allocation_state gc_heap::allocate_uoh (int gen_number, // Since we release the msl before we try to allocate a seg, other // threads could have allocated a bunch of segments before us so // we might need to retry. - uoh_alloc_state = (can_get_new_seg_p ? - a_state_try_fit_after_cg : + uoh_alloc_state = (can_get_new_seg_p ? + a_state_try_fit_after_cg : a_state_check_retry_seg); break; } @@ -13276,10 +13276,10 @@ allocation_state gc_heap::allocate_uoh (int gen_number, current_full_compact_gc_count = get_full_compact_gc_count(); - can_get_new_seg_p = uoh_get_new_seg (gen_number, size, &did_full_compacting_gc, &oom_r); - uoh_alloc_state = (can_get_new_seg_p ? - a_state_try_fit_new_seg : - (did_full_compacting_gc ? + can_get_new_seg_p = uoh_get_new_seg (gen_number, size, &did_full_compacting_gc, &oom_r); + uoh_alloc_state = (can_get_new_seg_p ? + a_state_try_fit_new_seg : + (did_full_compacting_gc ? a_state_check_retry_seg : a_state_trigger_full_compact_gc)); assert ((uoh_alloc_state != a_state_cant_allocate) || (oom_r != oom_no_failure)); @@ -13292,8 +13292,8 @@ allocation_state gc_heap::allocate_uoh (int gen_number, bgc_in_progress_p = check_and_wait_for_bgc (awr_loh_oos_bgc, &did_full_compacting_gc, true); uoh_alloc_state = (!bgc_in_progress_p ? - a_state_trigger_full_compact_gc : - (did_full_compacting_gc ? + a_state_trigger_full_compact_gc : + (did_full_compacting_gc ? a_state_try_fit_after_cg : a_state_try_fit_after_bgc)); break; @@ -13326,9 +13326,9 @@ allocation_state gc_heap::allocate_uoh (int gen_number, should_retry_get_seg = TRUE; } } - - uoh_alloc_state = (should_retry_gc ? - a_state_trigger_full_compact_gc : + + uoh_alloc_state = (should_retry_gc ? + a_state_trigger_full_compact_gc : (should_retry_get_seg ? a_state_try_fit_after_cg : a_state_cant_allocate)); @@ -13857,7 +13857,7 @@ gc_heap* gc_heap::balance_heaps_uoh (alloc_context* acontext, size_t alloc_size, if (max_hp != home_hp) { - dprintf (3, ("uoh: %d(%Id)->%d(%Id)", + dprintf (3, ("uoh: %d(%Id)->%d(%Id)", home_hp->heap_number, dd_new_allocation (home_hp->dynamic_data_of (generation_num)), max_hp->heap_number, dd_new_allocation (max_hp->dynamic_data_of (generation_num)))); } @@ -14998,7 +14998,7 @@ int gc_heap::joined_generation_to_condemn (BOOL should_evaluate_elevation, else if ((current_total_committed * 10) >= (heap_hard_limit * 9)) { size_t loh_frag = get_total_gen_fragmentation (loh_generation); - + // If the LOH frag is >= 1/8 it's worth compacting it if ((loh_frag * 8) >= heap_hard_limit) { @@ -15381,8 +15381,8 @@ int gc_heap::generation_to_condemn (int n_initial, for (int i = uoh_start_generation; i < total_generation_count; i++) { - dd_fragmentation (dynamic_data_of (i)) = - generation_free_list_space (generation_of (i)) + + dd_fragmentation (dynamic_data_of (i)) = + generation_free_list_space (generation_of (i)) + generation_free_obj_space (generation_of (i)); } @@ -15806,8 +15806,8 @@ int gc_heap::generation_to_condemn (int n_initial, #ifdef MULTIPLE_HEAPS for (int i = 0; i < n_heaps; i++) { - if (((g_heaps[i]->current_generation_size (max_generation)) > bgc_min_per_heap) || - ((g_heaps[i]->current_generation_size (loh_generation)) > bgc_min_per_heap) || + if (((g_heaps[i]->current_generation_size (max_generation)) > bgc_min_per_heap) || + ((g_heaps[i]->current_generation_size (loh_generation)) > bgc_min_per_heap) || ((g_heaps[i]->current_generation_size (poh_generation)) > bgc_min_per_heap)) { bgc_heap_too_small = FALSE; @@ -15815,8 +15815,8 @@ int gc_heap::generation_to_condemn (int n_initial, } } #else //MULTIPLE_HEAPS - if ((current_generation_size (max_generation) > bgc_min_per_heap) || - (current_generation_size (loh_generation) > bgc_min_per_heap) || + if ((current_generation_size (max_generation) > bgc_min_per_heap) || + (current_generation_size (loh_generation) > bgc_min_per_heap) || (current_generation_size (poh_generation) > bgc_min_per_heap)) { bgc_heap_too_small = FALSE; @@ -16480,7 +16480,7 @@ void gc_heap::gc1() #endif // HOST_64BIT gc_data_global.final_youngest_desired = desired_per_heap; } -#if 1 //subsumed by the linear allocation model +#if 1 //subsumed by the linear allocation model if (gen >= uoh_start_generation) { // to avoid spikes in mem usage due to short terms fluctuations in survivorship, @@ -16798,7 +16798,7 @@ BOOL gc_heap::loh_allocated_for_no_gc() return FALSE; heap_segment* seg = generation_allocation_segment (generation_of (loh_generation)); - do + do { if (seg == saved_loh_segment_no_gc) { @@ -17793,8 +17793,8 @@ gc_heap* gc_heap::heap_of_gc (uint8_t* o) // will find all heap objects (large and small) // // Callers of this method need to guarantee the interior pointer is within the heap range. -// -// If you need it to be stricter, eg if you only want to find an object in ephemeral range, +// +// If you need it to be stricter, eg if you only want to find an object in ephemeral range, // you should make sure interior is within that range before calling this method. uint8_t* gc_heap::find_object (uint8_t* interior) { @@ -19414,7 +19414,7 @@ void gc_heap::background_process_mark_overflow_internal (int condemned_gen_numbe while (seg) { uint8_t* o = hp->background_first_overflow (min_add, seg, concurrent_p, small_object_segments); - + while ((o < hp->background_seg_end (seg, concurrent_p)) && (o <= max_add)) { dprintf (3, ("considering %Ix", (size_t)o)); @@ -19713,7 +19713,7 @@ size_t gc_heap::committed_size() for (int i = max_generation; i < total_generation_count; i++) { generation* gen = generation_of (i); - heap_segment* seg = heap_segment_rw (generation_start_segment (gen)); + heap_segment* seg = heap_segment_rw (generation_start_segment (gen)); while (seg) { @@ -21521,8 +21521,8 @@ BOOL gc_heap::plan_loh() heap_segment* seg = start_seg; uint8_t* o = generation_allocation_start (gen); - dprintf (1235, ("before GC LOH size: %Id, free list: %Id, free obj: %Id\n", - generation_size (loh_generation), + dprintf (1235, ("before GC LOH size: %Id, free list: %Id, free obj: %Id\n", + generation_size (loh_generation), generation_free_list_space (gen), generation_free_obj_space (gen))); @@ -21766,8 +21766,8 @@ void gc_heap::compact_loh() assert (loh_pinned_plug_que_empty_p()); - dprintf (1235, ("after GC LOH size: %Id, free list: %Id, free obj: %Id\n\n", - generation_size (loh_generation), + dprintf (1235, ("after GC LOH size: %Id, free list: %Id, free obj: %Id\n\n", + generation_size (loh_generation), generation_free_list_space (gen), generation_free_obj_space (gen))); } @@ -21822,8 +21822,8 @@ void gc_heap::relocate_in_loh_compact() } } - dprintf (1235, ("after GC LOH size: %Id, free list: %Id, free obj: %Id\n\n", - generation_size (loh_generation), + dprintf (1235, ("after GC LOH size: %Id, free list: %Id, free obj: %Id\n\n", + generation_size (loh_generation), generation_free_list_space (gen), generation_free_obj_space (gen))); } @@ -25994,7 +25994,7 @@ BOOL gc_heap::commit_mark_array_bgc_init() if (!(seg->flags & heap_segment_flags_ma_committed)) { // For ro segments they could always be only partially in range so we'd - // be calling this at the beginning of every BGC. We are not making this + // be calling this at the beginning of every BGC. We are not making this // more efficient right now - ro segments are currently only used by redhawk. if (heap_segment_read_only_p (seg)) { @@ -26026,7 +26026,7 @@ BOOL gc_heap::commit_mark_array_bgc_init() } else { - // For normal segments they are by design completely in range so just + // For normal segments they are by design completely in range so just // commit the whole mark array for each seg. if (commit_mark_array_by_seg (seg, mark_array)) { @@ -26655,9 +26655,9 @@ void gc_heap::background_mark_phase () gen0_bricks_cleared = FALSE; - dprintf (2, ("end of bgc mark: loh: %d, poh: %d, soh: %d", - generation_size (loh_generation), - generation_size (poh_generation), + dprintf (2, ("end of bgc mark: loh: %d, poh: %d, soh: %d", + generation_size (loh_generation), + generation_size (poh_generation), generation_sizes (generation_of (max_generation)))); for (int gen_idx = max_generation; gen_idx < total_generation_count; gen_idx++) @@ -26987,7 +26987,7 @@ void gc_heap::revisit_written_pages (BOOL concurrent_p, BOOL reset_only_p) if ((heap_segment_mem (seg) >= background_saved_lowest_address) || (heap_segment_reserved (seg) <= background_saved_highest_address)) { - dprintf (3, ("h%d: sseg: %Ix(-%Ix)", heap_number, + dprintf (3, ("h%d: sseg: %Ix(-%Ix)", heap_number, heap_segment_mem (seg), heap_segment_reserved (seg))); skip_seg_p = TRUE; } @@ -27003,7 +27003,7 @@ void gc_heap::revisit_written_pages (BOOL concurrent_p, BOOL reset_only_p) dprintf (3, ("h%d: reset only starting %Ix", heap_number, base_address)); } - dprintf (3, ("h%d: starting: %Ix, seg %Ix-%Ix", heap_number, base_address, + dprintf (3, ("h%d: starting: %Ix, seg %Ix-%Ix", heap_number, base_address, heap_segment_mem (seg), heap_segment_reserved (seg))); @@ -27051,7 +27051,7 @@ void gc_heap::revisit_written_pages (BOOL concurrent_p, BOOL reset_only_p) { total_dirtied_pages += bcount; - dprintf (3, ("Found %d pages [%Ix, %Ix[", + dprintf (3, ("Found %d pages [%Ix, %Ix[", bcount, (size_t)base_address, (size_t)high_address)); } @@ -27060,7 +27060,7 @@ void gc_heap::revisit_written_pages (BOOL concurrent_p, BOOL reset_only_p) for (unsigned i = 0; i < bcount; i++) { uint8_t* page = (uint8_t*)background_written_addresses[i]; - dprintf (3, ("looking at page %d at %Ix(h: %Ix)", i, + dprintf (3, ("looking at page %d at %Ix(h: %Ix)", i, (size_t)page, (size_t)high_address)); if (page < high_address) { @@ -27094,7 +27094,7 @@ void gc_heap::revisit_written_pages (BOOL concurrent_p, BOOL reset_only_p) } if (i < loh_generation) - { + { if (!reset_only_p) { dprintf (GTC_LOG, ("h%d: SOH: dp:%Id; mo: %Id", heap_number, total_dirtied_pages, total_marked_objects)); @@ -31441,8 +31441,8 @@ size_t gc_heap::desired_new_allocation (dynamic_data* dd, { size_t allocated = 0; size_t committed = uoh_committed_size (gen_number, &allocated); - dprintf (1, ("GC#%Id h%d, GMI: UOH budget, UOH commit %Id (obj %Id, frag %Id), total commit: %Id (recorded: %Id)", - (size_t)settings.gc_index, heap_number, + dprintf (1, ("GC#%Id h%d, GMI: UOH budget, UOH commit %Id (obj %Id, frag %Id), total commit: %Id (recorded: %Id)", + (size_t)settings.gc_index, heap_number, committed, allocated, dd_fragmentation (dynamic_data_of (gen_number)), get_total_committed_size(), (current_total_committed - current_total_committed_bookkeeping))); @@ -31854,7 +31854,7 @@ void gc_heap::trim_youngest_desired_low_memory() { if (g_low_memory_status) { - size_t committed_mem = committed_size(); + size_t committed_mem = committed_size(); dynamic_data* dd = dynamic_data_of (0); size_t current = dd_desired_allocation (dd); size_t candidate = max (Align ((committed_mem / 10), get_alignment_constant(FALSE)), dd_min_size (dd)); @@ -32765,8 +32765,8 @@ void gc_heap::generation_delete_heap_segment (generation* gen, { dprintf (3, ("Preparing empty large segment %Ix for deletion", (size_t)seg)); - // We cannot thread segs in here onto freeable_uoh_segment because - // grow_brick_card_tables could be committing mark array which needs to read + // We cannot thread segs in here onto freeable_uoh_segment because + // grow_brick_card_tables could be committing mark array which needs to read // the seg list. So we delay it till next time we suspend EE. seg->flags |= heap_segment_flags_uoh_delete; // Since we will be decommitting the seg, we need to prevent heap verification @@ -33207,7 +33207,7 @@ void gc_heap::background_sweep() if (i == max_generation) { // start with saved ephemeral segment - // we are no longer holding gc_lock, so a new ephemeral segment could be added, we want the saved one. + // we are no longer holding gc_lock, so a new ephemeral segment could be added, we want the saved one. start_seg = saved_sweep_ephemeral_seg; prev_seg = heap_segment_next(start_seg); align_const = get_alignment_constant (TRUE); @@ -33395,12 +33395,12 @@ void gc_heap::background_sweep() generation_free_list_space (generation_of (max_generation)), generation_free_obj_space (generation_of (max_generation)))); - dprintf (GTC_LOG, ("h%d: end of bgc sweep: loh FL: %Id, FO: %Id", + dprintf (GTC_LOG, ("h%d: end of bgc sweep: loh FL: %Id, FO: %Id", heap_number, generation_free_list_space (generation_of (loh_generation)), generation_free_obj_space (generation_of (loh_generation)))); - dprintf (GTC_LOG, ("h%d: end of bgc sweep: poh FL: %Id, FO: %Id", + dprintf (GTC_LOG, ("h%d: end of bgc sweep: poh FL: %Id, FO: %Id", heap_number, generation_free_list_space (generation_of (poh_generation)), generation_free_obj_space (generation_of (poh_generation)))); @@ -33488,7 +33488,7 @@ void gc_heap::sweep_uoh_objects (int gen_num) dprintf (3, ("sweeping uoh objects")); - dprintf (3, ("seg: %Ix, [%Ix, %Ix[, starting from %Ix", + dprintf (3, ("seg: %Ix, [%Ix, %Ix[, starting from %Ix", (size_t)seg, (size_t)heap_segment_mem (seg), (size_t)heap_segment_allocated (seg), @@ -33649,8 +33649,8 @@ void gc_heap::mark_through_cards_for_uoh_objects (card_fn fn, size_t total_cards_cleared = 0; #ifdef FEATURE_CARD_MARKING_STEALING - VOLATILE(uint32_t)* chunk_index = (VOLATILE(uint32_t)*) &(gen_num == loh_generation ? - card_mark_chunk_index_loh : + VOLATILE(uint32_t)* chunk_index = (VOLATILE(uint32_t)*) &(gen_num == loh_generation ? + card_mark_chunk_index_loh : card_mark_chunk_index_poh); card_marking_enumerator card_mark_enumerator(seg, low, chunk_index); @@ -34235,7 +34235,7 @@ BOOL gc_heap::bgc_mark_array_range (heap_segment* seg, void gc_heap::bgc_verify_mark_array_cleared (heap_segment* seg) { #ifdef VERIFY_HEAP - if (gc_heap::background_running_p() && + if (gc_heap::background_running_p() && (GCConfig::GetHeapVerifyLevel() & GCConfig::HEAPVERIFY_GC)) { uint8_t* range_beg = 0; @@ -34378,7 +34378,7 @@ void gc_heap::clear_all_mark_array() void gc_heap::verify_mark_array_cleared() { #ifdef VERIFY_HEAP - if (gc_heap::background_running_p() && + if (gc_heap::background_running_p() && (GCConfig::GetHeapVerifyLevel() & GCConfig::HEAPVERIFY_GC)) { for (int i = max_generation; i < total_generation_count; i++) @@ -34568,7 +34568,7 @@ void gc_heap::verify_heap (BOOL begin_gc_p) { int heap_verify_level = static_cast(GCConfig::GetHeapVerifyLevel()); - + #ifdef MULTIPLE_HEAPS t_join* current_join = &gc_t_join; #ifdef BACKGROUND_GC @@ -38667,6 +38667,7 @@ void PopulateDacVars(GcDacVars *gcDacVars) gcDacVars->n_heaps = &gc_heap::n_heaps; gcDacVars->g_heaps = reinterpret_cast(&gc_heap::g_heaps); #endif // MULTIPLE_HEAPS + gcDacVars->total_generation_count = total_generation_count; #else UNREFERENCED_PARAMETER(gcDacVars); #endif // DACCESS_COMPILE diff --git a/src/coreclr/src/gc/gcinterface.dac.h b/src/coreclr/src/gc/gcinterface.dac.h index add18d586351c0..647e7456c0e877 100644 --- a/src/coreclr/src/gc/gcinterface.dac.h +++ b/src/coreclr/src/gc/gcinterface.dac.h @@ -184,6 +184,7 @@ struct GcDacVars { uint8_t major_version_number; uint8_t minor_version_number; size_t generation_size; + size_t total_generation_count; #ifdef DACCESS_COMPILE #define GC_DAC_VAR(type, name) DPTR(type) name; #define GC_DAC_PTR_VAR(type, name) DPTR(type*) name; From 0528179f127af8d5cc33972f4cca59c3e3e358b7 Mon Sep 17 00:00:00 2001 From: David Mason Date: Tue, 16 Jun 2020 10:57:57 -0700 Subject: [PATCH 3/7] code review feedback --- src/coreclr/src/debug/daccess/dacimpl.h | 1 + src/coreclr/src/debug/daccess/request.cpp | 37 +++++++++++++++------ src/coreclr/src/inc/sospriv.idl | 2 ++ src/coreclr/src/pal/prebuilt/inc/sospriv.h | 10 ++++++ src/coreclr/src/pal/src/libunwind/README.md | 0 5 files changed, 39 insertions(+), 11 deletions(-) mode change 120000 => 100644 src/coreclr/src/pal/src/libunwind/README.md diff --git a/src/coreclr/src/debug/daccess/dacimpl.h b/src/coreclr/src/debug/daccess/dacimpl.h index 03a3cf8c07ed14..ec26f54e5d1d14 100644 --- a/src/coreclr/src/debug/daccess/dacimpl.h +++ b/src/coreclr/src/debug/daccess/dacimpl.h @@ -1197,6 +1197,7 @@ class ClrDataAccess virtual HRESULT STDMETHODCALLTYPE GetMethodsWithProfilerModifiedIL(CLRDATA_ADDRESS mod, CLRDATA_ADDRESS *methodDescs, int cMethodDescs, int *pcMethodDescs); // ISOSDacInterface8 + virtual HRESULT STDMETHODCALLTYPE GetNumberGenerations(unsigned int *pGenerations); virtual HRESULT STDMETHODCALLTYPE GetGenerationTable(unsigned int cGenerations, struct DacpGenerationData *pGenerationData, unsigned int *pNeeded); virtual HRESULT STDMETHODCALLTYPE GetFinalizationFillPointers(unsigned int cFillPointers, CLRDATA_ADDRESS *pFinalizationFillPointers, unsigned int *pNeeded); diff --git a/src/coreclr/src/debug/daccess/request.cpp b/src/coreclr/src/debug/daccess/request.cpp index 27ab230619bf1f..f5ab3a14b0a019 100644 --- a/src/coreclr/src/debug/daccess/request.cpp +++ b/src/coreclr/src/debug/daccess/request.cpp @@ -4501,6 +4501,21 @@ HRESULT ClrDataAccess::GetMethodsWithProfilerModifiedIL(CLRDATA_ADDRESS mod, CLR return hr; } +HRESULT ClrDataAccess::GetNumberGenerations(unsigned int *pGenerations) +{ + if (pGenerations == NULL) + { + return E_INVALIDARG; + } + + SOSDacEnter(); + + *pGenerations = (unsigned int)(g_gcDacGlobals->total_generation_count); + + SOSDacLeave(); + return S_OK; +} + HRESULT ClrDataAccess::GetGenerationTable(unsigned int cGenerations, struct DacpGenerationData *pGenerationData, unsigned int *pNeeded) { if (cGenerations > 0 && pGenerationData == NULL) @@ -4511,7 +4526,7 @@ HRESULT ClrDataAccess::GetGenerationTable(unsigned int cGenerations, struct Dacp SOSDacEnter(); HRESULT hr = S_OK; - unsigned int numGenerationTableEntries = NUMBERGENERATIONS + 1; + unsigned int numGenerationTableEntries = (unsigned int)(g_gcDacGlobals->total_generation_count); if (pNeeded != NULL) { *pNeeded = numGenerationTableEntries; @@ -4519,11 +4534,11 @@ HRESULT ClrDataAccess::GetGenerationTable(unsigned int cGenerations, struct Dacp if (cGenerations < numGenerationTableEntries) { - hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); + hr = S_FALSE; } else { - for (unsigned int i=0; i < numGenerationTableEntries; i++) + for (unsigned int i = 0; i < numGenerationTableEntries; i++) { DPTR(dac_generation) generation = GenerationTableIndex(g_gcDacGlobals->generation_table, i); pGenerationData[i].start_segment = (CLRDATA_ADDRESS) dac_cast(generation->start_segment); @@ -4550,7 +4565,7 @@ HRESULT ClrDataAccess::GetFinalizationFillPointers(unsigned int cFillPointers, C SOSDacEnter(); HRESULT hr = S_OK; - unsigned int numFillPointers = NUMBERGENERATIONS + 1 + dac_finalize_queue::ExtraSegCount; + unsigned int numFillPointers = (unsigned int)(g_gcDacGlobals->total_generation_count + dac_finalize_queue::ExtraSegCount); if (pNeeded != NULL) { *pNeeded = numFillPointers; @@ -4558,7 +4573,7 @@ HRESULT ClrDataAccess::GetFinalizationFillPointers(unsigned int cFillPointers, C if (cFillPointers < numFillPointers) { - hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); + hr = S_FALSE; } else { @@ -4597,7 +4612,7 @@ HRESULT ClrDataAccess::GetGenerationTableSvr(CLRDATA_ADDRESS heapAddr, unsigned if (cGenerations < numGenerationTableEntries) { - hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); + hr = S_FALSE; } else { @@ -4606,10 +4621,10 @@ HRESULT ClrDataAccess::GetGenerationTableSvr(CLRDATA_ADDRESS heapAddr, unsigned for (unsigned int i = 0; i < numGenerationTableEntries; ++i) { DPTR(dac_generation) generation = ServerGenerationTableIndex(pHeap, i); - pGenerationData[i].start_segment = (CLRDATA_ADDRESS)dac_cast(generation->start_segment); - pGenerationData[i].allocation_start = (CLRDATA_ADDRESS)(ULONG_PTR)generation->allocation_start; + pGenerationData[i].start_segment = (CLRDATA_ADDRESS)dac_cast(generation->start_segment); + pGenerationData[i].allocation_start = (CLRDATA_ADDRESS)(ULONG_PTR)generation->allocation_start; DPTR(gc_alloc_context) alloc_context = dac_cast(generation) + offsetof(dac_generation, allocation_context); - pGenerationData[i].allocContextPtr = (CLRDATA_ADDRESS)(ULONG_PTR) alloc_context->alloc_ptr; + pGenerationData[i].allocContextPtr = (CLRDATA_ADDRESS)(ULONG_PTR) alloc_context->alloc_ptr; pGenerationData[i].allocContextLimit = (CLRDATA_ADDRESS)(ULONG_PTR) alloc_context->alloc_limit; } @@ -4642,7 +4657,7 @@ HRESULT ClrDataAccess::GetFinalizationFillPointersSvr(CLRDATA_ADDRESS heapAddr, if (cFillPointers < numFillPointers) { - hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); + hr = S_FALSE; } else { @@ -4650,7 +4665,7 @@ HRESULT ClrDataAccess::GetFinalizationFillPointersSvr(CLRDATA_ADDRESS heapAddr, DPTR(dac_finalize_queue) fq = pHeap->finalize_queue; DPTR(uint8_t*) pFillPointerArray= dac_cast(fq) + offsetof(dac_finalize_queue, m_FillPointers); - for(unsigned int i = 0; i < numFillPointers; ++i) + for (unsigned int i = 0; i < numFillPointers; ++i) { pFinalizationFillPointers[i] = (CLRDATA_ADDRESS) pFillPointerArray[i]; } diff --git a/src/coreclr/src/inc/sospriv.idl b/src/coreclr/src/inc/sospriv.idl index c265d724866d57..e29ef5692f0a3b 100644 --- a/src/coreclr/src/inc/sospriv.idl +++ b/src/coreclr/src/inc/sospriv.idl @@ -398,6 +398,8 @@ interface ISOSDacInterface7 : IUnknown ] interface ISOSDacInterface8 : IUnknown { + HRESULT GetNumberGenerations(unsigned int *pGenerations); + // WKS HRESULT GetGenerationTable(unsigned int cGenerations, struct DacpGenerationData *pGenerationData, unsigned int *pNeeded); HRESULT GetFinalizationFillPointers(unsigned int cFillPointers, CLRDATA_ADDRESS *pFinalizationFillPointers, unsigned int *pNeeded); diff --git a/src/coreclr/src/pal/prebuilt/inc/sospriv.h b/src/coreclr/src/pal/prebuilt/inc/sospriv.h index 243a7a7677a94f..d06852e241846b 100644 --- a/src/coreclr/src/pal/prebuilt/inc/sospriv.h +++ b/src/coreclr/src/pal/prebuilt/inc/sospriv.h @@ -2523,6 +2523,9 @@ EXTERN_C const IID IID_ISOSDacInterface8; ISOSDacInterface8 : public IUnknown { public: + virtual HRESULT STDMETHODCALLTYPE GetNumberGenerations( + unsigned int *pGenerations) = 0; + virtual HRESULT STDMETHODCALLTYPE GetGenerationTable( unsigned int cGenerations, struct DacpGenerationData *pGenerationData, @@ -2566,6 +2569,10 @@ EXTERN_C const IID IID_ISOSDacInterface8; ULONG ( STDMETHODCALLTYPE *Release )( ISOSDacInterface8 * This); + HRESULT ( STDMETHODCALLTYPE *GetNumberGenerations )( + ISOSDacInterface8 * This, + unsigned int *pGenerations); + HRESULT ( STDMETHODCALLTYPE *GetGenerationTable )( ISOSDacInterface8 * This, unsigned int cGenerations, @@ -2615,6 +2622,9 @@ EXTERN_C const IID IID_ISOSDacInterface8; ( (This)->lpVtbl -> Release(This) ) +#define ISOSDacInterface8_GetNumberGenerations(This,pGenerations) \ + ( (This)->lpVtbl -> GetNumberGenerations(This,pGenerations) ) + #define ISOSDacInterface8_GetGenerationTable(This,cGenerations,pGenerationData,pNeeded) \ ( (This)->lpVtbl -> GetGenerationTable(This,cGenerations,pGenerationData,pNeeded) ) diff --git a/src/coreclr/src/pal/src/libunwind/README.md b/src/coreclr/src/pal/src/libunwind/README.md deleted file mode 120000 index 100b93820ade4c..00000000000000 --- a/src/coreclr/src/pal/src/libunwind/README.md +++ /dev/null @@ -1 +0,0 @@ -README \ No newline at end of file diff --git a/src/coreclr/src/pal/src/libunwind/README.md b/src/coreclr/src/pal/src/libunwind/README.md new file mode 100644 index 00000000000000..100b93820ade4c --- /dev/null +++ b/src/coreclr/src/pal/src/libunwind/README.md @@ -0,0 +1 @@ +README \ No newline at end of file From da453e07ea6a605882459b3ba57ad342d08e7df5 Mon Sep 17 00:00:00 2001 From: David Mason Date: Tue, 16 Jun 2020 13:51:11 -0700 Subject: [PATCH 4/7] remove whitespace changes in gc.cpp --- src/coreclr/src/gc/gc.cpp | 166 +++++++++++++++++++------------------- 1 file changed, 83 insertions(+), 83 deletions(-) diff --git a/src/coreclr/src/gc/gc.cpp b/src/coreclr/src/gc/gc.cpp index ddd24f2e678fe0..c7f0489f5c9705 100644 --- a/src/coreclr/src/gc/gc.cpp +++ b/src/coreclr/src/gc/gc.cpp @@ -196,10 +196,10 @@ gc_oh_num gen_to_oh(int gen) { switch (gen) { - case soh_gen0: + case soh_gen0: return gc_oh_num::soh; case soh_gen1: - return gc_oh_num::soh; + return gc_oh_num::soh; case soh_gen2: return gc_oh_num::soh; case loh_generation: @@ -1213,7 +1213,7 @@ class exclusive_sync void uoh_alloc_done_with_index (int index) { dprintf (3, ("uoh alloc: release lock on %Ix based on %d", (uint8_t *)alloc_objects[index], index)); - assert ((index >= 0) && (index < max_pending_allocs)); + assert ((index >= 0) && (index < max_pending_allocs)); alloc_objects[index] = (uint8_t*)0; } @@ -2021,7 +2021,7 @@ void stomp_write_barrier_initialize(uint8_t* ephemeral_low, uint8_t* ephemeral_h // Things we need to manually initialize: // gen0 min_size - based on cache // gen0/1 max_size - based on segment size -static static_data static_data_table[latency_level_last - latency_level_first + 1][total_generation_count] = +static static_data static_data_table[latency_level_last - latency_level_first + 1][total_generation_count] = { // latency_level_memory_footprint { @@ -3922,8 +3922,8 @@ struct initial_memory_details int current_block_large; int current_block_pinned; - enum - { + enum + { ALLATONCE = 1, EACH_GENERATION, EACH_BLOCK, @@ -3947,8 +3947,8 @@ struct initial_memory_details { switch (gen) { - case soh_gen0: - case soh_gen1: + case soh_gen0: + case soh_gen1: case soh_gen2: return initial_normal_heap[h_number].memory_base; case loh_generation: return initial_large_heap[h_number].memory_base; case poh_generation: return initial_pinned_heap[h_number].memory_base; @@ -3960,8 +3960,8 @@ struct initial_memory_details { switch (gen) { - case soh_gen0: - case soh_gen1: + case soh_gen0: + case soh_gen1: case soh_gen2: return block_size_normal; case loh_generation: return block_size_large; case poh_generation: return block_size_pinned; @@ -3981,7 +3981,7 @@ BOOL gc_heap::reserve_initial_memory (size_t normal_size, size_t large_size, siz assert (memory_details.initial_memory == 0); // soh + loh + poh segments * num_heaps - memory_details.initial_memory = new (nothrow) imemory_data[num_heaps * (total_generation_count - ephemeral_generation_count)]; + memory_details.initial_memory = new (nothrow) imemory_data[num_heaps * (total_generation_count - ephemeral_generation_count)]; if (memory_details.initial_memory == 0) { dprintf (2, ("failed to reserve %Id bytes for imemory_data", num_heaps * (total_generation_count - ephemeral_generation_count) * sizeof (imemory_data))); @@ -4049,7 +4049,7 @@ BOOL gc_heap::reserve_initial_memory (size_t normal_size, size_t large_size, siz for (int i = 0; i < memory_details.block_count; i++) { - memory_details.initial_normal_heap[i].memory_base = allatonce_block + + memory_details.initial_normal_heap[i].memory_base = allatonce_block + (i * normal_size); memory_details.initial_large_heap[i].memory_base = allatonce_block + (memory_details.block_count * normal_size) + (i * large_size); @@ -5655,7 +5655,7 @@ bool gc_heap::virtual_commit (void* address, size_t size, gc_oh_num oh, int h_nu { check_commit_cs.Enter(); committed_by_oh[oh] -= size; - + dprintf (1, ("commit failed, updating %Id to %Id", current_total_committed, (current_total_committed - size))); current_total_committed -= size; @@ -6039,7 +6039,7 @@ void gc_heap::fix_uoh_allocation_area() #endif // _DEBUG generation_alloc_context (generation_of (i)); assert (acontext->alloc_ptr == 0); - assert (acontext->alloc_limit == 0); + assert (acontext->alloc_limit == 0); #if 0 dprintf (3, ("UOH alloc context: gen: %Ix, ptr: %Ix, limit %Ix", @@ -9238,7 +9238,7 @@ int gc_heap::object_gennum_plan (uint8_t* o) heap_segment* gc_heap::make_heap_segment (uint8_t* new_pages, size_t size, gc_oh_num oh, int h_number) { - assert(oh != gc_oh_num::none); + assert(oh != gc_oh_num::none); size_t initial_commit = SEGMENT_INITIAL_COMMIT; if (!virtual_commit (new_pages, initial_commit, oh, h_number)) @@ -9797,11 +9797,11 @@ void gc_heap::make_generation (int gen_num, heap_segment* seg, uint8_t* start) gen->allocation_segment = seg; gen->plan_allocation_start = 0; gen->free_list_space = 0; - gen->pinned_allocated = 0; - gen->free_list_allocated = 0; + gen->pinned_allocated = 0; + gen->free_list_allocated = 0; gen->end_seg_allocated = 0; - gen->condemned_allocated = 0; - gen->sweep_allocated = 0; + gen->condemned_allocated = 0; + gen->sweep_allocated = 0; gen->free_obj_space = 0; gen->allocation_size = 0; gen->pinned_allocation_sweep_size = 0; @@ -11747,7 +11747,7 @@ void gc_heap::check_for_full_gc (int gen_num, size_t size) { return; } - + if (gen_num < max_generation) { gen_num = max_generation; @@ -12068,7 +12068,7 @@ BOOL gc_heap::a_fit_free_list_p (int gen_number, #ifdef BACKGROUND_GC void gc_heap::bgc_uoh_alloc_clr (uint8_t* alloc_start, - size_t size, + size_t size, alloc_context* acontext, uint32_t flags, int align_const, @@ -12148,7 +12148,7 @@ void gc_heap::bgc_uoh_alloc_clr (uint8_t* alloc_start, BOOL gc_heap::a_fit_free_list_uoh_p (size_t size, alloc_context* acontext, - uint32_t flags, + uint32_t flags, int align_const, int gen_number) { @@ -13185,7 +13185,7 @@ allocation_state gc_heap::allocate_uoh (int gen_number, can_use_existing_p = uoh_try_fit (gen_number, size, acontext, flags, align_const, &commit_failed_p, &oom_r); uoh_alloc_state = (can_use_existing_p ? - a_state_can_allocate : + a_state_can_allocate : (commit_failed_p ? a_state_trigger_full_compact_gc : a_state_acquire_seg)); @@ -13197,7 +13197,7 @@ allocation_state gc_heap::allocate_uoh (int gen_number, BOOL commit_failed_p = FALSE; BOOL can_use_existing_p = FALSE; - can_use_existing_p = uoh_try_fit (gen_number, size, acontext, flags, + can_use_existing_p = uoh_try_fit (gen_number, size, acontext, flags, align_const, &commit_failed_p, &oom_r); // Even after we got a new seg it doesn't necessarily mean we can allocate, // another LOH allocating thread could have beat us to acquire the msl so @@ -13246,9 +13246,9 @@ allocation_state gc_heap::allocate_uoh (int gen_number, current_full_compact_gc_count = get_full_compact_gc_count(); can_get_new_seg_p = uoh_get_new_seg (gen_number, size, &did_full_compacting_gc, &oom_r); - uoh_alloc_state = (can_get_new_seg_p ? - a_state_try_fit_new_seg : - (did_full_compacting_gc ? + uoh_alloc_state = (can_get_new_seg_p ? + a_state_try_fit_new_seg : + (did_full_compacting_gc ? a_state_check_retry_seg : a_state_check_and_wait_for_bgc)); break; @@ -13264,8 +13264,8 @@ allocation_state gc_heap::allocate_uoh (int gen_number, // Since we release the msl before we try to allocate a seg, other // threads could have allocated a bunch of segments before us so // we might need to retry. - uoh_alloc_state = (can_get_new_seg_p ? - a_state_try_fit_after_cg : + uoh_alloc_state = (can_get_new_seg_p ? + a_state_try_fit_after_cg : a_state_check_retry_seg); break; } @@ -13276,10 +13276,10 @@ allocation_state gc_heap::allocate_uoh (int gen_number, current_full_compact_gc_count = get_full_compact_gc_count(); - can_get_new_seg_p = uoh_get_new_seg (gen_number, size, &did_full_compacting_gc, &oom_r); - uoh_alloc_state = (can_get_new_seg_p ? - a_state_try_fit_new_seg : - (did_full_compacting_gc ? + can_get_new_seg_p = uoh_get_new_seg (gen_number, size, &did_full_compacting_gc, &oom_r); + uoh_alloc_state = (can_get_new_seg_p ? + a_state_try_fit_new_seg : + (did_full_compacting_gc ? a_state_check_retry_seg : a_state_trigger_full_compact_gc)); assert ((uoh_alloc_state != a_state_cant_allocate) || (oom_r != oom_no_failure)); @@ -13292,8 +13292,8 @@ allocation_state gc_heap::allocate_uoh (int gen_number, bgc_in_progress_p = check_and_wait_for_bgc (awr_loh_oos_bgc, &did_full_compacting_gc, true); uoh_alloc_state = (!bgc_in_progress_p ? - a_state_trigger_full_compact_gc : - (did_full_compacting_gc ? + a_state_trigger_full_compact_gc : + (did_full_compacting_gc ? a_state_try_fit_after_cg : a_state_try_fit_after_bgc)); break; @@ -13326,9 +13326,9 @@ allocation_state gc_heap::allocate_uoh (int gen_number, should_retry_get_seg = TRUE; } } - - uoh_alloc_state = (should_retry_gc ? - a_state_trigger_full_compact_gc : + + uoh_alloc_state = (should_retry_gc ? + a_state_trigger_full_compact_gc : (should_retry_get_seg ? a_state_try_fit_after_cg : a_state_cant_allocate)); @@ -13857,7 +13857,7 @@ gc_heap* gc_heap::balance_heaps_uoh (alloc_context* acontext, size_t alloc_size, if (max_hp != home_hp) { - dprintf (3, ("uoh: %d(%Id)->%d(%Id)", + dprintf (3, ("uoh: %d(%Id)->%d(%Id)", home_hp->heap_number, dd_new_allocation (home_hp->dynamic_data_of (generation_num)), max_hp->heap_number, dd_new_allocation (max_hp->dynamic_data_of (generation_num)))); } @@ -14998,7 +14998,7 @@ int gc_heap::joined_generation_to_condemn (BOOL should_evaluate_elevation, else if ((current_total_committed * 10) >= (heap_hard_limit * 9)) { size_t loh_frag = get_total_gen_fragmentation (loh_generation); - + // If the LOH frag is >= 1/8 it's worth compacting it if ((loh_frag * 8) >= heap_hard_limit) { @@ -15381,8 +15381,8 @@ int gc_heap::generation_to_condemn (int n_initial, for (int i = uoh_start_generation; i < total_generation_count; i++) { - dd_fragmentation (dynamic_data_of (i)) = - generation_free_list_space (generation_of (i)) + + dd_fragmentation (dynamic_data_of (i)) = + generation_free_list_space (generation_of (i)) + generation_free_obj_space (generation_of (i)); } @@ -15806,8 +15806,8 @@ int gc_heap::generation_to_condemn (int n_initial, #ifdef MULTIPLE_HEAPS for (int i = 0; i < n_heaps; i++) { - if (((g_heaps[i]->current_generation_size (max_generation)) > bgc_min_per_heap) || - ((g_heaps[i]->current_generation_size (loh_generation)) > bgc_min_per_heap) || + if (((g_heaps[i]->current_generation_size (max_generation)) > bgc_min_per_heap) || + ((g_heaps[i]->current_generation_size (loh_generation)) > bgc_min_per_heap) || ((g_heaps[i]->current_generation_size (poh_generation)) > bgc_min_per_heap)) { bgc_heap_too_small = FALSE; @@ -15815,8 +15815,8 @@ int gc_heap::generation_to_condemn (int n_initial, } } #else //MULTIPLE_HEAPS - if ((current_generation_size (max_generation) > bgc_min_per_heap) || - (current_generation_size (loh_generation) > bgc_min_per_heap) || + if ((current_generation_size (max_generation) > bgc_min_per_heap) || + (current_generation_size (loh_generation) > bgc_min_per_heap) || (current_generation_size (poh_generation) > bgc_min_per_heap)) { bgc_heap_too_small = FALSE; @@ -16480,7 +16480,7 @@ void gc_heap::gc1() #endif // HOST_64BIT gc_data_global.final_youngest_desired = desired_per_heap; } -#if 1 //subsumed by the linear allocation model +#if 1 //subsumed by the linear allocation model if (gen >= uoh_start_generation) { // to avoid spikes in mem usage due to short terms fluctuations in survivorship, @@ -16798,7 +16798,7 @@ BOOL gc_heap::loh_allocated_for_no_gc() return FALSE; heap_segment* seg = generation_allocation_segment (generation_of (loh_generation)); - do + do { if (seg == saved_loh_segment_no_gc) { @@ -17793,8 +17793,8 @@ gc_heap* gc_heap::heap_of_gc (uint8_t* o) // will find all heap objects (large and small) // // Callers of this method need to guarantee the interior pointer is within the heap range. -// -// If you need it to be stricter, eg if you only want to find an object in ephemeral range, +// +// If you need it to be stricter, eg if you only want to find an object in ephemeral range, // you should make sure interior is within that range before calling this method. uint8_t* gc_heap::find_object (uint8_t* interior) { @@ -19414,7 +19414,7 @@ void gc_heap::background_process_mark_overflow_internal (int condemned_gen_numbe while (seg) { uint8_t* o = hp->background_first_overflow (min_add, seg, concurrent_p, small_object_segments); - + while ((o < hp->background_seg_end (seg, concurrent_p)) && (o <= max_add)) { dprintf (3, ("considering %Ix", (size_t)o)); @@ -19713,7 +19713,7 @@ size_t gc_heap::committed_size() for (int i = max_generation; i < total_generation_count; i++) { generation* gen = generation_of (i); - heap_segment* seg = heap_segment_rw (generation_start_segment (gen)); + heap_segment* seg = heap_segment_rw (generation_start_segment (gen)); while (seg) { @@ -21521,8 +21521,8 @@ BOOL gc_heap::plan_loh() heap_segment* seg = start_seg; uint8_t* o = generation_allocation_start (gen); - dprintf (1235, ("before GC LOH size: %Id, free list: %Id, free obj: %Id\n", - generation_size (loh_generation), + dprintf (1235, ("before GC LOH size: %Id, free list: %Id, free obj: %Id\n", + generation_size (loh_generation), generation_free_list_space (gen), generation_free_obj_space (gen))); @@ -21766,8 +21766,8 @@ void gc_heap::compact_loh() assert (loh_pinned_plug_que_empty_p()); - dprintf (1235, ("after GC LOH size: %Id, free list: %Id, free obj: %Id\n\n", - generation_size (loh_generation), + dprintf (1235, ("after GC LOH size: %Id, free list: %Id, free obj: %Id\n\n", + generation_size (loh_generation), generation_free_list_space (gen), generation_free_obj_space (gen))); } @@ -21822,8 +21822,8 @@ void gc_heap::relocate_in_loh_compact() } } - dprintf (1235, ("after GC LOH size: %Id, free list: %Id, free obj: %Id\n\n", - generation_size (loh_generation), + dprintf (1235, ("after GC LOH size: %Id, free list: %Id, free obj: %Id\n\n", + generation_size (loh_generation), generation_free_list_space (gen), generation_free_obj_space (gen))); } @@ -25994,7 +25994,7 @@ BOOL gc_heap::commit_mark_array_bgc_init() if (!(seg->flags & heap_segment_flags_ma_committed)) { // For ro segments they could always be only partially in range so we'd - // be calling this at the beginning of every BGC. We are not making this + // be calling this at the beginning of every BGC. We are not making this // more efficient right now - ro segments are currently only used by redhawk. if (heap_segment_read_only_p (seg)) { @@ -26026,7 +26026,7 @@ BOOL gc_heap::commit_mark_array_bgc_init() } else { - // For normal segments they are by design completely in range so just + // For normal segments they are by design completely in range so just // commit the whole mark array for each seg. if (commit_mark_array_by_seg (seg, mark_array)) { @@ -26655,9 +26655,9 @@ void gc_heap::background_mark_phase () gen0_bricks_cleared = FALSE; - dprintf (2, ("end of bgc mark: loh: %d, poh: %d, soh: %d", - generation_size (loh_generation), - generation_size (poh_generation), + dprintf (2, ("end of bgc mark: loh: %d, poh: %d, soh: %d", + generation_size (loh_generation), + generation_size (poh_generation), generation_sizes (generation_of (max_generation)))); for (int gen_idx = max_generation; gen_idx < total_generation_count; gen_idx++) @@ -26987,7 +26987,7 @@ void gc_heap::revisit_written_pages (BOOL concurrent_p, BOOL reset_only_p) if ((heap_segment_mem (seg) >= background_saved_lowest_address) || (heap_segment_reserved (seg) <= background_saved_highest_address)) { - dprintf (3, ("h%d: sseg: %Ix(-%Ix)", heap_number, + dprintf (3, ("h%d: sseg: %Ix(-%Ix)", heap_number, heap_segment_mem (seg), heap_segment_reserved (seg))); skip_seg_p = TRUE; } @@ -27003,7 +27003,7 @@ void gc_heap::revisit_written_pages (BOOL concurrent_p, BOOL reset_only_p) dprintf (3, ("h%d: reset only starting %Ix", heap_number, base_address)); } - dprintf (3, ("h%d: starting: %Ix, seg %Ix-%Ix", heap_number, base_address, + dprintf (3, ("h%d: starting: %Ix, seg %Ix-%Ix", heap_number, base_address, heap_segment_mem (seg), heap_segment_reserved (seg))); @@ -27051,7 +27051,7 @@ void gc_heap::revisit_written_pages (BOOL concurrent_p, BOOL reset_only_p) { total_dirtied_pages += bcount; - dprintf (3, ("Found %d pages [%Ix, %Ix[", + dprintf (3, ("Found %d pages [%Ix, %Ix[", bcount, (size_t)base_address, (size_t)high_address)); } @@ -27060,7 +27060,7 @@ void gc_heap::revisit_written_pages (BOOL concurrent_p, BOOL reset_only_p) for (unsigned i = 0; i < bcount; i++) { uint8_t* page = (uint8_t*)background_written_addresses[i]; - dprintf (3, ("looking at page %d at %Ix(h: %Ix)", i, + dprintf (3, ("looking at page %d at %Ix(h: %Ix)", i, (size_t)page, (size_t)high_address)); if (page < high_address) { @@ -27094,7 +27094,7 @@ void gc_heap::revisit_written_pages (BOOL concurrent_p, BOOL reset_only_p) } if (i < loh_generation) - { + { if (!reset_only_p) { dprintf (GTC_LOG, ("h%d: SOH: dp:%Id; mo: %Id", heap_number, total_dirtied_pages, total_marked_objects)); @@ -31441,8 +31441,8 @@ size_t gc_heap::desired_new_allocation (dynamic_data* dd, { size_t allocated = 0; size_t committed = uoh_committed_size (gen_number, &allocated); - dprintf (1, ("GC#%Id h%d, GMI: UOH budget, UOH commit %Id (obj %Id, frag %Id), total commit: %Id (recorded: %Id)", - (size_t)settings.gc_index, heap_number, + dprintf (1, ("GC#%Id h%d, GMI: UOH budget, UOH commit %Id (obj %Id, frag %Id), total commit: %Id (recorded: %Id)", + (size_t)settings.gc_index, heap_number, committed, allocated, dd_fragmentation (dynamic_data_of (gen_number)), get_total_committed_size(), (current_total_committed - current_total_committed_bookkeeping))); @@ -31854,7 +31854,7 @@ void gc_heap::trim_youngest_desired_low_memory() { if (g_low_memory_status) { - size_t committed_mem = committed_size(); + size_t committed_mem = committed_size(); dynamic_data* dd = dynamic_data_of (0); size_t current = dd_desired_allocation (dd); size_t candidate = max (Align ((committed_mem / 10), get_alignment_constant(FALSE)), dd_min_size (dd)); @@ -32765,8 +32765,8 @@ void gc_heap::generation_delete_heap_segment (generation* gen, { dprintf (3, ("Preparing empty large segment %Ix for deletion", (size_t)seg)); - // We cannot thread segs in here onto freeable_uoh_segment because - // grow_brick_card_tables could be committing mark array which needs to read + // We cannot thread segs in here onto freeable_uoh_segment because + // grow_brick_card_tables could be committing mark array which needs to read // the seg list. So we delay it till next time we suspend EE. seg->flags |= heap_segment_flags_uoh_delete; // Since we will be decommitting the seg, we need to prevent heap verification @@ -33207,7 +33207,7 @@ void gc_heap::background_sweep() if (i == max_generation) { // start with saved ephemeral segment - // we are no longer holding gc_lock, so a new ephemeral segment could be added, we want the saved one. + // we are no longer holding gc_lock, so a new ephemeral segment could be added, we want the saved one. start_seg = saved_sweep_ephemeral_seg; prev_seg = heap_segment_next(start_seg); align_const = get_alignment_constant (TRUE); @@ -33395,12 +33395,12 @@ void gc_heap::background_sweep() generation_free_list_space (generation_of (max_generation)), generation_free_obj_space (generation_of (max_generation)))); - dprintf (GTC_LOG, ("h%d: end of bgc sweep: loh FL: %Id, FO: %Id", + dprintf (GTC_LOG, ("h%d: end of bgc sweep: loh FL: %Id, FO: %Id", heap_number, generation_free_list_space (generation_of (loh_generation)), generation_free_obj_space (generation_of (loh_generation)))); - dprintf (GTC_LOG, ("h%d: end of bgc sweep: poh FL: %Id, FO: %Id", + dprintf (GTC_LOG, ("h%d: end of bgc sweep: poh FL: %Id, FO: %Id", heap_number, generation_free_list_space (generation_of (poh_generation)), generation_free_obj_space (generation_of (poh_generation)))); @@ -33488,7 +33488,7 @@ void gc_heap::sweep_uoh_objects (int gen_num) dprintf (3, ("sweeping uoh objects")); - dprintf (3, ("seg: %Ix, [%Ix, %Ix[, starting from %Ix", + dprintf (3, ("seg: %Ix, [%Ix, %Ix[, starting from %Ix", (size_t)seg, (size_t)heap_segment_mem (seg), (size_t)heap_segment_allocated (seg), @@ -33649,8 +33649,8 @@ void gc_heap::mark_through_cards_for_uoh_objects (card_fn fn, size_t total_cards_cleared = 0; #ifdef FEATURE_CARD_MARKING_STEALING - VOLATILE(uint32_t)* chunk_index = (VOLATILE(uint32_t)*) &(gen_num == loh_generation ? - card_mark_chunk_index_loh : + VOLATILE(uint32_t)* chunk_index = (VOLATILE(uint32_t)*) &(gen_num == loh_generation ? + card_mark_chunk_index_loh : card_mark_chunk_index_poh); card_marking_enumerator card_mark_enumerator(seg, low, chunk_index); @@ -34235,7 +34235,7 @@ BOOL gc_heap::bgc_mark_array_range (heap_segment* seg, void gc_heap::bgc_verify_mark_array_cleared (heap_segment* seg) { #ifdef VERIFY_HEAP - if (gc_heap::background_running_p() && + if (gc_heap::background_running_p() && (GCConfig::GetHeapVerifyLevel() & GCConfig::HEAPVERIFY_GC)) { uint8_t* range_beg = 0; @@ -34378,7 +34378,7 @@ void gc_heap::clear_all_mark_array() void gc_heap::verify_mark_array_cleared() { #ifdef VERIFY_HEAP - if (gc_heap::background_running_p() && + if (gc_heap::background_running_p() && (GCConfig::GetHeapVerifyLevel() & GCConfig::HEAPVERIFY_GC)) { for (int i = max_generation; i < total_generation_count; i++) @@ -34568,7 +34568,7 @@ void gc_heap::verify_heap (BOOL begin_gc_p) { int heap_verify_level = static_cast(GCConfig::GetHeapVerifyLevel()); - + #ifdef MULTIPLE_HEAPS t_join* current_join = &gc_t_join; #ifdef BACKGROUND_GC @@ -38637,6 +38637,7 @@ void PopulateDacVars(GcDacVars *gcDacVars) gcDacVars->build_variant = &g_build_variant; gcDacVars->gc_structures_invalid_cnt = const_cast(&GCScan::m_GcStructuresInvalidCnt); gcDacVars->generation_size = sizeof(generation); + gcDacVars->total_generation_count = total_generation_count; gcDacVars->max_gen = &g_max_generation; #ifndef MULTIPLE_HEAPS gcDacVars->mark_array = &gc_heap::mark_array; @@ -38667,7 +38668,6 @@ void PopulateDacVars(GcDacVars *gcDacVars) gcDacVars->n_heaps = &gc_heap::n_heaps; gcDacVars->g_heaps = reinterpret_cast(&gc_heap::g_heaps); #endif // MULTIPLE_HEAPS - gcDacVars->total_generation_count = total_generation_count; #else UNREFERENCED_PARAMETER(gcDacVars); #endif // DACCESS_COMPILE From 876d3b5a3a17e0c89bb9d7e9e486e229d8a9f5a0 Mon Sep 17 00:00:00 2001 From: David Mason Date: Tue, 16 Jun 2020 17:51:38 -0700 Subject: [PATCH 5/7] comments --- src/coreclr/src/debug/daccess/request.cpp | 2 -- src/coreclr/src/gc/gcinterface.dac.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreclr/src/debug/daccess/request.cpp b/src/coreclr/src/debug/daccess/request.cpp index f5ab3a14b0a019..f5e362d108f715 100644 --- a/src/coreclr/src/debug/daccess/request.cpp +++ b/src/coreclr/src/debug/daccess/request.cpp @@ -4603,7 +4603,6 @@ HRESULT ClrDataAccess::GetGenerationTableSvr(CLRDATA_ADDRESS heapAddr, unsigned HRESULT hr = S_OK; #ifdef FEATURE_SVR_GC - // NUMBERGENERATIONS is hardcoded to the previous number of generations, doesn't account for POH unsigned int numGenerationTableEntries = (unsigned int)(g_gcDacGlobals->total_generation_count); if (pNeeded != NULL) { @@ -4648,7 +4647,6 @@ HRESULT ClrDataAccess::GetFinalizationFillPointersSvr(CLRDATA_ADDRESS heapAddr, HRESULT hr = S_OK; #ifdef FEATURE_SVR_GC - // NUMBERGENERATIONS is hardcoded to the previous number of generations, doesn't account for POH unsigned int numFillPointers = (unsigned int)(g_gcDacGlobals->total_generation_count + dac_finalize_queue::ExtraSegCount); if (pNeeded != NULL) { diff --git a/src/coreclr/src/gc/gcinterface.dac.h b/src/coreclr/src/gc/gcinterface.dac.h index 647e7456c0e877..0af0d4279c598c 100644 --- a/src/coreclr/src/gc/gcinterface.dac.h +++ b/src/coreclr/src/gc/gcinterface.dac.h @@ -18,6 +18,8 @@ #define MAX_GC_MECHANISM_BITS_COUNT 2 #define MAX_GLOBAL_GC_MECHANISMS_COUNT 6 +// The number of generations is hardcoded in to the dac APIS (DacpGcHeapDetails hard codes the size of its arrays) +// this cannot change #define NUMBERGENERATIONS 4 #define INITIAL_HANDLE_TABLE_ARRAY_SIZE 10 #define HANDLE_MAX_INTERNAL_TYPES 12 From 6d04246a1b1905d3e21bb359ce7195f74617d2ef Mon Sep 17 00:00:00 2001 From: David Mason Date: Wed, 17 Jun 2020 13:42:35 -0700 Subject: [PATCH 6/7] Update src/coreclr/src/gc/gcinterface.dac.h Co-authored-by: Noah Falk --- src/coreclr/src/gc/gcinterface.dac.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/coreclr/src/gc/gcinterface.dac.h b/src/coreclr/src/gc/gcinterface.dac.h index 0af0d4279c598c..aa99d6155f486e 100644 --- a/src/coreclr/src/gc/gcinterface.dac.h +++ b/src/coreclr/src/gc/gcinterface.dac.h @@ -19,7 +19,11 @@ #define MAX_GLOBAL_GC_MECHANISMS_COUNT 6 // The number of generations is hardcoded in to the dac APIS (DacpGcHeapDetails hard codes the size of its arrays) -// this cannot change +// The number of generations is hardcoded into some older dac APIS (for example DacpGcHeapDetails hard codes the size of its arrays) +// This value cannot change and should not be used in new DAC APIs. New APIs can query GcDacVars.total_generation_count +// variable which is dynamically initialized at runtime + + #define NUMBERGENERATIONS 4 #define INITIAL_HANDLE_TABLE_ARRAY_SIZE 10 #define HANDLE_MAX_INTERNAL_TYPES 12 From 94bcc23ba539209ab5b0869ac1514ef9cb2bebfb Mon Sep 17 00:00:00 2001 From: David Mason Date: Wed, 17 Jun 2020 13:51:07 -0700 Subject: [PATCH 7/7] add checks to see if gc structures exist --- src/coreclr/src/debug/daccess/request.cpp | 62 ++++++++++++++++------- 1 file changed, 43 insertions(+), 19 deletions(-) diff --git a/src/coreclr/src/debug/daccess/request.cpp b/src/coreclr/src/debug/daccess/request.cpp index f5e362d108f715..8bd396e4f32b73 100644 --- a/src/coreclr/src/debug/daccess/request.cpp +++ b/src/coreclr/src/debug/daccess/request.cpp @@ -4538,16 +4538,23 @@ HRESULT ClrDataAccess::GetGenerationTable(unsigned int cGenerations, struct Dacp } else { - for (unsigned int i = 0; i < numGenerationTableEntries; i++) + if (g_gcDacGlobals->generation_table.IsValid()) { - DPTR(dac_generation) generation = GenerationTableIndex(g_gcDacGlobals->generation_table, i); - pGenerationData[i].start_segment = (CLRDATA_ADDRESS) dac_cast(generation->start_segment); + for (unsigned int i = 0; i < numGenerationTableEntries; i++) + { + DPTR(dac_generation) generation = GenerationTableIndex(g_gcDacGlobals->generation_table, i); + pGenerationData[i].start_segment = (CLRDATA_ADDRESS) dac_cast(generation->start_segment); - pGenerationData[i].allocation_start = (CLRDATA_ADDRESS) generation->allocation_start; + pGenerationData[i].allocation_start = (CLRDATA_ADDRESS) generation->allocation_start; - DPTR(gc_alloc_context) alloc_context = dac_cast(generation) + offsetof(dac_generation, allocation_context); - pGenerationData[i].allocContextPtr = (CLRDATA_ADDRESS)alloc_context->alloc_ptr; - pGenerationData[i].allocContextLimit = (CLRDATA_ADDRESS)alloc_context->alloc_limit; + DPTR(gc_alloc_context) alloc_context = dac_cast(generation) + offsetof(dac_generation, allocation_context); + pGenerationData[i].allocContextPtr = (CLRDATA_ADDRESS)alloc_context->alloc_ptr; + pGenerationData[i].allocContextLimit = (CLRDATA_ADDRESS)alloc_context->alloc_limit; + } + } + else + { + hr = E_FAIL; } } @@ -4586,6 +4593,10 @@ HRESULT ClrDataAccess::GetFinalizationFillPointers(unsigned int cFillPointers, C pFinalizationFillPointers[i] = (CLRDATA_ADDRESS)*TableIndex(fillPointersTable, i, sizeof(uint8_t*)); } } + else + { + hr = E_FAIL; + } } SOSDacLeave(); @@ -4617,16 +4628,22 @@ HRESULT ClrDataAccess::GetGenerationTableSvr(CLRDATA_ADDRESS heapAddr, unsigned { DPTR(dac_gc_heap) pHeap = __DPtr(TO_TADDR(heapAddr)); - for (unsigned int i = 0; i < numGenerationTableEntries; ++i) + if (pHeap.IsValid()) { - DPTR(dac_generation) generation = ServerGenerationTableIndex(pHeap, i); - pGenerationData[i].start_segment = (CLRDATA_ADDRESS)dac_cast(generation->start_segment); - pGenerationData[i].allocation_start = (CLRDATA_ADDRESS)(ULONG_PTR)generation->allocation_start; - DPTR(gc_alloc_context) alloc_context = dac_cast(generation) + offsetof(dac_generation, allocation_context); - pGenerationData[i].allocContextPtr = (CLRDATA_ADDRESS)(ULONG_PTR) alloc_context->alloc_ptr; - pGenerationData[i].allocContextLimit = (CLRDATA_ADDRESS)(ULONG_PTR) alloc_context->alloc_limit; + for (unsigned int i = 0; i < numGenerationTableEntries; ++i) + { + DPTR(dac_generation) generation = ServerGenerationTableIndex(pHeap, i); + pGenerationData[i].start_segment = (CLRDATA_ADDRESS)dac_cast(generation->start_segment); + pGenerationData[i].allocation_start = (CLRDATA_ADDRESS)(ULONG_PTR)generation->allocation_start; + DPTR(gc_alloc_context) alloc_context = dac_cast(generation) + offsetof(dac_generation, allocation_context); + pGenerationData[i].allocContextPtr = (CLRDATA_ADDRESS)(ULONG_PTR) alloc_context->alloc_ptr; + pGenerationData[i].allocContextLimit = (CLRDATA_ADDRESS)(ULONG_PTR) alloc_context->alloc_limit; + } + } + else + { + hr = E_FAIL; } - } #else hr = E_NOTIMPL; @@ -4661,11 +4678,18 @@ HRESULT ClrDataAccess::GetFinalizationFillPointersSvr(CLRDATA_ADDRESS heapAddr, { DPTR(dac_gc_heap) pHeap = __DPtr(TO_TADDR(heapAddr)); - DPTR(dac_finalize_queue) fq = pHeap->finalize_queue; - DPTR(uint8_t*) pFillPointerArray= dac_cast(fq) + offsetof(dac_finalize_queue, m_FillPointers); - for (unsigned int i = 0; i < numFillPointers; ++i) + if (pHeap.IsValid()) { - pFinalizationFillPointers[i] = (CLRDATA_ADDRESS) pFillPointerArray[i]; + DPTR(dac_finalize_queue) fq = pHeap->finalize_queue; + DPTR(uint8_t*) pFillPointerArray= dac_cast(fq) + offsetof(dac_finalize_queue, m_FillPointers); + for (unsigned int i = 0; i < numFillPointers; ++i) + { + pFinalizationFillPointers[i] = (CLRDATA_ADDRESS) pFillPointerArray[i]; + } + } + else + { + hr = E_FAIL; } } #else