[1166] | 1 | cpp_quote("/**")
|
---|
| 2 | cpp_quote(" * This file is part of the mingw-w64 runtime package.")
|
---|
| 3 | cpp_quote(" * No warranty is given; refer to the file DISCLAIMER within this package.")
|
---|
| 4 | cpp_quote(" */")
|
---|
| 5 | cpp_quote("")
|
---|
| 6 | cpp_quote("#include <winapifamily.h>")
|
---|
| 7 | cpp_quote("")
|
---|
| 8 | cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
|
---|
| 9 | cpp_quote("")
|
---|
| 10 | cpp_quote("const HRESULT ACTIVPROF_E_PROFILER_PRESENT = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0200);")
|
---|
| 11 | cpp_quote("const HRESULT ACTIVPROF_E_PROFILER_ABSENT = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0201);")
|
---|
| 12 | cpp_quote("const HRESULT ACTIVPROF_E_UNABLE_TO_APPLY_ACTION = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0202);")
|
---|
| 13 | cpp_quote("const ULONG PROFILER_HEAP_OBJECT_NAME_ID_UNAVAILABLE=(ULONG)-1;")
|
---|
| 14 | cpp_quote("")
|
---|
| 15 | cpp_quote("#ifndef __ActivProf_h")
|
---|
| 16 | cpp_quote("#define __ActivProf_h")
|
---|
| 17 | cpp_quote("")
|
---|
| 18 |
|
---|
| 19 | import "unknwn.idl";
|
---|
| 20 |
|
---|
| 21 | cpp_quote("")
|
---|
| 22 | cpp_quote("#ifndef _NO_SCRIPT_GUIDS")
|
---|
| 23 | cpp_quote("DEFINE_GUID(IID_IActiveScriptProfilerHeapEnum, 0x32e4694e, 0xd37, 0x419b, 0xb9, 0x3d, 0xfa, 0x20, 0xde, 0xd6, 0xe8, 0xea);")
|
---|
| 24 | cpp_quote("DEFINE_GUID(IID_IActiveScriptProfilerControl3, 0xb403015, 0xf381, 0x4023, 0xa5, 0xd0, 0x6f, 0xed, 0x7, 0x6d, 0xe7, 0x16);")
|
---|
| 25 | cpp_quote("#endif")
|
---|
| 26 |
|
---|
| 27 | cpp_quote("")
|
---|
| 28 | typedef enum {
|
---|
| 29 | PROFILER_SCRIPT_TYPE_USER,
|
---|
| 30 | PROFILER_SCRIPT_TYPE_DYNAMIC,
|
---|
| 31 | PROFILER_SCRIPT_TYPE_NATIVE,
|
---|
| 32 | PROFILER_SCRIPT_TYPE_DOM
|
---|
| 33 | } PROFILER_SCRIPT_TYPE;
|
---|
| 34 |
|
---|
| 35 | cpp_quote("")
|
---|
| 36 | typedef enum {
|
---|
| 37 | PROFILER_EVENT_MASK_TRACE_SCRIPT_FUNCTION_CALL = 0x00000001,
|
---|
| 38 | PROFILER_EVENT_MASK_TRACE_NATIVE_FUNCTION_CALL = 0x00000002,
|
---|
| 39 | PROFILER_EVENT_MASK_TRACE_DOM_FUNCTION_CALL = 0x00000004,
|
---|
| 40 | PROFILER_EVENT_MASK_TRACE_ALL = PROFILER_EVENT_MASK_TRACE_SCRIPT_FUNCTION_CALL |
|
---|
| 41 | PROFILER_EVENT_MASK_TRACE_NATIVE_FUNCTION_CALL,
|
---|
| 42 | PROFILER_EVENT_MASK_TRACE_ALL_WITH_DOM = PROFILER_EVENT_MASK_TRACE_ALL |
|
---|
| 43 | PROFILER_EVENT_MASK_TRACE_DOM_FUNCTION_CALL
|
---|
| 44 | } PROFILER_EVENT_MASK;
|
---|
| 45 |
|
---|
| 46 | cpp_quote("")
|
---|
| 47 | typedef LONG PROFILER_TOKEN;
|
---|
| 48 |
|
---|
| 49 | cpp_quote("")
|
---|
| 50 | [object, uuid (784b5ff0-69b0-47d1-a7dc-2518f4230e90), pointer_default (unique)]
|
---|
| 51 | interface IActiveScriptProfilerControl : IUnknown {
|
---|
| 52 | HRESULT StartProfiling ([in] REFCLSID clsidProfilerObject,[in] DWORD dwEventMask,[in] DWORD dwContext);
|
---|
| 53 | HRESULT SetProfilerEventMask ([in] DWORD dwEventMask);
|
---|
| 54 | HRESULT StopProfiling ([in] HRESULT hrShutdownReason);
|
---|
| 55 | }
|
---|
| 56 |
|
---|
| 57 | cpp_quote("")
|
---|
| 58 | [object, uuid (47810165-498f-40be-94f1-653557e9e7da), pointer_default (unique)]
|
---|
| 59 | interface IActiveScriptProfilerControl2 : IActiveScriptProfilerControl {
|
---|
| 60 | HRESULT CompleteProfilerStart ();
|
---|
| 61 | HRESULT PrepareProfilerStop ();
|
---|
| 62 | }
|
---|
| 63 |
|
---|
| 64 | cpp_quote("")
|
---|
| 65 | typedef DWORD_PTR PROFILER_HEAP_OBJECT_ID;
|
---|
| 66 | typedef UINT PROFILER_HEAP_OBJECT_NAME_ID;
|
---|
| 67 | typedef void *PROFILER_EXTERNAL_OBJECT_ADDRESS;
|
---|
| 68 |
|
---|
| 69 | cpp_quote("")
|
---|
| 70 | typedef [v1_enum] enum {
|
---|
| 71 | PROFILER_HEAP_OBJECT_FLAGS_NEW_OBJECT = 0x00000001,
|
---|
| 72 | PROFILER_HEAP_OBJECT_FLAGS_IS_ROOT = 0x00000002,
|
---|
| 73 | PROFILER_HEAP_OBJECT_FLAGS_SITE_CLOSED = 0x00000004,
|
---|
| 74 | PROFILER_HEAP_OBJECT_FLAGS_EXTERNAL = 0x00000008,
|
---|
| 75 | PROFILER_HEAP_OBJECT_FLAGS_EXTERNAL_UNKNOWN = 0x00000010,
|
---|
| 76 | PROFILER_HEAP_OBJECT_FLAGS_EXTERNAL_DISPATCH = 0x00000020,
|
---|
| 77 | PROFILER_HEAP_OBJECT_FLAGS_SIZE_APPROXIMATE = 0x00000040,
|
---|
| 78 | PROFILER_HEAP_OBJECT_FLAGS_SIZE_UNAVAILABLE = 0x00000080,
|
---|
| 79 | PROFILER_HEAP_OBJECT_FLAGS_NEW_STATE_UNAVAILABLE = 0x00000100,
|
---|
| 80 | PROFILER_HEAP_OBJECT_FLAGS_WINRT_INSTANCE = 0x00000200,
|
---|
| 81 | PROFILER_HEAP_OBJECT_FLAGS_WINRT_RUNTIMECLASS = 0x00000400,
|
---|
| 82 | PROFILER_HEAP_OBJECT_FLAGS_WINRT_DELEGATE = 0x00000800,
|
---|
| 83 | PROFILER_HEAP_OBJECT_FLAGS_WINRT_NAMESPACE = 0x00001000,
|
---|
| 84 | } PROFILER_HEAP_OBJECT_FLAGS;
|
---|
| 85 |
|
---|
| 86 | cpp_quote("")
|
---|
| 87 | typedef [v1_enum] enum {
|
---|
| 88 | PROFILER_HEAP_OBJECT_OPTIONAL_INFO_PROTOTYPE = 0x00000001,
|
---|
| 89 | PROFILER_HEAP_OBJECT_OPTIONAL_INFO_FUNCTION_NAME = 0x00000002,
|
---|
| 90 | PROFILER_HEAP_OBJECT_OPTIONAL_INFO_SCOPE_LIST = 0x00000003,
|
---|
| 91 | PROFILER_HEAP_OBJECT_OPTIONAL_INFO_INTERNAL_PROPERTY = 0x00000004,
|
---|
| 92 | PROFILER_HEAP_OBJECT_OPTIONAL_INFO_NAME_PROPERTIES = 0x00000005,
|
---|
| 93 | PROFILER_HEAP_OBJECT_OPTIONAL_INFO_INDEX_PROPERTIES = 0x00000006,
|
---|
| 94 | PROFILER_HEAP_OBJECT_OPTIONAL_INFO_ELEMENT_ATTRIBUTES_SIZE = 0x00000007,
|
---|
| 95 | PROFILER_HEAP_OBJECT_OPTIONAL_INFO_ELEMENT_TEXT_CHILDREN_SIZE = 0x00000008,
|
---|
| 96 | PROFILER_HEAP_OBJECT_OPTIONAL_INFO_RELATIONSHIPS = 0x00000009,
|
---|
| 97 | PROFILER_HEAP_OBJECT_OPTIONAL_INFO_WINRTEVENTS = 0x0000000a,
|
---|
| 98 | PROFILER_HEAP_OBJECT_OPTIONAL_INFO_MAX_VALUE = PROFILER_HEAP_OBJECT_OPTIONAL_INFO_WINRTEVENTS
|
---|
| 99 | } PROFILER_HEAP_OBJECT_OPTIONAL_INFO_TYPE;
|
---|
| 100 |
|
---|
| 101 | cpp_quote("")
|
---|
| 102 | typedef struct _PROFILER_HEAP_OBJECT_SCOPE_LIST {
|
---|
| 103 | UINT count;
|
---|
| 104 | [size_is (count)] PROFILER_HEAP_OBJECT_ID scopes[];
|
---|
| 105 | } PROFILER_HEAP_OBJECT_SCOPE_LIST;
|
---|
| 106 |
|
---|
| 107 | cpp_quote("")
|
---|
| 108 | typedef [v1_enum] enum {
|
---|
| 109 | PROFILER_PROPERTY_TYPE_NUMBER = 0x01,
|
---|
| 110 | PROFILER_PROPERTY_TYPE_STRING = 0x02,
|
---|
| 111 | PROFILER_PROPERTY_TYPE_HEAP_OBJECT = 0x03,
|
---|
| 112 | PROFILER_PROPERTY_TYPE_EXTERNAL_OBJECT = 0x04,
|
---|
| 113 | PROFILER_PROPERTY_TYPE_BSTR = 0x5,
|
---|
| 114 | } PROFILER_RELATIONSHIP_INFO;
|
---|
| 115 |
|
---|
| 116 | cpp_quote("")
|
---|
| 117 | typedef struct _PROFILER_HEAP_OBJECT_RELATIONSHIP {
|
---|
| 118 | PROFILER_HEAP_OBJECT_NAME_ID relationshipId;
|
---|
| 119 | PROFILER_RELATIONSHIP_INFO relationshipInfo;
|
---|
| 120 | [switch_type (PROFILER_RELATIONSHIP_INFO), switch_is (relationshipInfo)] union {
|
---|
| 121 | [case (PROFILER_PROPERTY_TYPE_NUMBER)] double numberValue;
|
---|
| 122 | [case (PROFILER_PROPERTY_TYPE_STRING)] LPCWSTR stringValue;
|
---|
| 123 | [case (PROFILER_PROPERTY_TYPE_BSTR)] BSTR bstrValue;
|
---|
| 124 | [case (PROFILER_PROPERTY_TYPE_HEAP_OBJECT)] PROFILER_HEAP_OBJECT_ID objectId;
|
---|
| 125 | [case (PROFILER_PROPERTY_TYPE_EXTERNAL_OBJECT)] PROFILER_EXTERNAL_OBJECT_ADDRESS externalObjectAddress;
|
---|
| 126 | };
|
---|
| 127 | } PROFILER_HEAP_OBJECT_RELATIONSHIP;
|
---|
| 128 |
|
---|
| 129 | cpp_quote("")
|
---|
| 130 | typedef struct _PROFILER_HEAP_OBJECT_RELATIONSHIP_LIST {
|
---|
| 131 | UINT count;
|
---|
| 132 | [size_is (count)] PROFILER_HEAP_OBJECT_RELATIONSHIP elements[];
|
---|
| 133 | } PROFILER_HEAP_OBJECT_RELATIONSHIP_LIST;
|
---|
| 134 |
|
---|
| 135 | cpp_quote("")
|
---|
| 136 | typedef struct _PROFILER_HEAP_OBJECT_OPTIONAL_INFO {
|
---|
| 137 | PROFILER_HEAP_OBJECT_OPTIONAL_INFO_TYPE infoType;
|
---|
| 138 | [switch_type (PROFILER_HEAP_OBJECT_OPTIONAL_INFO_TYPE), switch_is (infoType)] union {
|
---|
| 139 | [case (PROFILER_HEAP_OBJECT_OPTIONAL_INFO_PROTOTYPE)] PROFILER_HEAP_OBJECT_ID prototype;
|
---|
| 140 | [case (PROFILER_HEAP_OBJECT_OPTIONAL_INFO_FUNCTION_NAME)] LPCWSTR functionName;
|
---|
| 141 | [case (PROFILER_HEAP_OBJECT_OPTIONAL_INFO_ELEMENT_ATTRIBUTES_SIZE)] UINT elementAttributesSize;
|
---|
| 142 | [case (PROFILER_HEAP_OBJECT_OPTIONAL_INFO_ELEMENT_TEXT_CHILDREN_SIZE)] UINT elementTextChildrenSize;
|
---|
| 143 | [case (PROFILER_HEAP_OBJECT_OPTIONAL_INFO_SCOPE_LIST)] PROFILER_HEAP_OBJECT_SCOPE_LIST *scopeList;
|
---|
| 144 | [case (PROFILER_HEAP_OBJECT_OPTIONAL_INFO_INTERNAL_PROPERTY)] PROFILER_HEAP_OBJECT_RELATIONSHIP *internalProperty;
|
---|
| 145 | [case (PROFILER_HEAP_OBJECT_OPTIONAL_INFO_NAME_PROPERTIES)] PROFILER_HEAP_OBJECT_RELATIONSHIP_LIST *namePropertyList;
|
---|
| 146 | [case (PROFILER_HEAP_OBJECT_OPTIONAL_INFO_INDEX_PROPERTIES)] PROFILER_HEAP_OBJECT_RELATIONSHIP_LIST *indexPropertyList;
|
---|
| 147 | [case (PROFILER_HEAP_OBJECT_OPTIONAL_INFO_RELATIONSHIPS)] PROFILER_HEAP_OBJECT_RELATIONSHIP_LIST *relationshipList;
|
---|
| 148 | [case (PROFILER_HEAP_OBJECT_OPTIONAL_INFO_WINRTEVENTS)] PROFILER_HEAP_OBJECT_RELATIONSHIP_LIST *eventList;
|
---|
| 149 | };
|
---|
| 150 | } PROFILER_HEAP_OBJECT_OPTIONAL_INFO;
|
---|
| 151 |
|
---|
| 152 | cpp_quote("")
|
---|
| 153 | typedef struct _PROFILER_HEAP_OBJECT {
|
---|
| 154 | UINT size;
|
---|
| 155 | union {
|
---|
| 156 | PROFILER_HEAP_OBJECT_ID objectId;
|
---|
| 157 | PROFILER_EXTERNAL_OBJECT_ADDRESS externalObjectAddress;
|
---|
| 158 | };
|
---|
| 159 | PROFILER_HEAP_OBJECT_NAME_ID typeNameId;
|
---|
| 160 | ULONG flags;
|
---|
| 161 | USHORT unused;
|
---|
| 162 | USHORT optionalInfoCount;
|
---|
| 163 | } PROFILER_HEAP_OBJECT;
|
---|
| 164 |
|
---|
| 165 | cpp_quote("")
|
---|
| 166 | [object, uuid (32e4694e-0d37-419b-B93D-FA20DED6E8EA), local, pointer_default (unique)]
|
---|
| 167 | interface IActiveScriptProfilerHeapEnum : IUnknown {
|
---|
| 168 | HRESULT Next ([in] ULONG celt,[out, size_is (celt), length_is (*pceltFetched)] PROFILER_HEAP_OBJECT **heapObjects,[out] ULONG *pceltFetched);
|
---|
| 169 | HRESULT GetOptionalInfo ([in] PROFILER_HEAP_OBJECT *heapObject,[in] ULONG celt,[out, size_is (celt)] PROFILER_HEAP_OBJECT_OPTIONAL_INFO *optionalInfo);
|
---|
| 170 | HRESULT FreeObjectAndOptionalInfo ([in] ULONG celt,[in, size_is (celt)] PROFILER_HEAP_OBJECT **heapObjects);
|
---|
| 171 | HRESULT GetNameIdMap ([out, size_is (,*pcelt)] LPCWSTR *pNameList[],[out] UINT *pcelt);
|
---|
| 172 | };
|
---|
| 173 |
|
---|
| 174 | cpp_quote("")
|
---|
| 175 | [object, uuid (0b403015-F381-4023-A5D0-6fed076de716), pointer_default (unique)]
|
---|
| 176 | interface IActiveScriptProfilerControl3 : IActiveScriptProfilerControl2 {
|
---|
| 177 | HRESULT EnumHeap ([out] IActiveScriptProfilerHeapEnum **ppEnum);
|
---|
| 178 | }
|
---|
| 179 |
|
---|
| 180 | cpp_quote("")
|
---|
| 181 | [object, uuid (740eca23-7d9d-42e5-ba9d-f8b24b1c7a9b), pointer_default (unique)]
|
---|
| 182 | interface IActiveScriptProfilerCallback : IUnknown {
|
---|
| 183 | HRESULT Initialize ([in] DWORD dwContext);
|
---|
| 184 | HRESULT Shutdown ([in] HRESULT hrReason);
|
---|
| 185 | HRESULT ScriptCompiled ([in] PROFILER_TOKEN scriptId,[in] PROFILER_SCRIPT_TYPE type,[in] IUnknown *pIDebugDocumentContext);
|
---|
| 186 | HRESULT FunctionCompiled ([in] PROFILER_TOKEN functionId,[in] PROFILER_TOKEN scriptId,[in] [string] const WCHAR *pwszFunctionName,[in] [string] const WCHAR *pwszFunctionNameHint,[in] IUnknown *pIDebugDocumentContext);
|
---|
| 187 | HRESULT OnFunctionEnter ([in] PROFILER_TOKEN scriptId,[in] PROFILER_TOKEN functionId);
|
---|
| 188 | HRESULT OnFunctionExit ([in] PROFILER_TOKEN scriptId,[in] PROFILER_TOKEN functionId);
|
---|
| 189 | };
|
---|
| 190 |
|
---|
| 191 | cpp_quote("")
|
---|
| 192 | [object, uuid (31b7f8ad-A637-409c-B22F-040995b6103d), pointer_default (unique)]
|
---|
| 193 | interface IActiveScriptProfilerCallback2 : IActiveScriptProfilerCallback {
|
---|
| 194 | HRESULT OnFunctionEnterByName ([in] [string] const WCHAR *pwszFunctionName,[in] PROFILER_SCRIPT_TYPE type);
|
---|
| 195 | HRESULT OnFunctionExitByName ([in] [string] const WCHAR *pwszFunctionName,[in] PROFILER_SCRIPT_TYPE type);
|
---|
| 196 | };
|
---|
| 197 |
|
---|
| 198 | cpp_quote("")
|
---|
| 199 | [object, uuid (6ac5ad25-2037-4687-91df-b59979d93d73), pointer_default (unique)]
|
---|
| 200 | interface IActiveScriptProfilerCallback3 : IActiveScriptProfilerCallback2 {
|
---|
| 201 | HRESULT SetWebWorkerId ([in] DWORD webWorkerId);
|
---|
| 202 | };
|
---|
| 203 | cpp_quote("#endif")
|
---|
| 204 | cpp_quote("")
|
---|
| 205 | cpp_quote("#endif")
|
---|