Skip to content

Commit 7ea44a3

Browse files
mjsabbydavmason
authored andcommitted
Add EnumerateRefs API and remove GetObjectReferences (dotnet#24542)
1 parent 94d7827 commit 7ea44a3

File tree

4 files changed

+1905
-1957
lines changed

4 files changed

+1905
-1957
lines changed

src/inc/corprof.idl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,9 @@ typedef HRESULT __stdcall StackSnapshotCallback(
418418
BYTE context[],
419419
void *clientData);
420420

421+
/* Callback for each object reference */
422+
typedef BOOL STDMETHODCALLTYPE ObjectReferenceCallback(ObjectID root, ObjectID* reference, void *clientData);
423+
421424
typedef enum
422425
{
423426
// These flags represent classes of callback events
@@ -3946,8 +3949,8 @@ interface ICorProfilerInfo9 : ICorProfilerInfo8
39463949
]
39473950
interface ICorProfilerInfo10 : ICorProfilerInfo9
39483951
{
3949-
// Given an ObjectID, fetches all its object references and offsets (if any).
3950-
HRESULT GetObjectReferences(ObjectID objectId, ULONG32 cNumReferences, ULONG32 *pcNumReferences, ObjectID references[], SIZE_T offsets[]);
3952+
// Given an ObjectID, callback and clientData, enumerates each object reference (if any).
3953+
HRESULT EnumerateObjectReferences(ObjectID objectId, ObjectReferenceCallback callback, void* clientData);
39513954

39523955
// Given an ObjectID, determines whether it is in a read only segment.
39533956
HRESULT IsFrozenObject(ObjectID objectId, BOOL *pbFrozen);

0 commit comments

Comments
 (0)