Sierra Toolkit
Version of the Day
|
Class Trace serves as a sentry for entering routines. Creating a trace object prints the specified member function name to the specfied diag_writer and pushes the diag_writer depth. On destruction, it prints the member function name again and pops the depth. More...
#include <Trace.hpp>
Classes | |
struct | TraceList |
Typedef TraceList declares the trace list data type. More... | |
Public Types | |
enum | { IN_TRACE_LIST = 0x01 } |
Enumeration to describe the trace back flags. More... | |
typedef Writer &(* | ExtraFuncPtr) (Writer &) |
Typedef ExtraFuncPtr declares the extra function pointer signature. | |
![]() | |
enum | TracebackState { RUNNING, THROWING } |
Enumeration TracebackState lists the traceback execution states. More... | |
enum | { STACK_SIZE = 2048 } |
typedef const char * | Stack[STACK_SIZE] |
Stack type. | |
typedef const char *const * | const_stack_iterator |
const iterator thru stack | |
typedef const char ** | stack_iterator |
iterator thru stack | |
typedef std::map< const char *, int > | Coverage |
Typedef Coverage declares the function usage coverage data type. More... | |
Public Member Functions | |
Trace (Writer &dout, const char *function_name, int print_mask=LOG_TRACE, bool do_trace=true) | |
Creates a new Trace instance, resulting in the printing of the member function name and pushing the depth. More... | |
~Trace () | |
Destroys a Trace instance, resulting in the printing of the member function name and popping the diag_writer depth. | |
Writer & | verbose_print (Writer &dout) const |
Member function dump writes the trace to the specified Writer. More... | |
![]() | |
Traceback (const char *function_spec) | |
Creates a new Trace instance, resulting in the printing of the member function name and pushing the depth. More... | |
~Traceback () | |
Destroys a Traceback instance, resulting in the pushing of the function specification if unwinding the stack. | |
Writer & | verbose_print (Writer &dout) const |
Member function verbose_print dumps the function specification stack to the diagnostic writer. More... | |
![]() | |
Tracespec (const char *function_spec) | |
const char * | getFunctionSpec () const |
Member function getFunctionSpec returns the function's name. More... | |
std::string | getFunctionName () const |
Member function getFunctionName returns the function's name. More... | |
std::string | getFunctionShortName () const |
Member function getFunctionName returns the function's name. More... | |
std::string | getFunctionClass () const |
Member function getFunctionName returns the function's name. More... | |
std::string | getFunctionNamespace () const |
Member function getFunctionName returns the function's name. More... | |
std::string | getFunctionShortClass () const |
Member function getFunctionName returns the function's name. More... | |
Static Public Member Functions | |
static ExtraFuncPtr | setExtra (ExtraFuncPtr extra) |
Member function setExtra sets the extra function which is called during each trace construction and destrution. (Not implemented) More... | |
static void | addTraceFunction (const std::string &function_prefix) |
Member function addTraceFunction adds a function prefix to the list of function prefixes search to enable tracing. More... | |
static void | clearTraceFunctions () |
Member function clearTraceFunctions removes all function prefixes from the function signature prefix list. | |
![]() | |
static TracebackStack | snapshot () |
static void | enableTracebackDisplay () |
Member function enableTracebackDisplay enables the display of the traceback. | |
static void | disableTracebackDisplay () |
Member function disableTracebackDisplay disables the display of the traceback. | |
static bool | displayTraceback () |
Member function displayEnabled returns true if display of the tracback stack has been enabled. More... | |
static void | preserveStack () |
Member function preserveStack increments the traceback stack preservation counter. | |
static void | releaseStack () |
Member function releaseStack decrements the traceback stack preservation counter. | |
static void | enableCoverage (bool coverage_enabled=true) |
Member function enableCoverage enables the collection of function call coverage data. This is a very expensive operation, but allows function execution coverage data to be collected for testing. More... | |
static bool | coverageEnabled () |
Member function coverageEnabled returns true if coverage has been enabled. More... | |
static TracebackState | getTracebackState () |
Member function getTracebackState returns the value of the traceback state. More... | |
static PrintCoverage | printCoverage () |
Member function printCoverage creates a PrintCoverage type holder class which enables operator<< to put an coverage to an ostream. More... | |
static std::ostream & | printCoverage (std::ostream &os) |
Member function printCoverage ... More... | |
static std::string | printTraceback (const TracebackStack &traceback_stack) |
Member function printTraceback writes the traceback stack function specifications to the output stream os. More... | |
Additional Inherited Members | |
![]() | |
const char * | m_functionSpec |
The member function specification. | |
Class Trace serves as a sentry for entering routines. Creating a trace object prints the specified member function name to the specfied diag_writer and pushes the diag_writer depth. On destruction, it prints the member function name again and pops the depth.
A tracing depth feature has been incorporated into the Writer which enables diagnostic output only when tracing is activated using a specific
DiagTracingDetail
Definition at line 351 of file stk_util/stk_util/diag/Trace.hpp.