Initial python support.
[deliverable/binutils-gdb.git] / gprof / hist.c
index 465655e93096beb471f0d5eb090dca4f7c64ee52..d0c02d3f0d4bae646bb4e53e4c0fb07fc2c58167 100644 (file)
@@ -1,13 +1,13 @@
 /* hist.c  -  Histogram related operations.
 
-   Copyright 1999, 2000, 2001, 2002, 2004, 2005
+   Copyright 1999, 2000, 2001, 2002, 2004, 2005, 2007
    Free Software Foundation, Inc.
 
    This file is part of GNU Binutils.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -20,8 +20,8 @@
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 \f
-#include "libiberty.h"
 #include "gprof.h"
+#include "libiberty.h"
 #include "search_list.h"
 #include "source.h"
 #include "symtab.h"
@@ -296,10 +296,10 @@ scale_and_align_entries ()
 
   for (sym = symtab.base; sym < symtab.limit; sym++)
     {
-      sym->hist.scaled_addr = sym->addr / sizeof (UNIT);
-
       histogram *r = find_histogram_for_pc (sym->addr);
 
+      sym->hist.scaled_addr = sym->addr / sizeof (UNIT);
+
       if (r)
        {
          bin_of_entry = (sym->hist.scaled_addr - r->lowpc) / hist_scale;
@@ -464,7 +464,7 @@ print_header (int prefix)
   if (bsd_style_output)
     {
       printf (_("\ngranularity: each sample hit covers %ld byte(s)"),
-             (long) hist_scale * sizeof (UNIT));
+             (long) hist_scale * (long) sizeof (UNIT));
       if (total_time > 0.0)
        {
          printf (_(" for %.2f%% of %.2f %s\n\n"),
@@ -703,7 +703,7 @@ hist_clip_symbol_address (bfd_vma *p_lowpc, bfd_vma *p_highpc)
            {
              fprintf (stderr,
                       _("%s: found a symbol that covers "
-                        "several histogram records")
+                        "several histogram records"),
                         whoami);
              done (1);
            }
This page took 0.074424 seconds and 4 git commands to generate.