次の方法で共有


ICorProfilerInfo3::SetEnterLeaveFunctionHooks3 メソッド

FunctionEnter3FunctionLeave3、および FunctionTailcall3 の各関数で呼び出されるプロファイラー実装関数を指定します。

HRESULT SetEnterLeaveFunctionHooks3(
            [in] FunctionEnter3    *pFuncEnter3,
            [in] FunctionLeave3    *pFuncLeave3,
            [in] FunctionTailcall3 *pFuncTailcall3);

パラメーター

  • pFuncEnter3
    [入力] FunctionEnter3 コールバックとして使用される実装へのポインター。

  • pFuncLeave3
    [入力] FunctionLeave3 コールバックとして使用される実装へのポインター。

  • pFuncTailcall3
    [入力] FunctionTailcall3 コールバックとして使用される実装へのポインター。

解説

FunctionEnter3FunctionLeave3、および FunctionTailcall3 の各フックには、スタック フレームと引数の検査は用意されていません。 この情報にアクセスするには、COR_PRF_ENABLE_FUNCTION_ARGS、COR_PRF_ENABLE_FUNCTION_RETVAL、および COR_PRF_ENABLE_FRAME_INFO の各フラグについて、すべてまたはいずれかを設定する必要があります。 プロファイラーはイベント フラグを設定するために ICorProfilerInfo::SetEventMask メソッドを使用できます。また、この関数の実装を登録するために ICorProfilerInfo3::SetEnterLeaveFunctionHooks3WithInfo メソッドを使用できます。

同時にアクティブ化できるのは 1 組のコールバックのみです。最新バージョンが優先されます。 したがって、プロファイラーが ICorProfilerInfo2::SetEnterLeaveFunctionHooks2 メソッド メソッドおよび SetEnterLeaveFunctionHooks3 メソッドの両方を呼び出すと、SetEnterLeaveFunctionHooks3 が使用されます。

SetEnterLeaveFunctionHooks3 メソッドを呼び出すことができるのは、プロファイラーの ICorProfilerCallback::Initialize コールバックだけです。

必要条件

プラットフォーム: 「.NET Framework システム要件」を参照

ヘッダー: CorProf.idl、CorProf.h

ライブラリ: CorGuids.lib

.NET Framework のバージョン: 4

参照

参照

SetEnterLeaveFunctionHooks3WithInfo

FunctionEnter3

FunctionLeave3

FunctionTailcall3

FunctionEnter3WithInfo

FunctionLeave3WithInfo

FunctionTailcall3WithInfo

ICorProfilerInfo3

その他の技術情報

グローバル静的関数のプロファイル

プロファイリングのインターフェイス

プロファイル (アンマネージ API リファレンス)