Print this page
Cstyle cleanup

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sgs/prof/common/prof.c
          +++ new/usr/src/cmd/sgs/prof/common/prof.c
↓ open down ↓ 25 lines elided ↑ open up ↑
  26   26   */
  27   27  
  28   28  /*      Copyright (c) 1988 AT&T */
  29   29  /*        All Rights Reserved   */
  30   30  
  31   31  /*
  32   32   *      Program profiling report generator.
  33   33   *
  34   34   *      Usage:
  35   35   *
  36      - *      prof [-ChsVz] [-a | c | n | t]  [-o  |  x]   [-g  |  l]
       36 + *      prof [-ChsVz] [-a | c | n | t]  [-o  |  x]   [-g  |  l]
  37   37   *          [-m mdata] [prog]
  38   38   *
  39   39   *      Where "prog" is the program that was profiled; "a.out" by default.
  40   40   *      Options are:
  41   41   *
  42   42   *      -n      Sort by symbol name.
  43   43   *      -t      Sort by decreasing time.
  44   44   *      -c      Sort by decreasing number of calls.
  45   45   *      -a      Sort by increasing symbol address.
  46   46   *
↓ open down ↓ 83 lines elided ↑ open up ↑
 130  130          (((ELF32_ST_TYPE(i) == STT_FUNC) ||             \
 131  131                          (ELF32_ST_TYPE(i) == STT_NOTYPE)) &&    \
 132  132                  ((ELF32_ST_BIND(i) == STB_GLOBAL) ||            \
 133  133                          (gflag && (ELF32_ST_BIND(i) == STB_LOCAL))))
 134  134  
 135  135  #define TXTSYM(s, i)    (TS1(s) && TS2(i))
 136  136  
 137  137  int gflag = 0;                  /*  replaces gmatch and gmask */
 138  138  int Cflag = 0;
 139  139  
 140      -PROF_FILE       *ldptr;                 /* For program ("a.out") file. */
      140 +PROF_FILE       *ldptr;         /* For program ("a.out") file. */
 141  141  
 142  142  FILE    *mon_iop;               /* For profile (MON_OUT) file. */
 143  143  char    *sym_fn = "a.out";      /* Default program file name. */
 144  144  char    *mon_fn = MON_OUT;      /* Default profile file name. */
 145  145                                  /* May be changed by "-m file". */
 146  146  
 147  147  long bias;      /* adjusted bias */
 148  148  long temp;      /* for bias adjust */
 149  149  
 150  150  extern void profver(void);
↓ open down ↓ 40 lines elided ↑ open up ↑
 191  191          long sl_count;          /* Count of subroutine calls */
 192  192          float sl_time;          /* Count of clock ticks in this routine, */
 193  193                                  /*              converted to secs. */
 194  194  };
 195  195  
 196  196          /* local structure for tracking synonyms in our symbol list */
 197  197  struct snymEntry {
 198  198          char    *sym_addr;      /* address which has a synonym */
 199  199          int     howMany;        /* # of synonyms for this symbol */
 200  200          int     snymReported;   /* 'was printed in a report line already'  */
 201      -                                /*      flag, */
      201 +                                /*      flag, */
 202  202                                  /*   > 0 report line printed for these syns. */
 203  203                                  /*  == 0 not printed yet. */
 204  204          long    tot_sl_count;   /* total subr calls for these snyms */
 205  205          float   tot_sl_time;    /* total clock ticks (a la sl_time) */
 206  206  };
 207  207  
 208  208  
 209  209  #define AOUTHSZ         (filhdr.f_opthdr)
 210  210  PROF_FILE       filhdr;                 /* profile file descriptor */
 211  211  Elf32_Shdr      *scnhdrp;       /* pointer to first section header */
↓ open down ↓ 1160 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX