[BACK]Return to arcs.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / gprof

Diff for /src/usr.bin/gprof/arcs.c between version 1.7 and 1.8

version 1.7, 2003/06/03 02:56:08 version 1.8, 2004/07/20 08:46:23
Line 45 
Line 45 
 int viable;  int viable;
 int newcycle;  int newcycle;
 int oldcycle;  int oldcycle;
   void printsubcycle(cltype *);
 #endif /* DEBUG */  #endif /* DEBUG */
   
     /*      /*
Line 60 
Line 61 
   
 #   ifdef DEBUG  #   ifdef DEBUG
         if ( debug & TALLYDEBUG ) {          if ( debug & TALLYDEBUG ) {
             printf( "[addarc] %d arcs from %s to %s\n" ,              printf( "[addarc] %ld arcs from %s to %s\n" ,
                     count , parentp -> name , childp -> name );                      count , parentp -> name , childp -> name );
         }          }
 #   endif /* DEBUG */  #   endif /* DEBUG */
Line 71 
Line 72 
              */               */
 #       ifdef DEBUG  #       ifdef DEBUG
             if ( debug & TALLYDEBUG ) {              if ( debug & TALLYDEBUG ) {
                 printf( "[tally] hit %d += %d\n" ,                  printf( "[tally] hit %ld += %ld\n" ,
                         arcp -> arc_count , count );                          arcp -> arc_count , count );
             }              }
 #       endif /* DEBUG */  #       endif /* DEBUG */
Line 173 
Line 174 
              */               */
 #       ifdef DEBUG  #       ifdef DEBUG
             if ( debug & BREAKCYCLE ) {              if ( debug & BREAKCYCLE ) {
                 printf("[doarcs] pass %d, cycle(s) %d\n" , pass , ncycle );                  printf("[doarcs] pass %ld, cycle(s) %d\n" , pass , ncycle );
             }              }
 #       endif /* DEBUG */  #       endif /* DEBUG */
         if ( pass == 1 ) {          if ( pass == 1 ) {
Line 341 
Line 342 
             if ( debug & PROPDEBUG ) {              if ( debug & PROPDEBUG ) {
                 printf( "[dotime] child \t" );                  printf( "[dotime] child \t" );
                 printname( childp );                  printname( childp );
                 printf( " with %f %f %d/%d\n" ,                  printf( " with %f %f %ld/%ld\n" ,
                         childp -> time , childp -> childtime ,                          childp -> time , childp -> childtime ,
                         arcp -> arc_count , childp -> npropcall );                          arcp -> arc_count , childp -> npropcall );
                 printf( "[dotime] parent\t" );                  printf( "[dotime] parent\t" );
Line 379 
Line 380 
          */           */
     cyclenl = (nltype *) calloc( ncycle + 1 , sizeof( nltype ) );      cyclenl = (nltype *) calloc( ncycle + 1 , sizeof( nltype ) );
     if ( cyclenl == 0 )      if ( cyclenl == 0 )
         errx(0, "No room for %d bytes of cycle headers",          errx(0, "No room for %ld bytes of cycle headers",
             (ncycle + 1) * sizeof(nltype));              (ncycle + 1) * sizeof(nltype));
         /*          /*
          *      now link cycles to true cycleheads,           *      now link cycles to true cycleheads,
Line 482 
Line 483 
         done = FALSE;          done = FALSE;
         cyclestack = (arctype **) calloc( size + 1 , sizeof( arctype *) );          cyclestack = (arctype **) calloc( size + 1 , sizeof( arctype *) );
         if ( cyclestack == 0 ) {          if ( cyclestack == 0 ) {
             warnx("No room for %d bytes of cycle stack" ,              warnx("No room for %ld bytes of cycle stack" ,
                 (size + 1) * sizeof(arctype *));                  (size + 1) * sizeof(arctype *));
             return (done);              return (done);
         }          }
Line 602 
Line 603 
     clp = (cltype *)      clp = (cltype *)
         calloc( 1 , sizeof ( cltype ) + ( size - 1 ) * sizeof( arctype * ) );          calloc( 1 , sizeof ( cltype ) + ( size - 1 ) * sizeof( arctype * ) );
     if ( clp == 0 ) {      if ( clp == 0 ) {
         warnx("No room for %d bytes of subcycle storage" ,          warnx("No room for %ld bytes of subcycle storage" ,
             sizeof(cltype) + (size - 1) * sizeof(arctype *));              sizeof(cltype) + (size - 1) * sizeof(arctype *));
         return( FALSE );          return( FALSE );
     }      }
Line 750 
Line 751 
 }  }
   
 #ifdef DEBUG  #ifdef DEBUG
   void
 printsubcycle( clp )  printsubcycle( clp )
     cltype      *clp;      cltype      *clp;
 {  {
Line 760 
Line 762 
     printf( "%s <cycle %d>\n" , (*arcpp) -> arc_parentp -> name ,      printf( "%s <cycle %d>\n" , (*arcpp) -> arc_parentp -> name ,
         (*arcpp) -> arc_parentp -> cycleno ) ;          (*arcpp) -> arc_parentp -> cycleno ) ;
     for ( endlist = &clp -> list[ clp -> size ]; arcpp < endlist ; arcpp++ )      for ( endlist = &clp -> list[ clp -> size ]; arcpp < endlist ; arcpp++ )
         printf( "\t(%d) -> %s\n" , (*arcpp) -> arc_count ,          printf( "\t(%ld) -> %s\n" , (*arcpp) -> arc_count ,
             (*arcpp) -> arc_childp -> name ) ;              (*arcpp) -> arc_childp -> name ) ;
 }  }
 #endif /* DEBUG */  #endif /* DEBUG */

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8