6 #include <stk_util/diag/WriterParser.hpp> 7 #include <stk_util/diag/Trace.hpp> 8 #include <stk_util/diag/Writer_fwd.hpp> 17 mask(
"coverage", 0,
"Collect and display traceable function usage coverage");
18 mask(
"members", LOG_MEMBERS,
"Display data structure members messages");
19 mask(
"trace", LOG_TRACE,
"Display execution trace");
20 mask(
"trace-stats", LOG_TRACE_STATS,
"Display execution time and memory usage during trace");
21 mask(
"trace-down", LOG_TRACE_SUB_CALLS,
"Display subsequent calls after tracing is enabled");
27 const char * mask_string)
const 36 const std::string & name,
37 const std::string & arg)
const 39 if (name ==
"trace") {
42 std::string::const_iterator it0 = arg.begin();
43 std::string::const_iterator it1;
44 std::string::const_iterator it2;
47 while (it0 != arg.end() && *it0 ==
' ')
54 for (it1 = it0; it1 != arg.end(); ++it1) {
59 else if (*it1 ==
',' && paren_count == 0)
66 while (it2 != it0 && *(it2 - 1) ==
' ')
69 std::string
function(it0, it2);
74 }
while (it1 != arg.end());
80 else if (name ==
"coverage") {
91 std::istringstream mask_hex_stream(name.c_str());
_resetiosflags resetiosflags(std::ios_base::fmtflags flags)
Function resetiosflags clears the ios flags as a manipulator.
static void addTraceFunction(const std::string &function_prefix)
Member function addTraceFunction adds a function prefix to the list of function prefixes search to en...
OptionMaskNameMap m_optionMaskNameMap
Mask name vector.
virtual void parseArg(const std::string &name, const std::string &arg) const
Member function parseArg parses the argument and its argument values.
void mask(const std::string &name, const Mask l_mask, const std::string &description)
OptionMask m_optionMask
Most recently parsed mask.
WriterParser()
Creates a new WriterParser instance containing the lowerest level PrintMask names.
virtual Mask parse(const char *mask) const
bool m_status
Result of most recent parse.
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.
OptionMask Mask
Mask for this option.
Mask parse(const char *mask_string) const
Member function parse returns the mask which results from parsing the mask_string.