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";
40 #include <sys/cdefs.h>
41 __FBSDID("$FreeBSD$");
54 * add (or just increment) an arc
57 addarc( parentp , childp , count )
65 if ( debug & TALLYDEBUG ) {
66 printf( "[addarc] %ld arcs from %s to %s\n" ,
67 count , parentp -> name , childp -> name );
70 arcp = arclookup( parentp , childp );
73 * a hit: just increment the count.
76 if ( debug & TALLYDEBUG ) {
77 printf( "[tally] hit %ld += %ld\n" ,
78 arcp -> arc_count , count );
81 arcp -> arc_count += count;
84 arcp = (arctype *)calloc( 1 , sizeof *arcp );
86 errx( 1 , "malloc failed" );
87 arcp -> arc_parentp = parentp;
88 arcp -> arc_childp = childp;
89 arcp -> arc_count = count;
91 * prepend this child to the children of this parent
93 arcp -> arc_childlist = parentp -> children;
94 parentp -> children = arcp;
96 * prepend this parent to the parents of this child
98 arcp -> arc_parentlist = childp -> parents;
99 childp -> parents = arcp;
103 * the code below topologically sorts the graph (collapsing cycles),
104 * and propagates time bottom up and flags top down.
108 * the topologically sorted name list pointers
113 topcmp( npp1 , npp2 )
117 return (*npp1) -> toporder - (*npp2) -> toporder;
123 nltype *parentp, **timesortnlp;
129 * initialize various things:
130 * zero out child times.
131 * count self-recursive calls.
132 * indicate that nothing is on cycles.
134 for ( parentp = nl ; parentp < npe ; parentp++ ) {
135 parentp -> childtime = 0.0;
136 arcp = arclookup( parentp , parentp );
138 parentp -> ncall -= arcp -> arc_count;
139 parentp -> selfcalls = arcp -> arc_count;
141 parentp -> selfcalls = 0;
143 parentp -> npropcall = parentp -> ncall;
144 parentp -> propfraction = 0.0;
145 parentp -> propself = 0.0;
146 parentp -> propchild = 0.0;
147 parentp -> printflag = FALSE;
148 parentp -> toporder = DFN_NAN;
149 parentp -> cycleno = 0;
150 parentp -> cyclehead = parentp;
151 parentp -> cnext = 0;
153 for ( pass = 1 ; ; pass++ ) {
155 * topologically order things
156 * if any node is unnumbered,
157 * number it and any of its descendents.
159 for ( dfn_init() , parentp = nl ; parentp < npe ; parentp++ ) {
160 if ( parentp -> toporder == DFN_NAN ) {
165 * link together nodes on the same cycle
169 * if no cycles to break up, proceed
174 * analyze cycles to determine breakup
177 if ( debug & BREAKCYCLE ) {
178 printf("[doarcs] pass %ld, cycle(s) %d\n" , pass , ncycle );
182 printf( "\n\n%s %s\n%s %d:\n" ,
183 "The following arcs were deleted" ,
184 "from the propagation calculation" ,
185 "to reduce the maximum cycle size to", cyclethreshold );
187 if ( cycleanalyze() )
191 for ( parentp = nl ; parentp < npe ; parentp++ ) {
192 parentp -> toporder = DFN_NAN;
193 parentp -> cycleno = 0;
194 parentp -> cyclehead = parentp;
195 parentp -> cnext = 0;
201 printf( "\tNone\n\n" );
204 * Sort the symbol table in reverse topological order
206 topsortnlp = (nltype **) calloc( nname , sizeof(nltype *) );
207 if ( topsortnlp == (nltype **) 0 )
208 errx( 1 , "[doarcs] ran out of memory for topo sorting" );
209 for ( index = 0 ; index < nname ; index += 1 ) {
210 topsortnlp[ index ] = &nl[ index ];
212 qsort( topsortnlp , nname , sizeof(nltype *) , topcmp );
214 if ( debug & DFNDEBUG ) {
215 printf( "[doarcs] topological sort listing\n" );
216 for ( index = 0 ; index < nname ; index += 1 ) {
217 printf( "[doarcs] " );
218 printf( "%d:" , topsortnlp[ index ] -> toporder );
219 printname( topsortnlp[ index ] );
225 * starting from the topological top,
226 * propagate print flags to children.
227 * also, calculate propagation fractions.
228 * this happens before time propagation
229 * since time propagation uses the fractions.
233 * starting from the topological bottom,
234 * propagate children times up to parents.
238 * Now, sort by propself + propchild.
239 * sorting both the regular function names
242 timesortnlp = (nltype **) calloc( nname + ncycle , sizeof(nltype *) );
243 if ( timesortnlp == (nltype **) 0 )
244 errx( 1 , "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 );
264 for ( index = 0 ; index < nname ; index += 1 ) {
265 timepropagate( topsortnlp[ index ] );
270 timepropagate( parentp )
278 if ( parentp -> propfraction == 0.0 ) {
282 * gather time from children of this parent.
284 for ( arcp = parentp -> children ; arcp ; arcp = arcp -> arc_childlist ) {
285 childp = arcp -> arc_childp;
286 if ( arcp -> arc_flags & DEADARC ) {
289 if ( arcp -> arc_count == 0 ) {
292 if ( childp == parentp ) {
295 if ( childp -> propfraction == 0.0 ) {
298 if ( childp -> cyclehead != childp ) {
299 if ( parentp -> cycleno == childp -> cycleno ) {
302 if ( parentp -> toporder <= childp -> toporder ) {
303 fprintf( stderr , "[propagate] toporder botches\n" );
305 childp = childp -> cyclehead;
307 if ( parentp -> toporder <= childp -> toporder ) {
308 fprintf( stderr , "[propagate] toporder botches\n" );
312 if ( childp -> npropcall == 0 ) {
316 * distribute time for this arc
318 arcp -> arc_time = childp -> time
319 * ( ( (double) arcp -> arc_count ) /
320 ( (double) childp -> npropcall ) );
321 arcp -> arc_childtime = childp -> childtime
322 * ( ( (double) arcp -> arc_count ) /
323 ( (double) childp -> npropcall ) );
324 share = arcp -> arc_time + arcp -> arc_childtime;
325 parentp -> childtime += share;
327 * ( 1 - propfraction ) gets lost along the way
329 propshare = parentp -> propfraction * share;
331 * fix things for printing
333 parentp -> propchild += propshare;
334 arcp -> arc_time *= parentp -> propfraction;
335 arcp -> arc_childtime *= parentp -> propfraction;
337 * add this share to the parent's cycle header, if any.
339 if ( parentp -> cyclehead != parentp ) {
340 parentp -> cyclehead -> childtime += share;
341 parentp -> cyclehead -> propchild += propshare;
344 if ( debug & PROPDEBUG ) {
345 printf( "[dotime] child \t" );
347 printf( " with %f %f %ld/%ld\n" ,
348 childp -> time , childp -> childtime ,
349 arcp -> arc_count , childp -> npropcall );
350 printf( "[dotime] parent\t" );
351 printname( parentp );
352 printf( "\n[dotime] share %f\n" , share );
361 register nltype *nlp;
362 register nltype *cyclenlp;
368 * Count the number of cycles, and initialize the cycle lists
371 for ( nlp = nl ; nlp < npe ; nlp++ ) {
373 * this is how you find unattached cycles
375 if ( nlp -> cyclehead == nlp && nlp -> cnext != 0 ) {
380 * cyclenl is indexed by cycle number:
381 * i.e. it is origin 1, not origin 0.
383 cyclenl = (nltype *) calloc( ncycle + 1 , sizeof( nltype ) );
385 errx( 1 , "no room for %d bytes of cycle headers" ,
386 ( ncycle + 1 ) * sizeof( nltype ) );
388 * now link cycles to true cycleheads,
389 * number them, accumulate the data for the cycle
392 for ( nlp = nl ; nlp < npe ; nlp++ ) {
393 if ( !( nlp -> cyclehead == nlp && nlp -> cnext != 0 ) ) {
397 cyclenlp = &cyclenl[cycle];
398 cyclenlp -> name = 0; /* the name */
399 cyclenlp -> value = 0; /* the pc entry point */
400 cyclenlp -> time = 0.0; /* ticks in this routine */
401 cyclenlp -> childtime = 0.0; /* cumulative ticks in children */
402 cyclenlp -> ncall = 0; /* how many times called */
403 cyclenlp -> selfcalls = 0; /* how many calls to self */
404 cyclenlp -> propfraction = 0.0; /* what % of time propagates */
405 cyclenlp -> propself = 0.0; /* how much self time propagates */
406 cyclenlp -> propchild = 0.0; /* how much child time propagates */
407 cyclenlp -> printflag = TRUE; /* should this be printed? */
408 cyclenlp -> index = 0; /* index in the graph list */
409 cyclenlp -> toporder = DFN_NAN; /* graph call chain top-sort order */
410 cyclenlp -> cycleno = cycle; /* internal number of cycle on */
411 cyclenlp -> cyclehead = cyclenlp; /* pointer to head of cycle */
412 cyclenlp -> cnext = nlp; /* pointer to next member of cycle */
413 cyclenlp -> parents = 0; /* list of caller arcs */
414 cyclenlp -> children = 0; /* list of callee arcs */
416 if ( debug & CYCLEDEBUG ) {
417 printf( "[cyclelink] " );
419 printf( " is the head of cycle %d\n" , cycle );
423 * link members to cycle header
425 for ( memberp = nlp ; memberp ; memberp = memberp -> cnext ) {
426 memberp -> cycleno = cycle;
427 memberp -> cyclehead = cyclenlp;
430 * count calls from outside the cycle
431 * and those among cycle members
433 for ( memberp = nlp ; memberp ; memberp = memberp -> cnext ) {
434 for ( arcp=memberp->parents ; arcp ; arcp=arcp->arc_parentlist ) {
435 if ( arcp -> arc_parentp == memberp ) {
438 if ( arcp -> arc_parentp -> cycleno == cycle ) {
439 cyclenlp -> selfcalls += arcp -> arc_count;
441 cyclenlp -> npropcall += arcp -> arc_count;
449 * analyze cycles to determine breakup
454 arctype **cyclestack;
467 * calculate the size of the cycle, and find nodes that
468 * exit the cycle as they are desirable targets to cut
469 * some of their parents
471 for ( done = TRUE , cycleno = 1 ; cycleno <= ncycle ; cycleno++ ) {
473 for (nlp = cyclenl[ cycleno ] . cnext; nlp; nlp = nlp -> cnext) {
475 nlp -> parentcnt = 0;
476 nlp -> flags &= ~HASCYCLEXIT;
477 for ( arcp = nlp -> parents; arcp; arcp = arcp -> arc_parentlist ) {
478 nlp -> parentcnt += 1;
479 if ( arcp -> arc_parentp -> cycleno != cycleno )
480 nlp -> flags |= HASCYCLEXIT;
483 if ( size <= cyclethreshold )
486 cyclestack = (arctype **) calloc( size + 1 , sizeof( arctype *) );
487 if ( cyclestack == 0 )
488 errx( 1, "no room for %d bytes of cycle stack" ,
489 ( 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);
528 descend( node , stkstart , stkp )
536 for ( arcp = node -> children ; arcp ; arcp = arcp -> arc_childlist ) {
540 if ( arcp -> arc_childp -> cycleno != node -> cycleno
541 || ( arcp -> arc_childp -> flags & VISITED )
542 || ( arcp -> arc_flags & DEADARC ) )
548 if ( arcp -> arc_childp -> flags & CYCLEHEAD ) {
549 if ( addcycle( stkstart , stkp ) == FALSE )
553 arcp -> arc_childp -> flags |= VISITED;
554 ret = descend( arcp -> arc_childp , stkstart , stkp + 1 );
555 arcp -> arc_childp -> flags &= ~VISITED;
563 addcycle( stkstart , stkend )
576 size = stkend - stkstart + 1;
579 for ( arcpp = stkstart , minarc = *arcpp ; arcpp <= stkend ; arcpp++ ) {
580 if ( *arcpp > minarc )
585 for ( clp = cyclehead ; clp ; clp = clp -> next ) {
586 if ( clp -> size != size )
589 endlist = &clp -> list[ size ];
590 for ( arcpp = clp -> list ; arcpp < endlist ; arcpp++ ) {
591 if ( *stkp++ != *arcpp )
596 if ( arcpp == endlist ) {
604 calloc( 1 , sizeof ( cltype ) + ( size - 1 ) * sizeof( arctype * ) );
606 warnx( "no room for %d bytes of subcycle storage" ,
607 sizeof ( cltype ) + ( size - 1 ) * sizeof( arctype * ) );
611 endlist = &clp -> list[ size ];
612 for ( arcpp = clp -> list ; arcpp < endlist ; arcpp++ ) {
613 arcp = *arcpp = *stkp++;
616 arcp -> arc_cyclecnt++;
617 if ( ( arcp -> arc_flags & ONLIST ) == 0 ) {
618 arcp -> arc_flags |= ONLIST;
619 arcp -> arc_next = archead;
624 clp -> next = cyclehead;
628 if ( debug & SUBCYCLELIST ) {
629 printsubcycle( clp );
633 if ( cyclecnt >= CYCLEMAX )
647 arctype *maxexitarcp;
648 arctype *maxwithparentarcp;
649 arctype *maxnoparentarcp;
651 int maxwithparentcnt;
658 maxwithparentcnt = 0;
660 for ( endlist = &archead , arcp = archead ; arcp ; ) {
661 if ( arcp -> arc_cyclecnt == 0 ) {
662 arcp -> arc_flags &= ~ONLIST;
663 *endlist = arcp -> arc_next;
664 arcp -> arc_next = 0;
668 if ( arcp -> arc_childp -> flags & HASCYCLEXIT ) {
669 if ( arcp -> arc_cyclecnt > maxexitcnt ||
670 ( arcp -> arc_cyclecnt == maxexitcnt &&
671 arcp -> arc_cyclecnt < maxexitarcp -> arc_count ) ) {
672 maxexitcnt = arcp -> arc_cyclecnt;
675 } else if ( arcp -> arc_childp -> parentcnt > 1 ) {
676 if ( arcp -> arc_cyclecnt > maxwithparentcnt ||
677 ( arcp -> arc_cyclecnt == maxwithparentcnt &&
678 arcp -> arc_cyclecnt < maxwithparentarcp -> arc_count ) ) {
679 maxwithparentcnt = arcp -> arc_cyclecnt;
680 maxwithparentarcp = arcp;
683 if ( arcp -> arc_cyclecnt > maxnoparentcnt ||
684 ( arcp -> arc_cyclecnt == maxnoparentcnt &&
685 arcp -> arc_cyclecnt < maxnoparentarcp -> arc_count ) ) {
686 maxnoparentcnt = arcp -> arc_cyclecnt;
687 maxnoparentarcp = arcp;
690 endlist = &arcp -> arc_next;
691 arcp = arcp -> arc_next;
693 if ( maxexitcnt > 0 ) {
695 * first choice is edge leading to node with out-of-cycle parent
697 maxarcp = maxexitarcp;
701 } else if ( maxwithparentcnt > 0 ) {
703 * second choice is edge leading to node with at least one
704 * other in-cycle parent
706 maxarcp = maxwithparentarcp;
712 * last choice is edge leading to node with only this arc as
713 * a parent (as it will now be orphaned)
715 maxarcp = maxnoparentarcp;
720 maxarcp -> arc_flags |= DEADARC;
721 maxarcp -> arc_childp -> parentcnt -= 1;
722 maxarcp -> arc_childp -> npropcall -= maxarcp -> arc_count;
724 if ( debug & BREAKCYCLE ) {
725 printf( "%s delete %s arc: %s (%ld) -> %s from %u cycle(s)\n" ,
726 "[compresslist]" , type , maxarcp -> arc_parentp -> name ,
727 maxarcp -> arc_count , maxarcp -> arc_childp -> name ,
728 maxarcp -> arc_cyclecnt );
731 printf( "\t%s to %s with %ld calls\n" , maxarcp -> arc_parentp -> name ,
732 maxarcp -> arc_childp -> name , maxarcp -> arc_count );
734 for ( clp = cyclehead ; clp ; ) {
735 endlist = &clp -> list[ clp -> size ];
736 for ( arcpp = clp -> list ; arcpp < endlist ; arcpp++ )
737 if ( (*arcpp) -> arc_flags & DEADARC )
739 if ( arcpp == endlist ) {
744 for ( arcpp = clp -> list ; arcpp < endlist ; arcpp++ )
745 (*arcpp) -> arc_cyclecnt--;
762 printf( "%s <cycle %d>\n" , (*arcpp) -> arc_parentp -> name ,
763 (*arcpp) -> arc_parentp -> cycleno ) ;
764 for ( endlist = &clp -> list[ clp -> size ]; arcpp < endlist ; arcpp++ )
765 printf( "\t(%ld) -> %s\n" , (*arcpp) -> arc_count ,
766 (*arcpp) -> arc_childp -> name ) ;
777 for ( cycle = 1 ; cycle <= ncycle ; cycle += 1 ) {
778 cyclenlp = &cyclenl[ cycle ];
779 for ( childp = cyclenlp -> cnext ; childp ; childp = childp -> cnext ) {
780 if ( childp -> propfraction == 0.0 ) {
782 * all members have the same propfraction except those
783 * that were excluded with -E
787 cyclenlp -> time += childp -> time;
789 cyclenlp -> propself = cyclenlp -> propfraction * cyclenlp -> time;
794 * in one top to bottom pass over the topologically sorted namelist
796 * printflag as the union of parents' printflags
797 * propfraction as the sum of fractional parents' propfractions
798 * and while we're here, sum time for functions.
808 for ( index = nname-1 ; index >= 0 ; index -= 1 ) {
809 childp = topsortnlp[ index ];
811 * if we haven't done this function or cycle,
812 * inherit things from parent.
813 * this way, we are linear in the number of arcs
814 * since we do all members of a cycle (and the cycle itself)
815 * as we hit the first member of the cycle.
817 if ( childp -> cyclehead != oldhead ) {
818 oldhead = childp -> cyclehead;
819 inheritflags( childp );
822 if ( debug & PROPDEBUG ) {
823 printf( "[doflags] " );
825 printf( " inherits printflag %d and propfraction %f\n" ,
826 childp -> printflag , childp -> propfraction );
829 if ( ! childp -> printflag ) {
832 * it gets turned on by
834 * or there not being any -f list and not being on -e list.
836 if ( onlist( flist , childp -> name )
837 || ( !fflag && !onlist( elist , childp -> name ) ) ) {
838 childp -> printflag = TRUE;
842 * this function has printing parents:
843 * maybe someone wants to shut it up
844 * by putting it on -e list. (but favor -f over -e)
846 if ( ( !onlist( flist , childp -> name ) )
847 && onlist( elist , childp -> name ) ) {
848 childp -> printflag = FALSE;
851 if ( childp -> propfraction == 0.0 ) {
853 * no parents to pass time to.
854 * collect time from children if
856 * or there isn't any -F list and its not on -E list.
858 if ( onlist( Flist , childp -> name )
859 || ( !Fflag && !onlist( Elist , childp -> name ) ) ) {
860 childp -> propfraction = 1.0;
864 * it has parents to pass time to,
865 * but maybe someone wants to shut it up
866 * by putting it on -E list. (but favor -F over -E)
868 if ( !onlist( Flist , childp -> name )
869 && onlist( Elist , childp -> name ) ) {
870 childp -> propfraction = 0.0;
873 childp -> propself = childp -> time * childp -> propfraction;
874 printtime += childp -> propself;
876 if ( debug & PROPDEBUG ) {
877 printf( "[doflags] " );
879 printf( " ends up with printflag %d and propfraction %f\n" ,
880 childp -> printflag , childp -> propfraction );
881 printf( "time %f propself %f printtime %f\n" ,
882 childp -> time , childp -> propself , printtime );
889 * check if any parent of this child
890 * (or outside parents of this cycle)
891 * have their print flags on and set the
892 * print flag of the child (cycle) appropriately.
893 * similarly, deal with propagation fractions from parents.
896 inheritflags( childp )
904 headp = childp -> cyclehead;
905 if ( childp == headp ) {
907 * just a regular child, check its parents
909 childp -> printflag = FALSE;
910 childp -> propfraction = 0.0;
911 for (arcp = childp -> parents ; arcp ; arcp = arcp -> arc_parentlist) {
912 parentp = arcp -> arc_parentp;
913 if ( childp == parentp ) {
916 childp -> printflag |= parentp -> printflag;
918 * if the child was never actually called
919 * (e.g. this arc is static (and all others are, too))
920 * no time propagates along this arc.
922 if ( arcp -> arc_flags & DEADARC ) {
925 if ( childp -> npropcall ) {
926 childp -> propfraction += parentp -> propfraction
927 * ( ( (double) arcp -> arc_count )
928 / ( (double) childp -> npropcall ) );
933 * its a member of a cycle, look at all parents from
936 headp -> printflag = FALSE;
937 headp -> propfraction = 0.0;
938 for ( memp = headp -> cnext ; memp ; memp = memp -> cnext ) {
939 for (arcp = memp->parents ; arcp ; arcp = arcp->arc_parentlist) {
940 if ( arcp -> arc_parentp -> cyclehead == headp ) {
943 parentp = arcp -> arc_parentp;
944 headp -> printflag |= parentp -> printflag;
946 * if the cycle was never actually called
947 * (e.g. this arc is static (and all others are, too))
948 * no time propagates along this arc.
950 if ( arcp -> arc_flags & DEADARC ) {
953 if ( headp -> npropcall ) {
954 headp -> propfraction += parentp -> propfraction
955 * ( ( (double) arcp -> arc_count )
956 / ( (double) headp -> npropcall ) );
960 for ( memp = headp ; memp ; memp = memp -> cnext ) {
961 memp -> printflag = headp -> printflag;
962 memp -> propfraction = headp -> propfraction;