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

Diff for /src/usr.bin/gprof/gprof.c between version 1.9 and 1.10

version 1.9, 2001/11/19 19:02:14 version 1.10, 2002/03/25 16:30:55
Line 98 
Line 98 
             debug |= ANYDEBUG;              debug |= ANYDEBUG;
 #           ifdef DEBUG  #           ifdef DEBUG
                 printf("[main] debug = %d\n", debug);                  printf("[main] debug = %d\n", debug);
 #           else not DEBUG  #           else /* not DEBUG */
                 warnx("-d ignored");                  warnx("-d ignored");
 #           endif DEBUG  #           endif /* DEBUG */
             break;              break;
         case 'E':          case 'E':
             ++argv;              ++argv;
Line 240 
Line 240 
                 printf("[getnfile] 0X%08x\t%s\n", nl[j].value, nl[j].name);                  printf("[getnfile] 0X%08x\t%s\n", nl[j].value, nl[j].name);
             }              }
         }          }
 #   endif DEBUG  #   endif /* DEBUG */
 }  }
   
 void  void
Line 299 
Line 299 
                     printf( "[getsymtab] rejecting: 0x%x %s\n" ,                      printf( "[getsymtab] rejecting: 0x%x %s\n" ,
                             nbuf.n_type , strtab + nbuf.n_un.n_strx );                              nbuf.n_type , strtab + nbuf.n_un.n_strx );
                 }                  }
 #           endif DEBUG  #           endif /* DEBUG */
             continue;              continue;
         }          }
         npe->value = nbuf.n_value;          npe->value = nbuf.n_value;
Line 309 
Line 309 
                 printf( "[getsymtab] %d %s 0x%08x\n" ,                  printf( "[getsymtab] %d %s 0x%08x\n" ,
                         nname , npe -> name , npe -> value );                          nname , npe -> name , npe -> value );
             }              }
 #       endif DEBUG  #       endif /* DEBUG */
         npe++;          npe++;
         nname++;          nname++;
     }      }
Line 365 
Line 365 
                 printf( "[getpfile] frompc 0x%x selfpc 0x%x count %d\n" ,                  printf( "[getpfile] frompc 0x%x selfpc 0x%x count %d\n" ,
                         arc.raw_frompc , arc.raw_selfpc , arc.raw_count );                          arc.raw_frompc , arc.raw_selfpc , arc.raw_count );
             }              }
 #       endif DEBUG  #       endif /* DEBUG */
             /*              /*
              *  add this arc               *  add this arc
              */               */
Line 422 
Line 422 
                 sampbytes , nsamples );                  sampbytes , nsamples );
             printf( "[openpfile] sample rate %d\n" , hz );              printf( "[openpfile] sample rate %d\n" , hz );
         }          }
 #   endif DEBUG  #   endif /* DEBUG */
     return(pfile);      return(pfile);
 }  }
   
Line 448 
Line 448 
             printf( "[tally] arc from %s to %s traversed %d times\n" ,              printf( "[tally] arc from %s to %s traversed %d times\n" ,
                     parentp -> name , childp -> name , rawp -> raw_count );                      parentp -> name , childp -> name , rawp -> raw_count );
         }          }
 #   endif DEBUG  #   endif /* DEBUG */
     addarc( parentp , childp , rawp -> raw_count );      addarc( parentp , childp , rawp -> raw_count );
 }  }
   
Line 491 
Line 491 
                     printf( "[dumpsum] frompc 0x%x selfpc 0x%x count %d\n" ,                      printf( "[dumpsum] frompc 0x%x selfpc 0x%x count %d\n" ,
                             arc.raw_frompc , arc.raw_selfpc , arc.raw_count );                              arc.raw_frompc , arc.raw_selfpc , arc.raw_count );
                 }                  }
 #           endif DEBUG  #           endif /* DEBUG */
         }          }
     }      }
     fclose( sfile );      fclose( sfile );
Line 591 
Line 591 
                 printf( "[asgnsamples] pcl 0x%x pch 0x%x ccnt %d\n" ,                  printf( "[asgnsamples] pcl 0x%x pch 0x%x ccnt %d\n" ,
                         pcl , pch , ccnt );                          pcl , pch , ccnt );
             }              }
 #       endif DEBUG  #       endif /* DEBUG */
         totime += time;          totime += time;
         for (j = j - 1; j < nname; j++) {          for (j = j - 1; j < nname; j++) {
             svalue0 = nl[j].svalue;              svalue0 = nl[j].svalue;
Line 617 
Line 617 
                                 nl[j].name,                                  nl[j].name,
                                 overlap * time / scale, overlap);                                  overlap * time / scale, overlap);
                     }                      }
 #               endif DEBUG  #               endif /* DEBUG */
                 nl[j].time += overlap * time / scale;                  nl[j].time += overlap * time / scale;
             }              }
         }          }
Line 626 
Line 626 
         if (debug & SAMPLEDEBUG) {          if (debug & SAMPLEDEBUG) {
             printf("[asgnsamples] totime %f\n", totime);              printf("[asgnsamples] totime %f\n", totime);
         }          }
 #   endif DEBUG  #   endif /* DEBUG */
 }  }
   
   
Line 671 
Line 671 
                     printf("[alignentries] pushing svalue 0x%x to 0x%x\n",                      printf("[alignentries] pushing svalue 0x%x to 0x%x\n",
                             nlp->svalue, nlp->svalue + UNITS_TO_CODE);                              nlp->svalue, nlp->svalue + UNITS_TO_CODE);
                 }                  }
 #           endif DEBUG  #           endif /* DEBUG */
             nlp->svalue += UNITS_TO_CODE;              nlp->svalue += UNITS_TO_CODE;
         }          }
     }      }

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10