From f8a404498be3d553fcc09814c13047e5282bf00b Mon Sep 17 00:00:00 2001 From: rahuel Date: Fri, 10 Jun 2005 07:54:43 +0000 Subject: [PATCH] Traces --- .../DataFlowExecutor_FiniteStateMachine.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.cxx b/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.cxx index 0ed6762..5b79d6b 100644 --- a/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.cxx +++ b/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.cxx @@ -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 ; -- 2.39.2