folly::AsyncStackFrame

Represents a frame in an async stack trace.

Synopsis

Declared in <folly/tracing/AsyncStack.h>

struct AsyncStackFrame;

Member Functions

NameDescription
AsyncStackFrame [constructor]Constructors
~AsyncStackFrame [destructor]Destroys the async stack frame.
operator= Assignment operators
clear Resets this frame to its default, empty state.
getParentFrame Returns the parent frame of this frame.
getReturnAddress Returns the return address of this frame.
getStackRoot Get access to the current stack-root.
setParentFrame Sets the parent frame of this frame.
setReturnAddress Sets the return address of this frame.

Friends

NameDescription
folly::deactivateSuspendedLeafPop the dummy "leaf" frame off the stack to annotate the stack as having resumed.
folly::isSuspendedLeafActiveReturns whether the given leaf frame is currently an active suspended leaf.
folly::activateSuspendedLeafPush a dummy "leaf" frame into the stack to annotate the stack as "suspended".
folly::popAsyncStackFrameCalleePop the 'callee' frame off the stack, restoring the parent frame as the current frame.
folly::checkAsyncStackFrameIsActivePerform some consistency checks on the specified AsyncStackFrame, assuming that it is the currently active AsyncStackFrame.
folly::pushAsyncStackFrameCallerCalleePush the 'callee' frame onto the current thread's async stack, deactivating the 'caller' frame and setting up the 'caller' to be the parent-frame of the 'callee'.
folly::deactivateAsyncStackFrameDeactivate the specified AsyncStackFrame, clearing the current 'topFrame'.
folly::activateAsyncStackFrameActivate the specified AsyncStackFrame on the specified AsyncStackRoot, setting it as the current 'topFrame'.
folly::getDetachedRootAsyncStackFrameGet a pointer to a special frame that can be used as the root-frame for a chain of AsyncStackFrame that does not chain onto a normal call-stack.
folly::AsyncStackRootA stack-root represents the context of an event loop that is running some asynchronous work. The current async operation that is being executed by the event loop (if any) is pointed to by the 'topFrame'.

Non-Member Functions

NameDescription
getAsyncStackTraceFromInitialFrameGiven an initial AsyncStackFrame, this will write addresses with the return addresses of the frames in this async stack trace, up to maxAddresses written. This assumes addresses has maxAddresses allocated space available.