version 1.31, 2005/11/21 08:37:44
|
version 1.32, 2005/11/30 21:04:52
|
|
|
// Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) | // Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) |
// Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug#2498 | // Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug#2498 |
// Sean Keenan, Hewlett-Packard Company (sean.keenan@hp.com) | // Sean Keenan, Hewlett-Packard Company (sean.keenan@hp.com) |
|
// David Dillard, Symantec Corp. (david_dillard@symantec.com) |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
const Uint32 Tracer::_STRLEN_MAX_PID_TID = 20; | const Uint32 Tracer::_STRLEN_MAX_PID_TID = 20; |
| |
// Initialize public indicator of trace state | // Initialize public indicator of trace state |
Uint32 Tracer::_traceOn=0; |
Boolean Tracer::_traceOn = false; |
| |
//////////////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////////////// |
// Tracer constructor | // Tracer constructor |
|
|
// Single Instance of Tracer is maintained for each process. | // Single Instance of Tracer is maintained for each process. |
//////////////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////////////// |
Tracer::Tracer() | Tracer::Tracer() |
|
: _traceHandler(new TraceFileHandler()), |
|
_traceComponentMask(new Boolean[_NUM_COMPONENTS]), |
|
_traceLevelMask(0) |
{ | { |
// Initialize Trace File Handler |
|
_traceHandler.reset(new TraceFileHandler()); |
|
_traceLevelMask=0; |
|
_traceComponentMask.reset(new Boolean[_NUM_COMPONENTS]); |
|
|
|
// Initialize ComponentMask array to false | // Initialize ComponentMask array to false |
for (Uint32 index=0;index < _NUM_COMPONENTS; | for (Uint32 index=0;index < _NUM_COMPONENTS; |
(_traceComponentMask.get())[index++]=false); | (_traceComponentMask.get())[index++]=false); |
|
|
{ | { |
for (index=0; index < _NUM_COMPONENTS; | for (index=0; index < _NUM_COMPONENTS; |
(_getInstance()->_traceComponentMask.get())[index++] = true); | (_getInstance()->_traceComponentMask.get())[index++] = true); |
_traceOn = 1; |
_traceOn = true; |
return ; | return ; |
} | } |
| |
// initialise ComponentMask array to False | // initialise ComponentMask array to False |
for (index = 0;index < _NUM_COMPONENTS; | for (index = 0;index < _NUM_COMPONENTS; |
(_getInstance()->_traceComponentMask.get())[index++] = false); | (_getInstance()->_traceComponentMask.get())[index++] = false); |
_traceOn = 0; |
_traceOn = false; |
| |
// Append _COMPONENT_SEPARATOR to the end of the traceComponents | // Append _COMPONENT_SEPARATOR to the end of the traceComponents |
componentStr.append(_COMPONENT_SEPARATOR); | componentStr.append(_COMPONENT_SEPARATOR); |
|
|
componentName,TRACE_COMPONENT_LIST[index])) | componentName,TRACE_COMPONENT_LIST[index])) |
{ | { |
(_getInstance()->_traceComponentMask.get())[index]=true; | (_getInstance()->_traceComponentMask.get())[index]=true; |
_traceOn = 1; |
_traceOn = true; |
| |
// Found component, break from the loop | // Found component, break from the loop |
break; | break; |