@ -226,7 +226,7 @@ TraceItem::CostType TraceItem::i18nCostType(TQString s)
void TraceItem : : clear ( )
void TraceItem : : clear ( )
{
{
tq invalidate( ) ;
invalidate( ) ;
}
}
@ -239,8 +239,8 @@ TQString TraceItem::name() const
{
{
if ( part ( ) ) {
if ( part ( ) ) {
return i18n ( " %1 from %2 " )
return i18n ( " %1 from %2 " )
. tq arg( _dep - > name ( ) )
. arg( _dep - > name ( ) )
. tq arg( part ( ) - > name ( ) ) ;
. arg( part ( ) - > name ( ) ) ;
}
}
if ( _dep )
if ( _dep )
@ -259,21 +259,21 @@ TQString TraceItem::prettyName() const
TQString TraceItem : : fullName ( ) const
TQString TraceItem : : fullName ( ) const
{
{
return TQString ( " %1 %2 " )
return TQString ( " %1 %2 " )
. tq arg( typeName ( type ( ) ) ) . tq arg( prettyName ( ) ) ;
. arg( typeName ( type ( ) ) ) . arg( prettyName ( ) ) ;
}
}
TQString TraceItem : : toString ( )
TQString TraceItem : : toString ( )
{
{
return TQString ( " %1 \n [%3] " ) . tq arg( fullName ( ) ) . tq arg( costString ( 0 ) ) ;
return TQString ( " %1 \n [%3] " ) . arg( fullName ( ) ) . arg( costString ( 0 ) ) ;
}
}
void TraceItem : : tq invalidate( )
void TraceItem : : invalidate( )
{
{
if ( _dirty ) return ;
if ( _dirty ) return ;
_dirty = true ;
_dirty = true ;
if ( _dep )
if ( _dep )
_dep - > tq invalidate( ) ;
_dep - > invalidate( ) ;
}
}
void TraceItem : : update ( )
void TraceItem : : update ( )
@ -360,7 +360,7 @@ void TraceCost::set(TraceSubMapping* sm, const char* s)
_count = maxIndex ;
_count = maxIndex ;
}
}
// a cost change has to be propagated (esp. in subclasses)
// a cost change has to be propagated (esp. in subclasses)
tq invalidate( ) ;
invalidate( ) ;
}
}
void TraceCost : : set ( TraceSubMapping * sm , FixString & s )
void TraceCost : : set ( TraceSubMapping * sm , FixString & s )
@ -391,7 +391,7 @@ void TraceCost::set(TraceSubMapping* sm, FixString & s)
_cost [ i ] = 0 ;
_cost [ i ] = 0 ;
_count = maxIndex + 1 ;
_count = maxIndex + 1 ;
}
}
tq invalidate( ) ;
invalidate( ) ;
}
}
@ -436,13 +436,13 @@ void TraceCost::addCost(TraceSubMapping* sm, const char* s)
}
}
// a cost change has to be propagated (esp. in subclasses)
// a cost change has to be propagated (esp. in subclasses)
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
_dirty = false ; // don't recurse !
_dirty = false ; // don't recurse !
qDebug ( " %s \n now %s " , fullName ( ) . ascii ( ) ,
qDebug ( " %s \n now %s " , fullName ( ) . ascii ( ) ,
TraceCost : : costString ( 0 ) . ascii ( ) ) ;
TraceCost : : costString ( 0 ) . ascii ( ) ) ;
_dirty = true ; // because of tq invalidate()
_dirty = true ; // because of invalidate()
# endif
# endif
}
}
@ -488,13 +488,13 @@ void TraceCost::addCost(TraceSubMapping* sm, FixString & s)
}
}
}
}
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
_dirty = false ; // don't recurse !
_dirty = false ; // don't recurse !
qDebug ( " %s \n now %s " , fullName ( ) . ascii ( ) ,
qDebug ( " %s \n now %s " , fullName ( ) . ascii ( ) ,
TraceCost : : costString ( 0 ) . ascii ( ) ) ;
TraceCost : : costString ( 0 ) . ascii ( ) ) ;
_dirty = true ; // because of tq invalidate()
_dirty = true ; // because of invalidate()
# endif
# endif
}
}
@ -544,13 +544,13 @@ void TraceCost::maxCost(TraceSubMapping* sm, FixString & s)
}
}
}
}
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
_dirty = false ; // don't recurse !
_dirty = false ; // don't recurse !
qDebug ( " %s \n now %s " , fullName ( ) . ascii ( ) ,
qDebug ( " %s \n now %s " , fullName ( ) . ascii ( ) ,
TraceCost : : costString ( 0 ) . ascii ( ) ) ;
TraceCost : : costString ( 0 ) . ascii ( ) ) ;
_dirty = true ; // because of tq invalidate()
_dirty = true ; // because of invalidate()
# endif
# endif
}
}
@ -578,14 +578,14 @@ void TraceCost::addCost(TraceCost* item)
}
}
// a cost change has to be propagated (esp. in subclasses)
// a cost change has to be propagated (esp. in subclasses)
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
_dirty = false ; // don't recurse !
_dirty = false ; // don't recurse !
qDebug ( " %s added cost item \n %s \n now %s " ,
qDebug ( " %s added cost item \n %s \n now %s " ,
fullName ( ) . ascii ( ) , item - > fullName ( ) . ascii ( ) ,
fullName ( ) . ascii ( ) , item - > fullName ( ) . ascii ( ) ,
TraceCost : : costString ( 0 ) . ascii ( ) ) ;
TraceCost : : costString ( 0 ) . ascii ( ) ) ;
_dirty = true ; // because of tq invalidate()
_dirty = true ; // because of invalidate()
# endif
# endif
}
}
@ -612,14 +612,14 @@ void TraceCost::maxCost(TraceCost* item)
}
}
// a cost change has to be propagated (esp. in subclasses)
// a cost change has to be propagated (esp. in subclasses)
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
_dirty = false ; // don't recurse !
_dirty = false ; // don't recurse !
qDebug ( " %s added cost item \n %s \n now %s " ,
qDebug ( " %s added cost item \n %s \n now %s " ,
fullName ( ) . ascii ( ) , item - > fullName ( ) . ascii ( ) ,
fullName ( ) . ascii ( ) , item - > fullName ( ) . ascii ( ) ,
TraceCost : : costString ( 0 ) . ascii ( ) ) ;
TraceCost : : costString ( 0 ) . ascii ( ) ) ;
_dirty = true ; // because of tq invalidate()
_dirty = true ; // because of invalidate()
# endif
# endif
}
}
@ -636,7 +636,7 @@ void TraceCost::addCost(int type, SubCost value)
}
}
// a cost change has to be propagated (esp. in subclasses)
// a cost change has to be propagated (esp. in subclasses)
tq invalidate( ) ;
invalidate( ) ;
}
}
void TraceCost : : maxCost ( int type , SubCost value )
void TraceCost : : maxCost ( int type , SubCost value )
@ -653,7 +653,7 @@ void TraceCost::maxCost(int type, SubCost value)
}
}
// a cost change has to be propagated (esp. in subclasses)
// a cost change has to be propagated (esp. in subclasses)
tq invalidate( ) ;
invalidate( ) ;
}
}
@ -691,14 +691,14 @@ TQString TraceCost::costString(TraceCostMapping* m)
}
}
void TraceCost : : tq invalidate( )
void TraceCost : : invalidate( )
{
{
if ( _dirty ) return ;
if ( _dirty ) return ;
_dirty = true ;
_dirty = true ;
_cachedType = 0 ; // cached value is invalid, too
_cachedType = 0 ; // cached value is invalid, too
if ( _dep )
if ( _dep )
_dep - > tq invalidate( ) ;
_dep - > invalidate( ) ;
}
}
void TraceCost : : update ( )
void TraceCost : : update ( )
@ -767,8 +767,8 @@ TQString TraceJumpCost::costString(TraceCostMapping*)
if ( _dirty ) update ( ) ;
if ( _dirty ) update ( ) ;
return TQString ( " %1/%2 " )
return TQString ( " %1/%2 " )
. tq arg( _followedCount . pretty ( ) )
. arg( _followedCount . pretty ( ) )
. tq arg( _executedCount . pretty ( ) ) ;
. arg( _executedCount . pretty ( ) ) ;
}
}
void TraceJumpCost : : clear ( )
void TraceJumpCost : : clear ( )
@ -913,7 +913,7 @@ TQString TraceCostType::parsedFormula()
if ( ! t ) continue ;
if ( ! t ) continue ;
if ( ! t - > name ( ) . isEmpty ( ) )
if ( ! t - > name ( ) . isEmpty ( ) )
res + = TQString ( " * %1 " ) . tq arg( t - > name ( ) ) ;
res + = TQString ( " * %1 " ) . arg( t - > name ( ) ) ;
}
}
return res ;
return res ;
@ -1362,8 +1362,8 @@ TraceCallCost::~TraceCallCost()
TQString TraceCallCost : : costString ( TraceCostMapping * m )
TQString TraceCallCost : : costString ( TraceCostMapping * m )
{
{
return TQString ( " %1, Calls %2 " )
return TQString ( " %1, Calls %2 " )
. tq arg( TraceCost : : costString ( m ) )
. arg( TraceCost : : costString ( m ) )
. tq arg( _callCount . pretty ( ) ) ;
. arg( _callCount . pretty ( ) ) ;
}
}
TQString TraceCallCost : : prettyCallCount ( )
TQString TraceCallCost : : prettyCallCount ( )
@ -1388,7 +1388,7 @@ void TraceCallCost::addCallCount(SubCost c)
{
{
_callCount + = c ;
_callCount + = c ;
tq invalidate( ) ;
invalidate( ) ;
}
}
@ -1404,8 +1404,8 @@ TraceInclusiveCost::~TraceInclusiveCost()
TQString TraceInclusiveCost : : costString ( TraceCostMapping * m )
TQString TraceInclusiveCost : : costString ( TraceCostMapping * m )
{
{
return TQString ( " %1, Inclusive %2 " )
return TQString ( " %1, Inclusive %2 " )
. tq arg( TraceCost : : costString ( m ) )
. arg( TraceCost : : costString ( m ) )
. tq arg( _inclusive . costString ( m ) ) ;
. arg( _inclusive . costString ( m ) ) ;
}
}
void TraceInclusiveCost : : clear ( )
void TraceInclusiveCost : : clear ( )
@ -1425,7 +1425,7 @@ void TraceInclusiveCost::addInclusive(TraceCost* c)
{
{
_inclusive . addCost ( c ) ;
_inclusive . addCost ( c ) ;
tq invalidate( ) ;
invalidate( ) ;
}
}
@ -1452,7 +1452,7 @@ void TraceListCost::addDep(TraceCost* dep)
_deps . append ( dep ) ;
_deps . append ( dep ) ;
_lastDep = dep ;
_lastDep = dep ;
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
qDebug ( " %s added \n %s (now %d) " ,
qDebug ( " %s added \n %s (now %d) " ,
@ -1526,7 +1526,7 @@ void TraceJumpListCost::addDep(TraceJumpCost* dep)
_deps . append ( dep ) ;
_deps . append ( dep ) ;
_lastDep = dep ;
_lastDep = dep ;
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
qDebug ( " %s added \n %s (now %d) " ,
qDebug ( " %s added \n %s (now %d) " ,
@ -1600,7 +1600,7 @@ void TraceCallListCost::addDep(TraceCallCost* dep)
_deps . append ( dep ) ;
_deps . append ( dep ) ;
_lastDep = dep ;
_lastDep = dep ;
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
qDebug ( " %s added \n %s (now %d) " ,
qDebug ( " %s added \n %s (now %d) " ,
@ -1679,7 +1679,7 @@ void TraceInclusiveListCost::addDep(TraceInclusiveCost* dep)
_deps . append ( dep ) ;
_deps . append ( dep ) ;
_lastDep = dep ;
_lastDep = dep ;
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
qDebug ( " %s added \n %s (now %d) " ,
qDebug ( " %s added \n %s (now %d) " ,
@ -1897,9 +1897,9 @@ TQString TracePartFunction::costString(TraceCostMapping* m)
TQString res = TraceInclusiveCost : : costString ( m ) ;
TQString res = TraceInclusiveCost : : costString ( m ) ;
res + = TQString ( " , called from %1: %2 " )
res + = TQString ( " , called from %1: %2 " )
. tq arg( _calledContexts ) . tq arg( prettyCalledCount ( ) ) ;
. arg( _calledContexts ) . arg( prettyCalledCount ( ) ) ;
res + = TQString ( " , calling from %1: %2 " )
res + = TQString ( " , calling from %1: %2 " )
. tq arg( _callingContexts ) . tq arg( prettyCallingCount ( ) ) ;
. arg( _callingContexts ) . arg( prettyCallingCount ( ) ) ;
return res ;
return res ;
}
}
@ -1916,7 +1916,7 @@ void TracePartFunction::addPartInstr(TracePartInstr* ref)
# endif
# endif
_partInstr . append ( ref ) ;
_partInstr . append ( ref ) ;
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
qDebug ( " %s added \n %s (now %d) " ,
qDebug ( " %s added \n %s (now %d) " ,
@ -1937,7 +1937,7 @@ void TracePartFunction::addPartLine(TracePartLine* ref)
# endif
# endif
_partLines . append ( ref ) ;
_partLines . append ( ref ) ;
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
qDebug ( " %s added \n %s (now %d) " ,
qDebug ( " %s added \n %s (now %d) " ,
@ -1958,7 +1958,7 @@ void TracePartFunction::addPartCaller(TracePartCall* ref)
# endif
# endif
_partCallers . append ( ref ) ;
_partCallers . append ( ref ) ;
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
qDebug ( " %s added Caller \n %s (now %d) " ,
qDebug ( " %s added Caller \n %s (now %d) " ,
@ -1979,7 +1979,7 @@ void TracePartFunction::addPartCalling(TracePartCall* ref)
# endif
# endif
_partCallings . append ( ref ) ;
_partCallings . append ( ref ) ;
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
qDebug ( " %s added Calling \n %s (now %d) " ,
qDebug ( " %s added Calling \n %s (now %d) " ,
@ -2136,8 +2136,8 @@ TracePartClass::~TracePartClass()
TQString TracePartClass : : prettyName ( ) const
TQString TracePartClass : : prettyName ( ) const
{
{
return TQString ( " %1 from %2 " )
return TQString ( " %1 from %2 " )
. tq arg( _dep - > name ( ) . isEmpty ( ) ? TQString ( " (global) " ) : _dep - > name ( ) )
. arg( _dep - > name ( ) . isEmpty ( ) ? TQString ( " (global) " ) : _dep - > name ( ) )
. tq arg( part ( ) - > name ( ) ) ;
. arg( part ( ) - > name ( ) ) ;
}
}
//---------------------------------------------------
//---------------------------------------------------
@ -2233,8 +2233,8 @@ void TraceInstrJump::update()
TQString TraceInstrJump : : name ( ) const
TQString TraceInstrJump : : name ( ) const
{
{
return TQString ( " jump at 0x%1 to 0x%2 " )
return TQString ( " jump at 0x%1 to 0x%2 " )
. tq arg( _instrFrom - > addr ( ) . toString ( ) )
. arg( _instrFrom - > addr ( ) . toString ( ) )
. tq arg( _instrTo - > addr ( ) . toString ( ) ) ;
. arg( _instrTo - > addr ( ) . toString ( ) ) ;
}
}
@ -2316,8 +2316,8 @@ TracePartLineJump* TraceLineJump::partLineJump(TracePart* part)
TQString TraceLineJump : : name ( ) const
TQString TraceLineJump : : name ( ) const
{
{
return TQString ( " jump at %1 to %2 " )
return TQString ( " jump at %1 to %2 " )
. tq arg( _lineFrom - > prettyName ( ) )
. arg( _lineFrom - > prettyName ( ) )
. tq arg( _lineTo - > prettyName ( ) ) ;
. arg( _lineTo - > prettyName ( ) ) ;
}
}
@ -2395,7 +2395,7 @@ TracePartInstrCall* TraceInstrCall::partInstrCall(TracePart* part,
TQString TraceInstrCall : : name ( ) const
TQString TraceInstrCall : : name ( ) const
{
{
return TQString ( " %1 at %2 " ) . tq arg( _call - > name ( ) ) . tq arg( _instr - > name ( ) ) ;
return TQString ( " %1 at %2 " ) . arg( _call - > name ( ) ) . arg( _instr - > name ( ) ) ;
}
}
@ -2431,7 +2431,7 @@ TracePartLineCall* TraceLineCall::partLineCall(TracePart* part,
TQString TraceLineCall : : name ( ) const
TQString TraceLineCall : : name ( ) const
{
{
return TQString ( " %1 at %2 " ) . tq arg( _call - > name ( ) ) . tq arg( _line - > name ( ) ) ;
return TQString ( " %1 at %2 " ) . arg( _call - > name ( ) ) . arg( _line - > name ( ) ) ;
}
}
@ -2478,7 +2478,7 @@ TraceInstrCall* TraceCall::instrCall(TraceInstr* i)
icall = new TraceInstrCall ( this , i ) ;
icall = new TraceInstrCall ( this , i ) ;
_instrCalls . append ( icall ) ;
_instrCalls . append ( icall ) ;
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
qDebug ( " Created %s [TraceCall::instrCall] " , icall - > fullName ( ) . ascii ( ) ) ;
qDebug ( " Created %s [TraceCall::instrCall] " , icall - > fullName ( ) . ascii ( ) ) ;
@ -2500,7 +2500,7 @@ TraceLineCall* TraceCall::lineCall(TraceLine* l)
lcall = new TraceLineCall ( this , l ) ;
lcall = new TraceLineCall ( this , l ) ;
_lineCalls . append ( lcall ) ;
_lineCalls . append ( lcall ) ;
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
qDebug ( " Created %s [TraceCall::lineCall] " , lcall - > fullName ( ) . ascii ( ) ) ;
qDebug ( " Created %s [TraceCall::lineCall] " , lcall - > fullName ( ) . ascii ( ) ) ;
@ -2515,21 +2515,21 @@ void TraceCall::invalidateDynamicCost()
{
{
TraceLineCall * lc ;
TraceLineCall * lc ;
for ( lc = _lineCalls . first ( ) ; lc ; lc = _lineCalls . next ( ) )
for ( lc = _lineCalls . first ( ) ; lc ; lc = _lineCalls . next ( ) )
lc - > tq invalidate( ) ;
lc - > invalidate( ) ;
TraceInstrCall * ic ;
TraceInstrCall * ic ;
for ( ic = _instrCalls . first ( ) ; ic ; ic = _instrCalls . next ( ) )
for ( ic = _instrCalls . first ( ) ; ic ; ic = _instrCalls . next ( ) )
ic - > tq invalidate( ) ;
ic - > invalidate( ) ;
tq invalidate( ) ;
invalidate( ) ;
}
}
TQString TraceCall : : name ( ) const
TQString TraceCall : : name ( ) const
{
{
return TQString ( " %1 => %2 " )
return TQString ( " %1 => %2 " )
. tq arg( _caller - > name ( ) )
. arg( _caller - > name ( ) )
. tq arg( _called - > name ( ) ) ;
. arg( _called - > name ( ) ) ;
}
}
int TraceCall : : inCycle ( )
int TraceCall : : inCycle ( )
@ -2587,7 +2587,7 @@ TQString TraceCall::callerName(bool skipCycle) const
TraceFunctionCycle * c = _called - > cycle ( ) ;
TraceFunctionCycle * c = _called - > cycle ( ) ;
if ( c & & _caller & & ( _caller - > cycle ( ) ! = c ) ) {
if ( c & & _caller & & ( _caller - > cycle ( ) ! = c ) ) {
TQString via = _called - > prettyName ( ) ;
TQString via = _called - > prettyName ( ) ;
return i18n ( " %1 via %2 " ) . tq arg( _caller - > prettyName ( ) ) . tq arg( via ) ;
return i18n ( " %1 via %2 " ) . arg( _caller - > prettyName ( ) ) . arg( via ) ;
}
}
}
}
@ -2606,7 +2606,7 @@ TQString TraceCall::calledName(bool skipCycle) const
_called - > setCycle ( 0 ) ;
_called - > setCycle ( 0 ) ;
TQString via = _called - > prettyName ( ) ;
TQString via = _called - > prettyName ( ) ;
_called - > setCycle ( c ) ;
_called - > setCycle ( c ) ;
return i18n ( " %1 via %2 " ) . tq arg( c - > name ( ) ) . tq arg( via ) ;
return i18n ( " %1 via %2 " ) . arg( c - > name ( ) ) . arg( via ) ;
}
}
}
}
return _called - > prettyName ( ) ;
return _called - > prettyName ( ) ;
@ -2692,7 +2692,7 @@ void TraceInstr::addInstrCall(TraceInstrCall* instrCall)
# endif
# endif
_instrCalls . append ( instrCall ) ;
_instrCalls . append ( instrCall ) ;
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
qDebug ( " %s added \n %s (now %d) " ,
qDebug ( " %s added \n %s (now %d) " ,
@ -2704,12 +2704,12 @@ void TraceInstr::addInstrCall(TraceInstrCall* instrCall)
TQString TraceInstr : : name ( ) const
TQString TraceInstr : : name ( ) const
{
{
return TQString ( " 0x%1 " ) . tq arg( _addr . toString ( ) ) ;
return TQString ( " 0x%1 " ) . arg( _addr . toString ( ) ) ;
}
}
TQString TraceInstr : : prettyName ( ) const
TQString TraceInstr : : prettyName ( ) const
{
{
return TQString ( " 0x%1 " ) . tq arg( _addr . toString ( ) ) ;
return TQString ( " 0x%1 " ) . arg( _addr . toString ( ) ) ;
}
}
@ -2807,7 +2807,7 @@ void TraceLine::addLineCall(TraceLineCall* lineCall)
}
}
_lineCalls . append ( lineCall ) ;
_lineCalls . append ( lineCall ) ;
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
qDebug ( " %s added \n %s (now %d) " ,
qDebug ( " %s added \n %s (now %d) " ,
@ -2824,13 +2824,13 @@ TQString TraceLine::name() const
return i18n ( " (unknown) " ) ;
return i18n ( " (unknown) " ) ;
return TQString ( " %1:%2 " )
return TQString ( " %1:%2 " )
. tq arg( fileShortName ) . tq arg( _lineno ) ;
. arg( fileShortName ) . arg( _lineno ) ;
}
}
TQString TraceLine : : prettyName ( ) const
TQString TraceLine : : prettyName ( ) const
{
{
return TQString ( " %1 [%2] " )
return TQString ( " %1 [%2] " )
. tq arg( name ( ) ) . tq arg( _sourceFile - > function ( ) - > prettyName ( ) ) ;
. arg( name ( ) ) . arg( _sourceFile - > function ( ) - > prettyName ( ) ) ;
}
}
//---------------------------------------------------
//---------------------------------------------------
@ -2869,7 +2869,7 @@ TraceFunctionSource::~TraceFunctionSource()
TQString TraceFunctionSource : : name ( ) const
TQString TraceFunctionSource : : name ( ) const
{
{
return TQString ( " %1 for %2 " ) . tq arg( _file - > name ( ) ) . tq arg( _function - > name ( ) ) ;
return TQString ( " %1 for %2 " ) . arg( _file - > name ( ) ) . arg( _function - > name ( ) ) ;
}
}
uint TraceFunctionSource : : firstLineno ( )
uint TraceFunctionSource : : firstLineno ( )
@ -2952,10 +2952,10 @@ void TraceFunctionSource::invalidateDynamicCost()
TraceLineMap : : Iterator lit ;
TraceLineMap : : Iterator lit ;
for ( lit = _lineMap - > begin ( ) ;
for ( lit = _lineMap - > begin ( ) ;
lit ! = _lineMap - > end ( ) ; + + lit )
lit ! = _lineMap - > end ( ) ; + + lit )
( * lit ) . tq invalidate( ) ;
( * lit ) . invalidate( ) ;
}
}
tq invalidate( ) ;
invalidate( ) ;
}
}
TraceLineMap * TraceFunctionSource : : lineMap ( )
TraceLineMap * TraceFunctionSource : : lineMap ( )
@ -3125,7 +3125,7 @@ void TraceAssoziation::clear(TraceData* d, int rtti)
( * it ) . removeAssoziation ( rtti ) ;
( * it ) . removeAssoziation ( rtti ) ;
}
}
void TraceAssoziation : : tq invalidate( TraceData * d , int rtti )
void TraceAssoziation : : invalidate( TraceData * d , int rtti )
{
{
TraceFunctionMap : : Iterator it ;
TraceFunctionMap : : Iterator it ;
for ( it = d - > functionMap ( ) . begin ( ) ;
for ( it = d - > functionMap ( ) . begin ( ) ;
@ -3203,7 +3203,7 @@ void TraceFunction::invalidateAssoziation(int rtti)
TraceAssoziation * a ;
TraceAssoziation * a ;
for ( a = _assoziations . first ( ) ; a ; a = _assoziations . next ( ) )
for ( a = _assoziations . first ( ) ; a ; a = _assoziations . next ( ) )
if ( ( rtti = = 0 ) | | ( a - > rtti ( ) = = rtti ) )
if ( ( rtti = = 0 ) | | ( a - > rtti ( ) = = rtti ) )
a - > tq invalidate( ) ;
a - > invalidate( ) ;
}
}
TraceAssoziation * TraceFunction : : assoziation ( int rtti )
TraceAssoziation * TraceFunction : : assoziation ( int rtti )
@ -3254,9 +3254,9 @@ TQString TraceFunction::prettyName() const
// cycle members
// cycle members
if ( _cycle ) {
if ( _cycle ) {
if ( _cycle ! = this )
if ( _cycle ! = this )
res = TQString ( " %1 <cycle %2> " ) . tq arg( res ) . tq arg( _cycle - > cycleNo ( ) ) ;
res = TQString ( " %1 <cycle %2> " ) . arg( res ) . arg( _cycle - > cycleNo ( ) ) ;
else
else
res = TQString ( " <cycle %2> " ) . tq arg( _cycle - > cycleNo ( ) ) ;
res = TQString ( " <cycle %2> " ) . arg( _cycle - > cycleNo ( ) ) ;
}
}
@ -3279,9 +3279,9 @@ TQString TraceFunction::location(int maxFiles) const
uint to = lastAddress ( ) ;
uint to = lastAddress ( ) ;
if ( from ! = 0 & & to ! = 0 ) {
if ( from ! = 0 & & to ! = 0 ) {
if ( from = = to )
if ( from = = to )
loc + = TQString ( " (0x%1) " ) . tq arg( to , 0 , 16 ) ;
loc + = TQString ( " (0x%1) " ) . arg( to , 0 , 16 ) ;
else
else
loc + = TQString ( " (0x%1-0x%2) " ) . tq arg( from , 0 , 16 ) . tq arg( to , 0 , 16 ) ;
loc + = TQString ( " (0x%1-0x%2) " ) . arg( from , 0 , 16 ) . arg( to , 0 , 16 ) ;
}
}
# endif
# endif
}
}
@ -3310,9 +3310,9 @@ TQString TraceFunction::location(int maxFiles) const
to = sourceFile - > lastLineno ( ) ;
to = sourceFile - > lastLineno ( ) ;
if ( from ! = 0 & & to ! = 0 ) {
if ( from ! = 0 & & to ! = 0 ) {
if ( from = = to )
if ( from = = to )
loc + = TQString ( " (%1) " ) . tq arg( to ) ;
loc + = TQString ( " (%1) " ) . arg( to ) ;
else
else
loc + = TQString ( " (%1-%2) " ) . tq arg( from ) . tq arg( to ) ;
loc + = TQString ( " (%1-%2) " ) . arg( from ) . arg( to ) ;
}
}
# endif
# endif
}
}
@ -3334,7 +3334,7 @@ void TraceFunction::addPrettyLocation(TQString& s, int maxFiles) const
TQString l = location ( maxFiles ) ;
TQString l = location ( maxFiles ) ;
if ( l . isEmpty ( ) ) return ;
if ( l . isEmpty ( ) ) return ;
s + = TQString ( " (%1) " ) . tq arg( l ) ;
s + = TQString ( " (%1) " ) . arg( l ) ;
}
}
TQString TraceFunction : : prettyNameWithLocation ( int maxFiles ) const
TQString TraceFunction : : prettyNameWithLocation ( int maxFiles ) const
@ -3342,17 +3342,17 @@ TQString TraceFunction::prettyNameWithLocation(int maxFiles) const
TQString l = location ( maxFiles ) ;
TQString l = location ( maxFiles ) ;
if ( l . isEmpty ( ) ) return prettyName ( ) ;
if ( l . isEmpty ( ) ) return prettyName ( ) ;
return TQString ( " %1 (%2) " ). tq arg(prettyName()).tq arg(l);
return TQString ( " %1 (%2) " ). arg(prettyName()).arg(l);
}
}
TQString TraceFunction : : info ( ) const
TQString TraceFunction : : info ( ) const
{
{
TQString l = location ( ) ;
TQString l = location ( ) ;
if ( l . isEmpty ( ) )
if ( l . isEmpty ( ) )
return TQString ( " Function %1 " ) . tq arg( name ( ) ) ;
return TQString ( " Function %1 " ) . arg( name ( ) ) ;
return TQString ( " Function %1 (location %2) " )
return TQString ( " Function %1 (location %2) " )
. tq arg( name ( ) ) . tq arg( l ) ;
. arg( name ( ) ) . arg( l ) ;
}
}
@ -3414,7 +3414,7 @@ void TraceFunction::addCaller(TraceCall* caller)
# endif
# endif
_callers . append ( caller ) ;
_callers . append ( caller ) ;
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
qDebug ( " %s added Caller \n %s (now %d) " ,
qDebug ( " %s added Caller \n %s (now %d) " ,
@ -3435,8 +3435,8 @@ TraceCall* TraceFunction::calling(TraceFunction* called)
_callingMap . insert ( called , calling ) ;
_callingMap . insert ( called , calling ) ;
_callings . append ( calling ) ;
_callings . append ( calling ) ;
// we have to tq invalidate ourself so invalidations from item propagate up
// we have to invalidate ourself so invalidations from item propagate up
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
qDebug ( " Created %s [TraceFunction::calling] " , calling - > fullName ( ) . ascii ( ) ) ;
qDebug ( " Created %s [TraceFunction::calling] " , calling - > fullName ( ) . ascii ( ) ) ;
@ -3460,8 +3460,8 @@ TraceFunctionSource* TraceFunction::sourceFile(TraceFile* file,
_sourceFiles . append ( sourceFile ) ;
_sourceFiles . append ( sourceFile ) ;
// we have to tq invalidate ourself so invalidations from item propagate up
// we have to invalidate ourself so invalidations from item propagate up
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
qDebug ( " Created SourceFile %s [TraceFunction::line] " ,
qDebug ( " Created SourceFile %s [TraceFunction::line] " ,
@ -3601,10 +3601,10 @@ void TraceFunction::invalidateDynamicCost()
TraceInstrMap : : Iterator iit ;
TraceInstrMap : : Iterator iit ;
for ( iit = _instrMap - > begin ( ) ;
for ( iit = _instrMap - > begin ( ) ;
iit ! = _instrMap - > end ( ) ; + + iit )
iit ! = _instrMap - > end ( ) ; + + iit )
( * iit ) . tq invalidate( ) ;
( * iit ) . invalidate( ) ;
}
}
tq invalidate( ) ;
invalidate( ) ;
}
}
void TraceFunction : : update ( )
void TraceFunction : : update ( )
@ -3951,7 +3951,7 @@ TraceFunctionCycle::TraceFunctionCycle(TraceFunction* f, int n)
_cycle = this ;
_cycle = this ;
setPosition ( f - > data ( ) ) ;
setPosition ( f - > data ( ) ) ;
setName ( TQString ( " <cycle %1> " ) . tq arg( n ) ) ;
setName ( TQString ( " <cycle %1> " ) . arg( n ) ) ;
// reset to attributes of base function
// reset to attributes of base function
setFile ( _base - > file ( ) ) ;
setFile ( _base - > file ( ) ) ;
@ -3967,7 +3967,7 @@ void TraceFunctionCycle::init()
// this deletes all TraceCall's to members
// this deletes all TraceCall's to members
_callings . clear ( ) ;
_callings . clear ( ) ;
tq invalidate( ) ;
invalidate( ) ;
}
}
void TraceFunctionCycle : : add ( TraceFunction * f )
void TraceFunctionCycle : : add ( TraceFunction * f )
@ -3993,13 +3993,13 @@ void TraceFunctionCycle::setup()
// the cycle has a call to each member
// the cycle has a call to each member
call = new TraceCall ( this , f ) ;
call = new TraceCall ( this , f ) ;
call - > tq invalidate( ) ;
call - > invalidate( ) ;
_callings . append ( call ) ;
_callings . append ( call ) ;
// now do some faking...
// now do some faking...
f - > setCycle ( this ) ;
f - > setCycle ( this ) ;
}
}
tq invalidate( ) ;
invalidate( ) ;
}
}
@ -4046,7 +4046,7 @@ void TraceClass::addFunction(TraceFunction* function)
_functions . append ( function ) ;
_functions . append ( function ) ;
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
qDebug ( " %s added \n %s (now %d) " ,
qDebug ( " %s added \n %s (now %d) " ,
@ -4093,7 +4093,7 @@ void TraceFile::addFunction(TraceFunction* function)
_functions . append ( function ) ;
_functions . append ( function ) ;
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
qDebug ( " %s added \n %s (now %d) " ,
qDebug ( " %s added \n %s (now %d) " ,
@ -4114,7 +4114,7 @@ void TraceFile::addSourceFile(TraceFunctionSource* sourceFile)
_sourceFiles . append ( sourceFile ) ;
_sourceFiles . append ( sourceFile ) ;
// not truely needed, as we don't use the sourceFiles for cost update
// not truely needed, as we don't use the sourceFiles for cost update
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
qDebug ( " %s \n added SourceFile %s (now %d) " ,
qDebug ( " %s \n added SourceFile %s (now %d) " ,
@ -4211,7 +4211,7 @@ void TraceObject::addFunction(TraceFunction* function)
_functions . append ( function ) ;
_functions . append ( function ) ;
tq invalidate( ) ;
invalidate( ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
qDebug ( " %s added \n %s (now %d) " ,
qDebug ( " %s added \n %s (now %d) " ,
@ -4298,9 +4298,9 @@ TQString TracePart::shortName() const
TQString TracePart : : prettyName ( ) const
TQString TracePart : : prettyName ( ) const
{
{
TQString name = TQString ( " %1.%2 " ) . tq arg( _pid ) . tq arg( _number ) ;
TQString name = TQString ( " %1.%2 " ) . arg( _pid ) . arg( _number ) ;
if ( data ( ) - > maxThreadID ( ) > 1 )
if ( data ( ) - > maxThreadID ( ) > 1 )
name + = TQString ( " -%3 " ) . tq arg( _tid ) ;
name + = TQString ( " -%3 " ) . arg( _tid ) ;
return name ;
return name ;
}
}
@ -4498,7 +4498,7 @@ void TraceData::load(const TQString& base)
if ( ( str . length ( ) > pos ) & & ( str [ pos ] = = ' . ' ) ) {
if ( ( str . length ( ) > pos ) & & ( str [ pos ] = = ' . ' ) ) {
pos + + ;
pos + + ;
while ( str . length ( ) > pos ) {
while ( str . length ( ) > pos ) {
if ( ( int ) str . tq at( pos ) < ' 0 ' | | ( int ) str . tq at( pos ) > ' 9 ' ) break ;
if ( ( int ) str . at( pos ) < ' 0 ' | | ( int ) str . at( pos ) > ' 9 ' ) break ;
n = 10 * n + ( str [ pos + + ] - ' 0 ' ) ;
n = 10 * n + ( str [ pos + + ] - ' 0 ' ) ;
}
}
}
}
@ -4508,7 +4508,7 @@ void TraceData::load(const TQString& base)
if ( ( str . length ( ) > pos ) & & ( str [ pos ] = = ' - ' ) ) {
if ( ( str . length ( ) > pos ) & & ( str [ pos ] = = ' - ' ) ) {
pos + + ;
pos + + ;
while ( str . length ( ) > pos ) {
while ( str . length ( ) > pos ) {
if ( ( int ) str . tq at( pos ) < ' 0 ' | | ( int ) str . tq at( pos ) > ' 9 ' ) break ;
if ( ( int ) str . at( pos ) < ' 0 ' | | ( int ) str . at( pos ) > ' 9 ' ) break ;
t = 10 * t + ( str [ pos + + ] - ' 0 ' ) ;
t = 10 * t + ( str [ pos + + ] - ' 0 ' ) ;
}
}
}
}
@ -4536,7 +4536,7 @@ void TraceData::load(const TQString& base)
TracePart * TraceData : : addPart ( const TQString & dir , const TQString & name )
TracePart * TraceData : : addPart ( const TQString & dir , const TQString & name )
{
{
TQString filename = TQString ( " %1/%2 " ) . tq arg( dir ) . tq arg( name ) ;
TQString filename = TQString ( " %1/%2 " ) . arg( dir ) . arg( name ) ;
# if TRACE_DEBUG
# if TRACE_DEBUG
qDebug ( " TraceData::addPart('%s') " , filename . ascii ( ) ) ;
qDebug ( " TraceData::addPart('%s') " , filename . ascii ( ) ) ;
# endif
# endif
@ -4632,14 +4632,14 @@ TQString TraceData::activePartRange()
else {
else {
if ( ! res . isEmpty ( ) ) res + = " ; " ;
if ( ! res . isEmpty ( ) ) res + = " ; " ;
if ( r1 = = r2 ) res + = TQString : : number ( r1 ) ;
if ( r1 = = r2 ) res + = TQString : : number ( r1 ) ;
else res + = TQString ( " %1-%2 " ) . tq arg( r1 ) . tq arg( r2 ) ;
else res + = TQString ( " %1-%2 " ) . arg( r1 ) . arg( r2 ) ;
r1 = r2 = count ;
r1 = r2 = count ;
}
}
}
}
if ( r1 > = 0 ) {
if ( r1 > = 0 ) {
if ( ! res . isEmpty ( ) ) res + = " ; " ;
if ( ! res . isEmpty ( ) ) res + = " ; " ;
if ( r1 = = r2 ) res + = TQString : : number ( r1 ) ;
if ( r1 = = r2 ) res + = TQString : : number ( r1 ) ;
else res + = TQString ( " %1-%2 " ) . tq arg( r1 ) . tq arg( r2 ) ;
else res + = TQString ( " %1-%2 " ) . arg( r1 ) . arg( r2 ) ;
}
}
return res ;
return res ;
@ -4647,22 +4647,22 @@ TQString TraceData::activePartRange()
void TraceData : : invalidateDynamicCost ( )
void TraceData : : invalidateDynamicCost ( )
{
{
// tq invalidate all dynamic costs
// invalidate all dynamic costs
TraceObjectMap : : Iterator oit ;
TraceObjectMap : : Iterator oit ;
for ( oit = _objectMap . begin ( ) ;
for ( oit = _objectMap . begin ( ) ;
oit ! = _objectMap . end ( ) ; + + oit )
oit ! = _objectMap . end ( ) ; + + oit )
( * oit ) . tq invalidate( ) ;
( * oit ) . invalidate( ) ;
TraceClassMap : : Iterator cit ;
TraceClassMap : : Iterator cit ;
for ( cit = _classMap . begin ( ) ;
for ( cit = _classMap . begin ( ) ;
cit ! = _classMap . end ( ) ; + + cit )
cit ! = _classMap . end ( ) ; + + cit )
( * cit ) . tq invalidate( ) ;
( * cit ) . invalidate( ) ;
TraceFileMap : : Iterator fit ;
TraceFileMap : : Iterator fit ;
for ( fit = _fileMap . begin ( ) ;
for ( fit = _fileMap . begin ( ) ;
fit ! = _fileMap . end ( ) ; + + fit )
fit ! = _fileMap . end ( ) ; + + fit )
( * fit ) . tq invalidate( ) ;
( * fit ) . invalidate( ) ;
TraceFunctionMap : : Iterator it ;
TraceFunctionMap : : Iterator it ;
for ( it = _functionMap . begin ( ) ;
for ( it = _functionMap . begin ( ) ;
@ -4670,7 +4670,7 @@ void TraceData::invalidateDynamicCost()
( * it ) . invalidateDynamicCost ( ) ;
( * it ) . invalidateDynamicCost ( ) ;
}
}
tq invalidate( ) ;
invalidate( ) ;
}
}
@ -5043,7 +5043,7 @@ void TraceData::updateFunctionCycles()
cycle - > setup ( ) ;
cycle - > setup ( ) ;
_inFunctionCycleUpdate = false ;
_inFunctionCycleUpdate = false ;
// we have to tq invalidate costs because cycles are now taken into account
// we have to invalidate costs because cycles are now taken into account
invalidateDynamicCost ( ) ;
invalidateDynamicCost ( ) ;
#if 0
#if 0