Share via


FunctionLeave3 Function

Notifies the profiler that control is being returned from a function.

void __stdcall FunctionLeave3(FunctionOrRemappedID functionOrRemappedID);

Parameters

  • functionOrRemappedID
    [in] The identifier of the function from which control is returned.

Remarks

The FunctionLeave3 callback function notifies the profiler as functions are being called, but does not support return value inspection. Use the ICorProfilerInfo3::SetEnterLeaveFunctionHooks3 method to register your implementation of this function.

The FunctionLeave3 function is a callback; you must implement it. The implementation must use the __declspec(naked) storage-class attribute.

The execution engine does not save any registers before calling this function.

  • On entry, you must save all registers that you use, including those in the floating-point unit (FPU).

  • On exit, you must restore the stack by popping off all the parameters that were pushed by its caller.

The implementation of FunctionLeave3 should not block, because it will delay garbage collection. The implementation should not attempt a garbage collection, because the stack may not be in a garbage collection-friendly state. If a garbage collection is attempted, the runtime will block until FunctionLeave3 returns.

The FunctionLeave3 function must not call into managed code or cause a managed memory allocation in any way.

Requirements

Platforms: See .NET Framework System Requirements.

Header: CorProf.idl

Library: CorGuids.lib

.NET Framework Versions: 4

See Also

Reference

FunctionEnter3

FunctionTailcall3

FunctionEnter3WithInfo

FunctionLeave3WithInfo

FunctionTailcall3WithInfo

SetEnterLeaveFunctionHooks3

SetEnterLeaveFunctionHooks3WithInfo

SetFunctionIDMapper

SetFunctionIDMapper2

Other Resources

Profiling Global Static Functions