Sierra Toolkit Version of the Day
DiagTraceDetail

Classes

class  stk::diag::Tracespec
 Class Tracespec dissects file specification strings. It contains a single char const pointer to a function specification string. Accessor functions can dissect the function specification string and return various components of it. More...
class  stk::diag::Traceback
 Class Traceback is a stack of char constant pointers to function specifications which have been encounter by Traceback during exception stack unwind. More...
class  stk::diag::Traceback::Preserve
 Class Traceback::Preserve serves as a sentry for traceback stack preservation during additional extension and unwinding. More...
struct  stk::diag::Traceback::PrintCoverage
 Class PrintCoverage is a type holder class for printing the stack. More...
class  stk::diag::Trace
 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...
struct  stk::diag::Trace::TraceList
 Typedef TraceList declares the trace list data type. More...

Typedefs

typedef std::vector< const char * > stk::diag::TracebackStack
typedef const char * stk::diag::Traceback::Stack [STACK_SIZE]
 Stack type.
typedef const char *const stk::diag::Traceback::const_stack_iterator
 const iterator thru stack
typedef const char ** stk::diag::Traceback::stack_iterator
 iterator thru stack
typedef std::map< const char
*, int > 
stk::diag::Traceback::Coverage
 Typedef Coverage declares the function usage coverage data type.
typedef stk::diag::Traceback sierra::Diag::Traceback
typedef stk::diag::Trace sierra::Diag::Trace

Enumerations

enum  { STACK_SIZE = 2048 }
enum  { stk::diag::Trace::IN_TRACE_LIST = 0x01 }
 Enumeration to describe the trace back flags. More...

Functions

const char * stk::diag::Tracespec::getFunctionSpec () const
 Member function getFunctionSpec returns the function's name.
std::string stk::diag::Tracespec::getFunctionName () const
 Member function getFunctionName returns the function's name.
std::string stk::diag::Tracespec::getFunctionShortName () const
 Member function getFunctionName returns the function's name.
std::string stk::diag::Tracespec::getFunctionClass () const
 Member function getFunctionName returns the function's name.
std::string stk::diag::Tracespec::getFunctionNamespace () const
 Member function getFunctionName returns the function's name.
std::string stk::diag::Tracespec::getFunctionShortClass () const
 Member function getFunctionName returns the function's name.
 stk::diag::Traceback::Preserve::~Preserve ()
 Destroys a Preserve sentry which allows traceback stack.
 stk::diag::Traceback::Traceback (const char *function_spec)
 Creates a new Trace instance, resulting in the printing of the member function name and pushing the depth.
 stk::diag::Traceback::~Traceback ()
 Destroys a Traceback instance, resulting in the pushing of the function specification if unwinding the stack.
static TracebackStack stk::diag::Traceback::snapshot ()
static void stk::diag::Traceback::enableTracebackDisplay ()
 Member function enableTracebackDisplay enables the display of the traceback.
static void stk::diag::Traceback::disableTracebackDisplay ()
 Member function disableTracebackDisplay disables the display of the traceback.
static bool stk::diag::Traceback::displayTraceback ()
 Member function displayEnabled returns true if display of the tracback stack has been enabled.
static void stk::diag::Traceback::preserveStack ()
 Member function preserveStack increments the traceback stack preservation counter.
static void stk::diag::Traceback::releaseStack ()
 Member function releaseStack decrements the traceback stack preservation counter.
static void stk::diag::Traceback::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.
static bool stk::diag::Traceback::coverageEnabled ()
 Member function coverageEnabled returns true if coverage has been enabled.
static TracebackState stk::diag::Traceback::getTracebackState ()
 Member function getTracebackState returns the value of the traceback state.
static PrintCoverage stk::diag::Traceback::printCoverage ()
 Member function printCoverage creates a PrintCoverage type holder class which enables operator<< to put an coverage to an ostream.
static std::ostream & stk::diag::Traceback::printCoverage (std::ostream &os)
 Member function printCoverage ...
static std::string stk::diag::Traceback::printTraceback (const TracebackStack &traceback_stack)
 Member function printTraceback writes the traceback stack function specifications to the output stream os.
Writer & stk::diag::Traceback::verbose_print (Writer &dout) const
 Member function verbose_print dumps the function specification stack to the diagnostic writer.
 stk::diag::Trace::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.
 stk::diag::Trace::~Trace ()
 Destroys a Trace instance, resulting in the printing of the member function name and popping the diag_writer depth.
static ExtraFuncPtr stk::diag::Trace::setExtra (ExtraFuncPtr extra)
 Member function setExtra sets the extra function which is called during each trace construction and destrution. (Not implemented)
static void stk::diag::Trace::addTraceFunction (const std::string &function_prefix)
 Member function addTraceFunction adds a function prefix to the list of function prefixes search to enable tracing.
static void stk::diag::Trace::clearTraceFunctions ()
 Member function clearTraceFunctions removes all function prefixes from the function signature prefix list.
Writer & stk::diag::Trace::verbose_print (Writer &dout) const
 Member function dump writes the trace to the specified Writer.
Writer & stk::diag::operator<< (Writer &dout, const Trace &diag_trace)
 Member function operator<< writes the trace data to the diagnostic writer.
std::ostream & stk::diag::operator<< (std::ostream &os, const Traceback::PrintCoverage &)
 Member function operator<< writes the coverage to the output stream.

Variables

const char * stk::diag::Tracespec::m_functionSpec
 The member function specification.

Typedef Documentation

typedef std::map<const char *, int> stk::diag::Traceback::Coverage

Typedef Coverage declares the function usage coverage data type.

NOTE: This does really want to use const char * as the key. I know, things could move, but the definition of a function spec is that it is a string literal only. So, let it go.

Definition at line 129 of file stk_util/stk_util/diag/Trace.hpp.


Enumeration Type Documentation

anonymous enum

Enumeration to describe the trace back flags.

Enumerator:
IN_TRACE_LIST 

Tracing enabled by this function.

Definition at line 380 of file stk_util/stk_util/diag/Trace.hpp.


Function Documentation

const char* stk::diag::Tracespec::getFunctionSpec ( ) const [inline]

Member function getFunctionSpec returns the function's name.

Returns:
a char const pointer to the function's name.

Definition at line 50 of file stk_util/stk_util/diag/Trace.hpp.

std::string stk::diag::Tracespec::getFunctionName ( ) const

Member function getFunctionName returns the function's name.

Returns:
a char const pointer to the function's name.

Definition at line 255 of file stk_util/stk_util/diag/Trace.cpp.

std::string stk::diag::Tracespec::getFunctionShortName ( ) const

Member function getFunctionName returns the function's name.

Returns:
a char const pointer to the function's name.

Definition at line 269 of file stk_util/stk_util/diag/Trace.cpp.

std::string stk::diag::Tracespec::getFunctionClass ( ) const

Member function getFunctionName returns the function's name.

Returns:
a char const pointer to the function's name.

Definition at line 227 of file stk_util/stk_util/diag/Trace.cpp.

std::string stk::diag::Tracespec::getFunctionNamespace ( ) const

Member function getFunctionName returns the function's name.

Returns:
a char const pointer to the function's name.

Definition at line 213 of file stk_util/stk_util/diag/Trace.cpp.

std::string stk::diag::Tracespec::getFunctionShortClass ( ) const

Member function getFunctionName returns the function's name.

Returns:
a char const pointer to the function's name.

Definition at line 241 of file stk_util/stk_util/diag/Trace.cpp.

stk::diag::Traceback::Traceback ( const char *  function_spec) [inline, explicit]

Creates a new Trace instance, resulting in the printing of the member function name and pushing the depth.

Parameters:
function_speca char variable ...

Definition at line 163 of file stk_util/stk_util/diag/Trace.hpp.

static bool stk::diag::Traceback::displayTraceback ( ) [inline, static]

Member function displayEnabled returns true if display of the tracback stack has been enabled.

Returns:
a bool value of true if trackback display has been enabled.

Definition at line 222 of file stk_util/stk_util/diag/Trace.hpp.

static void stk::diag::Traceback::enableCoverage ( bool  coverage_enabled = true) [inline, static]

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.

Parameters:
coverage_enableda bool value to set the coverage enabled flag.

Definition at line 253 of file stk_util/stk_util/diag/Trace.hpp.

static bool stk::diag::Traceback::coverageEnabled ( ) [inline, static]

Member function coverageEnabled returns true if coverage has been enabled.

Returns:
a bool value of true if coverage has been enabled.

Definition at line 264 of file stk_util/stk_util/diag/Trace.hpp.

static TracebackState stk::diag::Traceback::getTracebackState ( ) [inline, static]

Member function getTracebackState returns the value of the traceback state.

Returns:
an int ...

Definition at line 274 of file stk_util/stk_util/diag/Trace.hpp.

static PrintCoverage stk::diag::Traceback::printCoverage ( ) [inline, static]

Member function printCoverage creates a PrintCoverage type holder class which enables operator<< to put an coverage to an ostream.

Returns:
a PrintCoverage object.

Definition at line 292 of file stk_util/stk_util/diag/Trace.hpp.

std::ostream & stk::diag::Traceback::printCoverage ( std::ostream &  os) [static]

Member function printCoverage ...

Parameters:
osa std::ostream variable ...
Returns:
a std::ostream ...

Definition at line 382 of file stk_util/stk_util/diag/Trace.cpp.

std::string stk::diag::Traceback::printTraceback ( const TracebackStack &  traceback_stack) [static]

Member function printTraceback writes the traceback stack function specifications to the output stream os.

Parameters:
osa std::ostream reference to the output stream to write to.
Returns:
a std::ostream reference to the output stream.

Definition at line 367 of file stk_util/stk_util/diag/Trace.cpp.

Writer& stk::diag::Traceback::verbose_print ( Writer dout) const

Member function verbose_print dumps the function specification stack to the diagnostic writer.

Parameters:
douta Writer reference to the diagnostic writer to write to.
Returns:
a Writer reference to the diagnostic writer.

Reimplemented in stk::diag::Trace.

stk::diag::Trace::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.

Parameters:
douta Writer reference to the diagnostic writer to send trace messages to.
function_namea char const pointer to the function specification. THIS POINTER MUST CONTINUE TO EXIST.
print_maskan int value of the diagnostic writer print mask to enable tracing.
do_tracea bool that provide an extra dynamic means of turning off tracing.

Definition at line 289 of file stk_util/stk_util/diag/Trace.cpp.

static ExtraFuncPtr stk::diag::Trace::setExtra ( ExtraFuncPtr  extra) [inline, static]

Member function setExtra sets the extra function which is called during each trace construction and destrution. (Not implemented)

Parameters:
extraan ExtraFuncPtr to the new extra function.
Returns:
an ExtraFuncPtr to the previous extra function.

Definition at line 419 of file stk_util/stk_util/diag/Trace.hpp.

static void stk::diag::Trace::addTraceFunction ( const std::string &  function_prefix) [inline, static]

Member function addTraceFunction adds a function prefix to the list of function prefixes search to enable tracing.

Parameters:
function_prefixa std::string const reference to the function signature prefix.

Definition at line 432 of file stk_util/stk_util/diag/Trace.hpp.

Writer & stk::diag::Trace::verbose_print ( Writer dout) const

Member function dump writes the trace to the specified Writer.

Parameters:
douta Writer variable reference to write the trace to.
Returns:
a Writer reference to <it>Writer</it>.

Reimplemented from stk::diag::Traceback.

Definition at line 341 of file stk_util/stk_util/diag/Trace.cpp.

Writer& stk::diag::operator<< ( Writer &  dout,
const Trace &  diag_trace 
) [inline]

Member function operator<< writes the trace data to the diagnostic writer.

Parameters:
douta Writer reference to the diagnostic writer to write to.
diag_tracea Trace const reference to the trace object to write.
Returns:
a Writer reference to the diagnostic writer.

Definition at line 486 of file stk_util/stk_util/diag/Trace.hpp.

std::ostream& stk::diag::operator<< ( std::ostream &  os,
const Traceback::PrintCoverage &   
) [inline]

Member function operator<< writes the coverage to the output stream.

Parameters:
osa std::ostream reference to the output stream to write to.
print_coveragea Coverage const reference to the coverage to write.
Returns:
a std::ostream reference to the output stream.

Definition at line 503 of file stk_util/stk_util/diag/Trace.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines