Freigeben über


FunctionLeave Function

Notifies the profiler that a function is about to return to the caller.

Note   The FunctionLeave function is deprecated in the .NET Framework 2.0. It will continue to work, but will incur a performance penalty. Use the FunctionLeave2 Function function instead.

void FunctionLeave (
    FunctionID funcID
);

Parameters

Parameter Description

funcID

[in] The identifier of the function that is returning.

Remarks

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

You must save all registers that you use, including those in the floating-point processing unit (FPU), because the execution engine does not save any registers prior to calling FunctionLeave.

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

Also, the FunctionLeave function must not call into managed code or in any way cause a managed memory allocation.

Requirements

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: CorProf.idl

Library: CorGuids.lib

.NET Framework Version: 1.1, 1.0

See Also

Reference

FunctionEnter2 Function
FunctionLeave2 Function
FunctionTailcall2 Function
ICorProfilerInfo2::SetEnterLeaveFunctionHooks2 Method

Other Resources

Profiling Global Static Functions