2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 static char sccsid[] = "@(#)arcs.c 8.1 (Berkeley) 6/6/93";
38 static const char rcsid[] =
53 * add (or just increment) an arc
55 addarc( parentp , childp , count )
63 if ( debug & TALLYDEBUG ) {
64 printf( "[addarc] %d arcs from %s to %s\n" ,
65 count , parentp -> name , childp -> name );
68 arcp = arclookup( parentp , childp );
71 * a hit: just increment the count.
74 if ( debug & TALLYDEBUG ) {
75 printf( "[tally] hit %d += %d\n" ,
76 arcp -> arc_count , count );
79 arcp -> arc_count += count;
82 arcp = (arctype *)calloc( 1 , sizeof *arcp );
83 arcp -> arc_parentp = parentp;
84 arcp -> arc_childp = childp;
85 arcp -> arc_count = count;
87 * prepend this child to the children of this parent
89 arcp -> arc_childlist = parentp -> children;
90 parentp -> children = arcp;
92 * prepend this parent to the parents of this child
94 arcp -> arc_parentlist = childp -> parents;
95 childp -> parents = arcp;
99 * the code below topologically sorts the graph (collapsing cycles),
100 * and propagates time bottom up and flags top down.
104 * the topologically sorted name list pointers
108 topcmp( npp1 , npp2 )
112 return (*npp1) -> toporder - (*npp2) -> toporder;
118 nltype *parentp, **timesortnlp;
124 * initialize various things:
125 * zero out child times.
126 * count self-recursive calls.
127 * indicate that nothing is on cycles.
129 for ( parentp = nl ; parentp < npe ; parentp++ ) {
130 parentp -> childtime = 0.0;
131 arcp = arclookup( parentp , parentp );
133 parentp -> ncall -= arcp -> arc_count;
134 parentp -> selfcalls = arcp -> arc_count;
136 parentp -> selfcalls = 0;
138 parentp -> npropcall = parentp -> ncall;
139 parentp -> propfraction = 0.0;
140 parentp -> propself = 0.0;
141 parentp -> propchild = 0.0;
142 parentp -> printflag = FALSE;
143 parentp -> toporder = DFN_NAN;
144 parentp -> cycleno = 0;
145 parentp -> cyclehead = parentp;
146 parentp -> cnext = 0;
148 findcall( parentp , parentp -> value , (parentp+1) -> value );
151 for ( pass = 1 ; ; pass++ ) {
153 * topologically order things
154 * if any node is unnumbered,
155 * number it and any of its descendents.
157 for ( dfn_init() , parentp = nl ; parentp < npe ; parentp++ ) {
158 if ( parentp -> toporder == DFN_NAN ) {
163 * link together nodes on the same cycle
167 * if no cycles to break up, proceed
172 * analyze cycles to determine breakup
175 if ( debug & BREAKCYCLE ) {
176 printf("[doarcs] pass %d, cycle(s) %d\n" , pass , ncycle );
180 printf( "\n\n%s %s\n%s %d:\n" ,
181 "The following arcs were deleted" ,
182 "from the propagation calculation" ,
183 "to reduce the maximum cycle size to", cyclethreshold );
185 if ( cycleanalyze() )
189 for ( parentp = nl ; parentp < npe ; parentp++ ) {
190 parentp -> toporder = DFN_NAN;
191 parentp -> cycleno = 0;
192 parentp -> cyclehead = parentp;
193 parentp -> cnext = 0;
199 printf( "\tNone\n\n" );
202 * Sort the symbol table in reverse topological order
204 topsortnlp = (nltype **) calloc( nname , sizeof(nltype *) );
205 if ( topsortnlp == (nltype **) 0 ) {
206 fprintf( stderr , "[doarcs] ran out of memory for topo sorting\n" );
208 for ( index = 0 ; index < nname ; index += 1 ) {
209 topsortnlp[ index ] = &nl[ index ];
211 qsort( topsortnlp , nname , sizeof(nltype *) , topcmp );
213 if ( debug & DFNDEBUG ) {
214 printf( "[doarcs] topological sort listing\n" );
215 for ( index = 0 ; index < nname ; index += 1 ) {
216 printf( "[doarcs] " );
217 printf( "%d:" , topsortnlp[ index ] -> toporder );
218 printname( topsortnlp[ index ] );
224 * starting from the topological top,
225 * propagate print flags to children.
226 * also, calculate propagation fractions.
227 * this happens before time propagation
228 * since time propagation uses the fractions.
232 * starting from the topological bottom,
233 * propogate children times up to parents.
237 * Now, sort by propself + propchild.
238 * sorting both the regular function names
241 timesortnlp = (nltype **) calloc( nname + ncycle , sizeof(nltype *) );
242 if ( timesortnlp == (nltype **) 0 ) {
243 warnx("ran out of memory for sorting");
245 for ( index = 0 ; index < nname ; index++ ) {
246 timesortnlp[index] = &nl[index];
248 for ( index = 1 ; index <= ncycle ; index++ ) {
249 timesortnlp[nname+index-1] = &cyclenl[index];
251 qsort( timesortnlp , nname + ncycle , sizeof(nltype *) , totalcmp );
252 for ( index = 0 ; index < nname + ncycle ; index++ ) {
253 timesortnlp[ index ] -> index = index + 1;
255 return( timesortnlp );
263 for ( index = 0 ; index < nname ; index += 1 ) {
264 timepropagate( topsortnlp[ index ] );
268 timepropagate( parentp )
276 if ( parentp -> propfraction == 0.0 ) {
280 * gather time from children of this parent.
282 for ( arcp = parentp -> children ; arcp ; arcp = arcp -> arc_childlist ) {
283 childp = arcp -> arc_childp;
284 if ( arcp -> arc_flags & DEADARC ) {
287 if ( arcp -> arc_count == 0 ) {
290 if ( childp == parentp ) {
293 if ( childp -> propfraction == 0.0 ) {
296 if ( childp -> cyclehead != childp ) {
297 if ( parentp -> cycleno == childp -> cycleno ) {
300 if ( parentp -> toporder <= childp -> toporder ) {
301 fprintf( stderr , "[propagate] toporder botches\n" );
303 childp = childp -> cyclehead;
305 if ( parentp -> toporder <= childp -> toporder ) {
306 fprintf( stderr , "[propagate] toporder botches\n" );
310 if ( childp -> npropcall == 0 ) {
314 * distribute time for this arc
316 arcp -> arc_time = childp -> time
317 * ( ( (double) arcp -> arc_count ) /
318 ( (double) childp -> npropcall ) );
319 arcp -> arc_childtime = childp -> childtime
320 * ( ( (double) arcp -> arc_count ) /
321 ( (double) childp -> npropcall ) );
322 share = arcp -> arc_time + arcp -> arc_childtime;
323 parentp -> childtime += share;
325 * ( 1 - propfraction ) gets lost along the way
327 propshare = parentp -> propfraction * share;
329 * fix things for printing
331 parentp -> propchild += propshare;
332 arcp -> arc_time *= parentp -> propfraction;
333 arcp -> arc_childtime *= parentp -> propfraction;
335 * add this share to the parent's cycle header, if any.
337 if ( parentp -> cyclehead != parentp ) {
338 parentp -> cyclehead -> childtime += share;
339 parentp -> cyclehead -> propchild += propshare;
342 if ( debug & PROPDEBUG ) {
343 printf( "[dotime] child \t" );
345 printf( " with %f %f %d/%d\n" ,
346 childp -> time , childp -> childtime ,
347 arcp -> arc_count , childp -> npropcall );
348 printf( "[dotime] parent\t" );
349 printname( parentp );
350 printf( "\n[dotime] share %f\n" , share );
358 register nltype *nlp;
359 register nltype *cyclenlp;
365 * Count the number of cycles, and initialze the cycle lists
368 for ( nlp = nl ; nlp < npe ; nlp++ ) {
370 * this is how you find unattached cycles
372 if ( nlp -> cyclehead == nlp && nlp -> cnext != 0 ) {
377 * cyclenl is indexed by cycle number:
378 * i.e. it is origin 1, not origin 0.
380 cyclenl = (nltype *) calloc( ncycle + 1 , sizeof( nltype ) );
381 if ( cyclenl == 0 ) {
382 warnx("no room for %d bytes of cycle headers",
383 ( ncycle + 1 ) * sizeof( nltype ) );
387 * now link cycles to true cycleheads,
388 * number them, accumulate the data for the cycle
391 for ( nlp = nl ; nlp < npe ; nlp++ ) {
392 if ( !( nlp -> cyclehead == nlp && nlp -> cnext != 0 ) ) {
396 cyclenlp = &cyclenl[cycle];
397 cyclenlp -> name = 0; /* the name */
398 cyclenlp -> value = 0; /* the pc entry point */
399 cyclenlp -> time = 0.0; /* ticks in this routine */
400 cyclenlp -> childtime = 0.0; /* cumulative ticks in children */
401 cyclenlp -> ncall = 0; /* how many times called */
402 cyclenlp -> selfcalls = 0; /* how many calls to self */
403 cyclenlp -> propfraction = 0.0; /* what % of time propagates */
404 cyclenlp -> propself = 0.0; /* how much self time propagates */
405 cyclenlp -> propchild = 0.0; /* how much child time propagates */
406 cyclenlp -> printflag = TRUE; /* should this be printed? */
407 cyclenlp -> index = 0; /* index in the graph list */
408 cyclenlp -> toporder = DFN_NAN; /* graph call chain top-sort order */
409 cyclenlp -> cycleno = cycle; /* internal number of cycle on */
410 cyclenlp -> cyclehead = cyclenlp; /* pointer to head of cycle */
411 cyclenlp -> cnext = nlp; /* pointer to next member of cycle */
412 cyclenlp -> parents = 0; /* list of caller arcs */
413 cyclenlp -> children = 0; /* list of callee arcs */
415 if ( debug & CYCLEDEBUG ) {
416 printf( "[cyclelink] " );
418 printf( " is the head of cycle %d\n" , cycle );
422 * link members to cycle header
424 for ( memberp = nlp ; memberp ; memberp = memberp -> cnext ) {
425 memberp -> cycleno = cycle;
426 memberp -> cyclehead = cyclenlp;
429 * count calls from outside the cycle
430 * and those among cycle members
432 for ( memberp = nlp ; memberp ; memberp = memberp -> cnext ) {
433 for ( arcp=memberp->parents ; arcp ; arcp=arcp->arc_parentlist ) {
434 if ( arcp -> arc_parentp == memberp ) {
437 if ( arcp -> arc_parentp -> cycleno == cycle ) {
438 cyclenlp -> selfcalls += arcp -> arc_count;
440 cyclenlp -> npropcall += arcp -> arc_count;
448 * analyze cycles to determine breakup
452 arctype **cyclestack;
465 * calculate the size of the cycle, and find nodes that
466 * exit the cycle as they are desirable targets to cut
467 * some of their parents
469 for ( done = TRUE , cycleno = 1 ; cycleno <= ncycle ; cycleno++ ) {
471 for (nlp = cyclenl[ cycleno ] . cnext; nlp; nlp = nlp -> cnext) {
473 nlp -> parentcnt = 0;
474 nlp -> flags &= ~HASCYCLEXIT;
475 for ( arcp = nlp -> parents; arcp; arcp = arcp -> arc_parentlist ) {
476 nlp -> parentcnt += 1;
477 if ( arcp -> arc_parentp -> cycleno != cycleno )
478 nlp -> flags |= HASCYCLEXIT;
481 if ( size <= cyclethreshold )
484 cyclestack = (arctype **) calloc( size + 1 , sizeof( arctype *) );
485 if ( cyclestack == 0 ) {
486 warnx("no room for %d bytes of cycle stack",
487 ( size + 1 ) * sizeof( arctype * ) );
491 if ( debug & BREAKCYCLE ) {
492 printf( "[cycleanalyze] starting cycle %d of %d, size %d\n" ,
493 cycleno , ncycle , size );
496 for ( nlp = cyclenl[ cycleno ] . cnext ; nlp ; nlp = nlp -> cnext ) {
497 stkp = &cyclestack[0];
498 nlp -> flags |= CYCLEHEAD;
499 ret = descend ( nlp , cyclestack , stkp );
500 nlp -> flags &= ~CYCLEHEAD;
505 if ( cyclecnt > 0 ) {
507 for ( clp = cyclehead ; clp ; ) {
508 endlist = &clp -> list[ clp -> size ];
509 for ( arcpp = clp -> list ; arcpp < endlist ; arcpp++ )
510 (*arcpp) -> arc_cyclecnt--;
519 if ( debug & BREAKCYCLE ) {
520 printf("%s visited %d, viable %d, newcycle %d, oldcycle %d\n",
521 "[doarcs]" , visited , viable , newcycle , oldcycle);
527 descend( node , stkstart , stkp )
535 for ( arcp = node -> children ; arcp ; arcp = arcp -> arc_childlist ) {
539 if ( arcp -> arc_childp -> cycleno != node -> cycleno
540 || ( arcp -> arc_childp -> flags & VISITED )
541 || ( arcp -> arc_flags & DEADARC ) )
547 if ( arcp -> arc_childp -> flags & CYCLEHEAD ) {
548 if ( addcycle( stkstart , stkp ) == FALSE )
552 arcp -> arc_childp -> flags |= VISITED;
553 ret = descend( arcp -> arc_childp , stkstart , stkp + 1 );
554 arcp -> arc_childp -> flags &= ~VISITED;
560 addcycle( stkstart , stkend )
573 size = stkend - stkstart + 1;
576 for ( arcpp = stkstart , minarc = *arcpp ; arcpp <= stkend ; arcpp++ ) {
577 if ( *arcpp > minarc )
582 for ( clp = cyclehead ; clp ; clp = clp -> next ) {
583 if ( clp -> size != size )
586 endlist = &clp -> list[ size ];
587 for ( arcpp = clp -> list ; arcpp < endlist ; arcpp++ ) {
588 if ( *stkp++ != *arcpp )
593 if ( arcpp == endlist ) {
601 calloc( 1 , sizeof ( cltype ) + ( size - 1 ) * sizeof( arctype * ) );
603 warnx("no room for %d bytes of subcycle storage",
604 sizeof ( cltype ) + ( size - 1 ) * sizeof( arctype * ) );
608 endlist = &clp -> list[ size ];
609 for ( arcpp = clp -> list ; arcpp < endlist ; arcpp++ ) {
610 arcp = *arcpp = *stkp++;
613 arcp -> arc_cyclecnt++;
614 if ( ( arcp -> arc_flags & ONLIST ) == 0 ) {
615 arcp -> arc_flags |= ONLIST;
616 arcp -> arc_next = archead;
621 clp -> next = cyclehead;
625 if ( debug & SUBCYCLELIST ) {
626 printsubcycle( clp );
630 if ( cyclecnt >= CYCLEMAX )
643 arctype *maxexitarcp;
644 arctype *maxwithparentarcp;
645 arctype *maxnoparentarcp;
647 int maxwithparentcnt;
651 maxwithparentcnt = 0;
653 for ( endlist = &archead , arcp = archead ; arcp ; ) {
654 if ( arcp -> arc_cyclecnt == 0 ) {
655 arcp -> arc_flags &= ~ONLIST;
656 *endlist = arcp -> arc_next;
657 arcp -> arc_next = 0;
661 if ( arcp -> arc_childp -> flags & HASCYCLEXIT ) {
662 if ( arcp -> arc_cyclecnt > maxexitcnt ||
663 ( arcp -> arc_cyclecnt == maxexitcnt &&
664 arcp -> arc_cyclecnt < maxexitarcp -> arc_count ) ) {
665 maxexitcnt = arcp -> arc_cyclecnt;
668 } else if ( arcp -> arc_childp -> parentcnt > 1 ) {
669 if ( arcp -> arc_cyclecnt > maxwithparentcnt ||
670 ( arcp -> arc_cyclecnt == maxwithparentcnt &&
671 arcp -> arc_cyclecnt < maxwithparentarcp -> arc_count ) ) {
672 maxwithparentcnt = arcp -> arc_cyclecnt;
673 maxwithparentarcp = arcp;
676 if ( arcp -> arc_cyclecnt > maxnoparentcnt ||
677 ( arcp -> arc_cyclecnt == maxnoparentcnt &&
678 arcp -> arc_cyclecnt < maxnoparentarcp -> arc_count ) ) {
679 maxnoparentcnt = arcp -> arc_cyclecnt;
680 maxnoparentarcp = arcp;
683 endlist = &arcp -> arc_next;
684 arcp = arcp -> arc_next;
686 if ( maxexitcnt > 0 ) {
688 * first choice is edge leading to node with out-of-cycle parent
690 maxarcp = maxexitarcp;
694 } else if ( maxwithparentcnt > 0 ) {
696 * second choice is edge leading to node with at least one
697 * other in-cycle parent
699 maxarcp = maxwithparentarcp;
705 * last choice is edge leading to node with only this arc as
706 * a parent (as it will now be orphaned)
708 maxarcp = maxnoparentarcp;
713 maxarcp -> arc_flags |= DEADARC;
714 maxarcp -> arc_childp -> parentcnt -= 1;
715 maxarcp -> arc_childp -> npropcall -= maxarcp -> arc_count;
717 if ( debug & BREAKCYCLE ) {
718 printf( "%s delete %s arc: %s (%d) -> %s from %d cycle(s)\n" ,
719 "[compresslist]" , type , maxarcp -> arc_parentp -> name ,
720 maxarcp -> arc_count , maxarcp -> arc_childp -> name ,
721 maxarcp -> arc_cyclecnt );
724 printf( "\t%s to %s with %d calls\n" , maxarcp -> arc_parentp -> name ,
725 maxarcp -> arc_childp -> name , maxarcp -> arc_count );
727 for ( clp = cyclehead ; clp ; ) {
728 endlist = &clp -> list[ clp -> size ];
729 for ( arcpp = clp -> list ; arcpp < endlist ; arcpp++ )
730 if ( (*arcpp) -> arc_flags & DEADARC )
732 if ( arcpp == endlist ) {
737 for ( arcpp = clp -> list ; arcpp < endlist ; arcpp++ )
738 (*arcpp) -> arc_cyclecnt--;
754 printf( "%s <cycle %d>\n" , (*arcpp) -> arc_parentp -> name ,
755 (*arcpp) -> arc_parentp -> cycleno ) ;
756 for ( endlist = &clp -> list[ clp -> size ]; arcpp < endlist ; arcpp++ )
757 printf( "\t(%d) -> %s\n" , (*arcpp) -> arc_count ,
758 (*arcpp) -> arc_childp -> name ) ;
768 for ( cycle = 1 ; cycle <= ncycle ; cycle += 1 ) {
769 cyclenlp = &cyclenl[ cycle ];
770 for ( childp = cyclenlp -> cnext ; childp ; childp = childp -> cnext ) {
771 if ( childp -> propfraction == 0.0 ) {
773 * all members have the same propfraction except those
774 * that were excluded with -E
778 cyclenlp -> time += childp -> time;
780 cyclenlp -> propself = cyclenlp -> propfraction * cyclenlp -> time;
785 * in one top to bottom pass over the topologically sorted namelist
787 * printflag as the union of parents' printflags
788 * propfraction as the sum of fractional parents' propfractions
789 * and while we're here, sum time for functions.
798 for ( index = nname-1 ; index >= 0 ; index -= 1 ) {
799 childp = topsortnlp[ index ];
801 * if we haven't done this function or cycle,
802 * inherit things from parent.
803 * this way, we are linear in the number of arcs
804 * since we do all members of a cycle (and the cycle itself)
805 * as we hit the first member of the cycle.
807 if ( childp -> cyclehead != oldhead ) {
808 oldhead = childp -> cyclehead;
809 inheritflags( childp );
812 if ( debug & PROPDEBUG ) {
813 printf( "[doflags] " );
815 printf( " inherits printflag %d and propfraction %f\n" ,
816 childp -> printflag , childp -> propfraction );
819 if ( ! childp -> printflag ) {
822 * it gets turned on by
824 * or there not being any -f list and not being on -e list.
826 if ( onlist( flist , childp -> name )
827 || ( !fflag && !onlist( elist , childp -> name ) ) ) {
828 childp -> printflag = TRUE;
832 * this function has printing parents:
833 * maybe someone wants to shut it up
834 * by putting it on -e list. (but favor -f over -e)
836 if ( ( !onlist( flist , childp -> name ) )
837 && onlist( elist , childp -> name ) ) {
838 childp -> printflag = FALSE;
841 if ( childp -> propfraction == 0.0 ) {
843 * no parents to pass time to.
844 * collect time from children if
846 * or there isn't any -F list and its not on -E list.
848 if ( onlist( Flist , childp -> name )
849 || ( !Fflag && !onlist( Elist , childp -> name ) ) ) {
850 childp -> propfraction = 1.0;
854 * it has parents to pass time to,
855 * but maybe someone wants to shut it up
856 * by puttting it on -E list. (but favor -F over -E)
858 if ( !onlist( Flist , childp -> name )
859 && onlist( Elist , childp -> name ) ) {
860 childp -> propfraction = 0.0;
863 childp -> propself = childp -> time * childp -> propfraction;
864 printtime += childp -> propself;
866 if ( debug & PROPDEBUG ) {
867 printf( "[doflags] " );
869 printf( " ends up with printflag %d and propfraction %f\n" ,
870 childp -> printflag , childp -> propfraction );
871 printf( "time %f propself %f printtime %f\n" ,
872 childp -> time , childp -> propself , printtime );
879 * check if any parent of this child
880 * (or outside parents of this cycle)
881 * have their print flags on and set the
882 * print flag of the child (cycle) appropriately.
883 * similarly, deal with propagation fractions from parents.
885 inheritflags( childp )
893 headp = childp -> cyclehead;
894 if ( childp == headp ) {
896 * just a regular child, check its parents
898 childp -> printflag = FALSE;
899 childp -> propfraction = 0.0;
900 for (arcp = childp -> parents ; arcp ; arcp = arcp -> arc_parentlist) {
901 parentp = arcp -> arc_parentp;
902 if ( childp == parentp ) {
905 childp -> printflag |= parentp -> printflag;
907 * if the child was never actually called
908 * (e.g. this arc is static (and all others are, too))
909 * no time propagates along this arc.
911 if ( arcp -> arc_flags & DEADARC ) {
914 if ( childp -> npropcall ) {
915 childp -> propfraction += parentp -> propfraction
916 * ( ( (double) arcp -> arc_count )
917 / ( (double) childp -> npropcall ) );
922 * its a member of a cycle, look at all parents from
925 headp -> printflag = FALSE;
926 headp -> propfraction = 0.0;
927 for ( memp = headp -> cnext ; memp ; memp = memp -> cnext ) {
928 for (arcp = memp->parents ; arcp ; arcp = arcp->arc_parentlist) {
929 if ( arcp -> arc_parentp -> cyclehead == headp ) {
932 parentp = arcp -> arc_parentp;
933 headp -> printflag |= parentp -> printflag;
935 * if the cycle was never actually called
936 * (e.g. this arc is static (and all others are, too))
937 * no time propagates along this arc.
939 if ( arcp -> arc_flags & DEADARC ) {
942 if ( headp -> npropcall ) {
943 headp -> propfraction += parentp -> propfraction
944 * ( ( (double) arcp -> arc_count )
945 / ( (double) headp -> npropcall ) );
949 for ( memp = headp ; memp ; memp = memp -> cnext ) {
950 memp -> printflag = headp -> printflag;
951 memp -> propfraction = headp -> propfraction;