summaryrefslogtreecommitdiff
path: root/src/inc/corprof.idl
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2016-12-27 16:46:08 +0900
committerJiyoung Yun <jy910.yun@samsung.com>2016-12-27 16:46:08 +0900
commitdb20f3f1bb8595633a7e16c8900fd401a453a6b5 (patch)
treee5435159cd1bf0519276363a6fe1663d1721bed3 /src/inc/corprof.idl
parent4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (diff)
downloadcoreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.gz
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.bz2
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.zip
Imported Upstream version 1.0.0.9127upstream/1.0.0.9127
Diffstat (limited to 'src/inc/corprof.idl')
-rw-r--r--src/inc/corprof.idl87
1 files changed, 87 insertions, 0 deletions
diff --git a/src/inc/corprof.idl b/src/inc/corprof.idl
index 4288897844..9af1cd97a8 100644
--- a/src/inc/corprof.idl
+++ b/src/inc/corprof.idl
@@ -60,6 +60,10 @@ cpp_quote("#endif")
typedef const BYTE *LPCBYTE;
typedef BYTE *LPBYTE;
+typedef BYTE COR_SIGNATURE;
+typedef COR_SIGNATURE* PCOR_SIGNATURE;
+typedef const COR_SIGNATURE* PCCOR_SIGNATURE;
+
#endif
@@ -2375,6 +2379,36 @@ interface ICorProfilerCallback7 : ICorProfilerCallback6
}
+[
+ object,
+ uuid(5BED9B15-C079-4D47-BFE2-215A140C07E0),
+ pointer_default(unique),
+ local
+]
+interface ICorProfilerCallback8 : ICorProfilerCallback7
+{
+ // This event is triggered whenever a dynamic method is jit compiled.
+ // These include various IL Stubs and LCG Methods.
+ // The goal is to provide profiler writers with enough information to identify
+ // it to users as beyond unknown code addresses.
+ // Note: FunctionID's provided here cannot be used to resolve to their metadata
+ // tokens since dynamic methods have no metadata.
+ //
+ // Documentation Note: pILHeader is only valid during the callback
+
+ HRESULT DynamicMethodJITCompilationStarted(
+ [in] FunctionID functionId,
+ [in] BOOL fIsSafeToBlock,
+ [in] LPCBYTE pILHeader,
+ [in] ULONG cbILHeader);
+
+ HRESULT DynamicMethodJITCompilationFinished(
+ [in] FunctionID functionId,
+ [in] HRESULT hrStatus,
+ [in] BOOL fIsSafeToBlock);
+}
+
+
/*
* COR_PRF_CODEGEN_FLAGS controls various flags and hooks for a specific
* method. A combination of COR_PRF_CODEGEN_FLAGS is provided by the
@@ -3781,6 +3815,59 @@ interface ICorProfilerInfo7 : ICorProfilerInfo6
};
+[
+ object,
+ uuid(C5AC80A6-782E-4716-8044-39598C60CFBF),
+ pointer_default(unique),
+ local
+]
+interface ICorProfilerInfo8 : ICorProfilerInfo7
+{
+ /*
+ * Determines if a function has associated metadata
+ *
+ * Certain methods like IL Stubs or LCG Methods do not have
+ * associated metadata that can be retrieved using the IMetaDataImport APIs.
+ *
+ * Such methods can be encountered by profilers through instruction pointers
+ * or by listening to ICorProfilerCallback::DynamicMethodJITCompilationStarted
+ *
+ * This API can be used to determine whether a FunctionID is dynamic.
+ */
+ HRESULT IsFunctionDynamic( [in] FunctionID functionId,
+ [out] BOOL *isDynamic);
+
+ /*
+ * Maps a managed code instruction pointer to a FunctionID.
+ *
+ * GetFunctionFromIP2 fails for dynamic methods, this method works for
+ * both dynamic and non-dynamic methods. It is a superset of GetFunctionFromIP2
+ */
+ HRESULT GetFunctionFromIP3([in] LPCBYTE ip,
+ [out] FunctionID *functionId,
+ [out] ReJITID * pReJitId);
+
+ /*
+ * Retrieves informaiton about dynamic methods
+ *
+ * Certain methods like IL Stubs or LCG do not have
+ * associated metadata that can be retrieved using the IMetaDataImport APIs.
+ *
+ * Such methods can be encountered by profilers through instruction pointers
+ * or by listening to ICorProfilerCallback::DynamicMethodJITCompilationStarted
+ *
+ * This API can be used to retrieve information about dynamic methods
+ * including a friendly name if available.
+ */
+ HRESULT GetDynamicFunctionInfo( [in] FunctionID functionId,
+ [out] ModuleID *moduleId,
+ [out] PCCOR_SIGNATURE *ppvSig,
+ [out] ULONG *pbSig,
+ [in] ULONG cchName,
+ [out] ULONG *pcchName,
+ [out] WCHAR wszName[]);
+};
+
/*
* This interface lets you iterate over methods in the runtime.
*/