This class manages a list and a stack of pointers to permanent strings.
The constructor initializes the buffers to empty pointers. It will be used by the Trace class called by ML_TRACE_IN macros on function entries to track the call stack and call list. Overflows especially of the list will occur and are included in class design; so the buffers have exactly of a size identical with index range of the stack pointer and the list pointer. Accepting overflows limits the stack size and the number of list entries; however, no checks for overflow etc. are necessary which permits maximum tracing performance.
- Parameters
-
INDEXTYPE | specifies the data type and indirectly the size of the stack and the list. Normally it should be MLuint8 or MLuint16 which then will result in 256 or 65536 stack and list entries. Other types are supported. WARNING: Tracing is currently not thread-safe for performance reasons. This means that it only works properly to use ML_TRACE_IN macros from the main thread. When calling functions that use ML_TRACE_IN macros from a different thread, this will mix-up the trace stack and list and the resulting stack and list may miss individual tracing items. It would be possible to support per-thread tracing by using thread local storage (TLS) in the future, but this involves a performance penalty. |
Definition at line 53 of file mlTrace.h.