Salome HOME
Traces
authorrahuel <rahuel@opencascade.com>
Fri, 10 Jun 2005 07:54:43 +0000 (07:54 +0000)
committerrahuel <rahuel@opencascade.com>
Fri, 10 Jun 2005 07:54:43 +0000 (07:54 +0000)
src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.cxx

index 0ed6762eb25cf89f5e8ad24d0271dc4a64c6258b..5b79d6bc0fd36b11a7bb07563063763a4e613817 100644 (file)
@@ -551,6 +551,7 @@ void GraphExecutor::FiniteStateMachine::PyLockReset() {
   }
 }
 
+#define PyFunctionTrace 0
 PyObject * GraphExecutor::FiniteStateMachine::PyFunction( const char * aPyFuncName ) {
   
   PyObject * RetVal = NULL ;
@@ -558,6 +559,7 @@ PyObject * GraphExecutor::FiniteStateMachine::PyFunction( const char * aPyFuncNa
   PyObject * PyFunctionMapped = _MapOfPyFunctions[ aPyFuncName ] ;
   if ( _GraphExecutingNumber > 1 && !PyObjRefIor ) {
     RetVal = PyFunctionMapped ;
+#if PyFunctionTrace
     MESSAGE( "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' ) --> " ) ;
     if ( RetVal ) {
       MESSAGE( RetVal << " ob_refcnt " << RetVal->ob_refcnt ) ;
@@ -565,9 +567,11 @@ PyObject * GraphExecutor::FiniteStateMachine::PyFunction( const char * aPyFuncNa
     else {
       MESSAGE( " NULL" ) ;
     }
+#endif
   }
   else {
     RetVal = PyFunctionMapped ;
+#if PyFunctionTrace
     MESSAGE( "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' ) --> " ) ;
     if ( RetVal && PyObjRefIor ) {
       MESSAGE( RetVal << " " << RetVal->ob_refcnt ) ;
@@ -578,6 +582,7 @@ PyObject * GraphExecutor::FiniteStateMachine::PyFunction( const char * aPyFuncNa
     else {
       MESSAGE( " NULL" ) ;
     }
+#endif
   }
   
   return RetVal ;
@@ -587,15 +592,19 @@ bool GraphExecutor::FiniteStateMachine::PyFunction( const char * aPyFuncName , P
   
   bool RetVal = false ;
   if ( _MapOfPyFunctions[ aPyFuncName ] != NULL ) {
+#if PyFunctionTrace
     PyObject * aPyFunc = _MapOfPyFunctions[ aPyFuncName ] ;
     MESSAGE( "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' , aPyFunction "
              << aPyFunction << " ) ob_refcnt " << aPyFunction->ob_refcnt << " already mapped : "
              << aPyFunc << " ob_refcnt " << aPyFunc->ob_refcnt ) ;
+#endif
   }
   else {
     _MapOfPyFunctions[ aPyFuncName ] = aPyFunction ;
+#if PyFunctionTrace
     MESSAGE( "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' ) " << aPyFunction
              << " ) ob_refcnt " << aPyFunction->ob_refcnt << " mapped" ) ;
+#endif
     RetVal = true ;
   }
   
@@ -604,7 +613,9 @@ bool GraphExecutor::FiniteStateMachine::PyFunction( const char * aPyFuncName , P
 
 bool GraphExecutor::FiniteStateMachine::ErasePyFunction( const char * aPyFuncName ) {
   
+#if PyFunctionTrace
   MESSAGE( "GraphExecutor::FiniteStateMachine::ErasePyFunction( '" << aPyFuncName << "' )" ) ;
+#endif
   if ( _MapOfPyFunctions[ aPyFuncName ] != NULL ) {
     _MapOfPyFunctions.erase( aPyFuncName ) ;
     return true ;