![]() |
ATLAS Offline Software
|
#include <stddef.h>Go to the source code of this file.
Classes | |
| struct | StackHandle_ |
| Unique reference for a stack trace. More... | |
| struct | StackNode_ |
| Node used to store trace data. More... | |
| struct | StackCursor_ |
| Cursor object used to move between nodes of the tree. More... | |
Macros | |
| #define | STACK_ELEMENT_BEGIN_P(element) |
| Is the element pointed to by ELEMENT the first one in its node? | |
| #define | STACK_ELEMENT_NODE(element) |
| ELEMENT should be a pointer to the first element in a node. | |
| #define | STACK_ELEMENT_NODEPARENT(element) |
| ELEMENT should be a pointer to the first element in a node. | |
| #define | STACK_NODE_NTH_ELEMENT(node, n) |
| Return the Nth element stored in a node. | |
| #define | STACK_NODE_NTH_CHILD(node, n) |
| Return a pointer to the Nth child stored in a node. | |
| #define | STACK_ELEMENT_NONNULL(elt) |
| We can't store a null element in a trace; fold them to 1. | |
| #define | STACK_NODE_SET_ELEMENT(node, n, elt) |
| Set the Nth element stored in a node. | |
| #define | STACK_HANDLE_ELEMENT(handle) |
| Return a pointer to the first element in the handle's trace. | |
| #define | STACK_HANDLE_ADDR(handle) |
| Return the first element in the handle's trace. | |
| #define | STACK_HANDLE_PARENT(handle) |
| Return a pointer to the second in the handle's trace. | |
| #define | STACK_HANDLE_IS_ROOT(handle) |
| Test to see if a handle represents the root of the call tree. | |
| #define | STACK_ELEMENT_ADDR(element) |
| Given a pointer to an element, return the element. | |
| #define | STACK_ELEMENT_PARENT(element) |
| Given a pointer to an element, return a pointer to the element's parent. | |
| #define | STACK_ELEMENT_IS_ROOT(element) |
| Test if an element is the root of trace. | |
| #define | STACK_CURSOR_ELEMENT(cursor) |
| Return the address of the element referenced by the cursor. | |
| #define | STACK_CURSOR_ELEMENT_ADDR(cursor) |
| Return the element referenced by the cursor. | |
| #define | STACK_CURSOR_INIT_ROOT(cursor) |
| Initialize a cursor to point at the root of the tree. | |
| #define | STACK_CURSOR_INIT_HANDLE(cursor, handle) |
| Initialize a cursor from a handle. | |
| #define | STACK_CURSOR_IS_ROOT(cursor) |
| Does the cursor reference the root of the tree? | |
| #define | STACK_CURSOR_PARENT(cursor) |
| Move to the cursor to the parent node. | |
| #define | STACK_CURSOR_NCHILDREN(cursor) |
| Return the number of children. | |
| #define | STACK_CURSOR_CHILD(cursor, n) |
| Move to the cursor to the nth child. | |
| #define | STACK_CURSOR_NEXT(cursor) |
| Visit next element in depth-first order. | |
Typedefs | |
| typedef void * | StackElement |
| One element of a stack trace. | |
| typedef struct StackHandle_ | StackHandle |
| typedef struct StackNode_ | StackNode |
| typedef struct StackCursor_ | StackCursor |
Functions | |
| StackHandle * | hhh_stackstash_store (const StackElement *addresses, int n_addresses) |
| Return the handle for a stack trace. | |
| StackElement * | hhh_stack_element_parent (StackElement *elt) |
| Function interface to iterate over a trace. | |
| void | hhh_Cursor_initRoot (StackCursor *cursor) |
| Initialize a cursor to point at the root of the tree. | |
| void | hhh_Cursor_initHandle (StackCursor *cursor, StackHandle *handle) |
| Initialize a cursor from a handle. | |
| void | hhh_Cursor_parent (StackCursor *cursor) |
| Move to the cursor to the parent node. | |
| void | hhh_Cursor_child (StackCursor *cursor, int n) |
| Move to the cursor to the nth child. | |
| int | hhh_Cursor_nchildren (StackCursor *cursor) |
| Return the number of children. | |
| void | hhh_Cursor_next (StackCursor *cursor) |
| Visit next element in depth-first order. | |
| #define STACK_CURSOR_CHILD | ( | cursor, | |
| n ) |
Move to the cursor to the nth child.
Definition at line 252 of file stackstash.h.
| #define STACK_CURSOR_ELEMENT | ( | cursor | ) |
Return the address of the element referenced by the cursor.
Definition at line 231 of file stackstash.h.
| #define STACK_CURSOR_ELEMENT_ADDR | ( | cursor | ) |
Return the element referenced by the cursor.
Definition at line 234 of file stackstash.h.
| #define STACK_CURSOR_INIT_HANDLE | ( | cursor, | |
| handle ) |
Initialize a cursor from a handle.
Definition at line 240 of file stackstash.h.
| #define STACK_CURSOR_INIT_ROOT | ( | cursor | ) |
Initialize a cursor to point at the root of the tree.
Definition at line 237 of file stackstash.h.
| #define STACK_CURSOR_IS_ROOT | ( | cursor | ) |
Does the cursor reference the root of the tree?
Definition at line 243 of file stackstash.h.
| #define STACK_CURSOR_NCHILDREN | ( | cursor | ) |
Return the number of children.
Definition at line 249 of file stackstash.h.
| #define STACK_CURSOR_NEXT | ( | cursor | ) |
Visit next element in depth-first order.
Definition at line 255 of file stackstash.h.
| #define STACK_CURSOR_PARENT | ( | cursor | ) |
Move to the cursor to the parent node.
Definition at line 246 of file stackstash.h.
| #define STACK_ELEMENT_ADDR | ( | element | ) |
Given a pointer to an element, return the element.
Definition at line 217 of file stackstash.h.
| #define STACK_ELEMENT_BEGIN_P | ( | element | ) |
Is the element pointed to by ELEMENT the first one in its node?
Definition at line 164 of file stackstash.h.
| #define STACK_ELEMENT_IS_ROOT | ( | element | ) |
Test if an element is the root of trace.
Definition at line 224 of file stackstash.h.
| #define STACK_ELEMENT_NODE | ( | element | ) |
ELEMENT should be a pointer to the first element in a node.
Returns a pointer to the node itself.
Definition at line 168 of file stackstash.h.
| #define STACK_ELEMENT_NODEPARENT | ( | element | ) |
ELEMENT should be a pointer to the first element in a node.
Returns a pointer to the parent of this node.
Definition at line 173 of file stackstash.h.
| #define STACK_ELEMENT_NONNULL | ( | elt | ) |
We can't store a null element in a trace; fold them to 1.
Definition at line 183 of file stackstash.h.
| #define STACK_ELEMENT_PARENT | ( | element | ) |
Given a pointer to an element, return a pointer to the element's parent.
Gives 0 if element referred to the root.
Definition at line 221 of file stackstash.h.
| #define STACK_HANDLE_ADDR | ( | handle | ) |
Return the first element in the handle's trace.
Definition at line 201 of file stackstash.h.
| #define STACK_HANDLE_ELEMENT | ( | handle | ) |
Return a pointer to the first element in the handle's trace.
Definition at line 198 of file stackstash.h.
| #define STACK_HANDLE_IS_ROOT | ( | handle | ) |
Test to see if a handle represents the root of the call tree.
Definition at line 209 of file stackstash.h.
| #define STACK_HANDLE_PARENT | ( | handle | ) |
Return a pointer to the second in the handle's trace.
Definition at line 205 of file stackstash.h.
| #define STACK_NODE_NTH_CHILD | ( | node, | |
| n ) |
| #define STACK_NODE_NTH_ELEMENT | ( | node, | |
| n ) |
Return the Nth element stored in a node.
Definition at line 176 of file stackstash.h.
| #define STACK_NODE_SET_ELEMENT | ( | node, | |
| n, | |||
| elt ) |
Set the Nth element stored in a node.
Definition at line 186 of file stackstash.h.
| typedef struct StackCursor_ StackCursor |
Definition at line 114 of file stackstash.h.
| typedef void* StackElement |
One element of a stack trace.
Definition at line 74 of file stackstash.h.
| typedef struct StackHandle_ StackHandle |
Definition at line 86 of file stackstash.h.
| typedef struct StackNode_ StackNode |
Definition at line 102 of file stackstash.h.
| void hhh_Cursor_child | ( | StackCursor * | cursor, |
| int | n ) |
Move to the cursor to the nth child.
| void hhh_Cursor_initHandle | ( | StackCursor * | cursor, |
| StackHandle * | handle ) |
Initialize a cursor from a handle.
| void hhh_Cursor_initRoot | ( | StackCursor * | cursor | ) |
Initialize a cursor to point at the root of the tree.
| int hhh_Cursor_nchildren | ( | StackCursor * | cursor | ) |
Return the number of children.
| void hhh_Cursor_next | ( | StackCursor * | cursor | ) |
Visit next element in depth-first order.
| void hhh_Cursor_parent | ( | StackCursor * | cursor | ) |
Move to the cursor to the parent node.
| StackElement * hhh_stack_element_parent | ( | StackElement * | elt | ) |
Function interface to iterate over a trace.
| elt | Pointer to an element of a trace. |
Returns a pointer to the previous element of the trace (the caller). Returns 0 if we're at the root of the trace.
| StackHandle * hhh_stackstash_store | ( | const StackElement * | addresses, |
| int | n_addresses ) |
Return the handle for a stack trace.
| addresses | Stack trace to store. |
| n_addresses | Length of the trace. |
Returns the unique Handle object representing this trace. If this trace has been seen before, the existing Handle object will be returned; otherwise, a new Handle object will be made and returned.