次の方法で共有


ICorProfilerInfo3::SetEnterLeaveFunctionHooks3WithInfo メソッド

更新 : 2010 年 10 月

マネージ関数の FunctionEnter3WithInfo フック、FunctionLeave3WithInfo フック、および FunctionTailcall3WithInfo フックで呼び出されるプロファイラー実装関数を指定します。

HRESULT SetEnterLeaveFunctionHooks3WithInfo(
            [in] FunctionEnter3WithInfo    *pFuncEnter3,
            [in] FunctionLeave3withInfo    *pFuncLeave3,
            [in] FunctionTailcall3WithInfo *pFuncTailcall3);

パラメーター

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

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

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

解説

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

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

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

必要条件

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

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

ライブラリ: CorGuids.lib

.NET Framework のバージョン: 4

参照

参照

SetEnterLeaveFunctionHooks3

FunctionEnter3

FunctionLeave3

FunctionTailcall3

FunctionEnter3WithInfo

FunctionLeave3WithInfo

FunctionTailcall3WithInfo

ICorProfilerInfo3 インターフェイス

その他の技術情報

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

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

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

履歴の変更

日付

履歴

理由

2010 年 10 月

構文と不適切なリンクを修正。

コンテンツ バグ修正