FunctionTailcall3 Function

Notifies the profiler that the currently executing function is about to perform a tail call to another function.


void __stdcall FunctionTailcall3 (FunctionOrRemappedID functionOrRemappedID);  


functionOrRemappedID [in] The identifier of the currently executing function that is about to make a tail call.


The FunctionTailcall3 callback function notifies the profiler as functions are being called. Use the ICorProfilerInfo3::SetEnterLeaveFunctionHooks3 method to register your implementation of this function.

The FunctionTailcall3 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 FunctionTailcall3 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 FunctionTailcall3 returns.

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


Platforms: See System Requirements.

Header: CorProf.idl

Library: CorGuids.lib

.NET Framework Versions: Available since 4

See also