Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ICorProfilerInfo13 to support object handle creation/destruction/access #71257

Merged
merged 15 commits into from
Jul 16, 2022
Merged
30 changes: 30 additions & 0 deletions src/coreclr/inc/corprof.idl
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,15 @@ typedef struct
UINT32 reserved;
} COR_PRF_EVENT_DATA;

typedef enum _COR_PRF_HANDLE_TYPE
{
COR_PRF_HANDLE_TYPE_WEAK = 0x1,
COR_PRF_HANDLE_TYPE_STRONG = 0x2,
COR_PRF_HANDLE_TYPE_PINNED = 0x3,
} COR_PRF_HANDLE_TYPE;

typedef void** ObjectHandleID;

/* -------------------------------------------------------------------------- *
* Forward declarations
* -------------------------------------------------------------------------- */
Expand Down Expand Up @@ -4215,6 +4224,27 @@ interface ICorProfilerInfo12 : ICorProfilerInfo11
[in] LPCGUID pRelatedActivityId);
}

[
object,
uuid(6E6C7EE2-0701-4EC2-9D29-2E8733B66934),
pointer_default(unique),
local
]
interface ICorProfilerInfo13 : ICorProfilerInfo12
{
HRESULT CreateHandle(
[in] ObjectID object,
[in] COR_PRF_HANDLE_TYPE type,
[out] ObjectHandleID* pHandle);

HRESULT DestroyHandle(
[in] ObjectHandleID handle);

HRESULT GetObjectIDFromHandle(
[in] ObjectHandleID handle,
[out] ObjectID* pObject);
}

/*
* This interface lets you iterate over methods in the runtime.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/pal/prebuilt/idl/corprof_i.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ MIDL_DEFINE_GUID(IID, IID_ICorProfilerInfo11,0x06398876,0x8987,0x4154,0xB6,0x21,
MIDL_DEFINE_GUID(IID, IID_ICorProfilerInfo12,0x27b24ccd,0x1cb1,0x47c5,0x96,0xee,0x98,0x19,0x0d,0xc3,0x09,0x59);


MIDL_DEFINE_GUID(IID, IID_ICorProfilerInfo13,0x19C4179D,0xF92C,0x4D25,0x9F,0x20,0x5F,0xEB,0xFB,0xBD,0x29,0x78);
MIDL_DEFINE_GUID(IID, IID_ICorProfilerInfo13,0x6E6C7EE2,0x0701,0x4EC2,0x9D,0x29,0x2E,0x87,0x33,0xB6,0x69,0x34);


MIDL_DEFINE_GUID(IID, IID_ICorProfilerMethodEnum,0xFCCEE788,0x0088,0x454B,0xA8,0x11,0xC9,0x9F,0x29,0x8D,0x19,0x42);
Expand Down
Loading