Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Mar 2002 01:47:36 -0800 (PST)
From:      Bruce Evans <bde@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/usr.bin/gprof gprof.c gprof.h printgprof.c
Message-ID:  <200203060947.g269lb014861@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
bde         2002/03/06 01:47:36 PST

  Modified files:
    usr.bin/gprof        gprof.c gprof.h printgprof.c 
  Log:
  Fixed some misspellings of 2 as sizeof(UNIT) so that they won't break
  things when sizeof(UNIT) becomes a runtime parameter.  The relevant 2
  is the one in profil(2)'s scaling of pc's to bucket numbers:
  
             bucket = (pc - offset) / 2 * profil_scale / 65536
  
  gprof(1) must duplicate this scaling, bug for bug compatibly, so it
  must first do an integer division by 2 although this mainly makes
  scales larger than 65536 useless.  sizeof(UNIT) was already wrong in
  gprof4, but there were no problems because the fake profil scale is a
  multiple of 2.
  
  There are also some rounding bugs in the scaling, but these are only
  problems if profil(2) is used directly to create unusual (and not
  useful) scales.
  
  Revision  Changes    Path
  1.15      +10 -10    src/usr.bin/gprof/gprof.c
  1.13      +7 -1      src/usr.bin/gprof/gprof.h
  1.8       +2 -2      src/usr.bin/gprof/printgprof.c

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203060947.g269lb014861>