OpenCores
URL https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [gprof/] [hist.c] - Diff between revs 25 and 163

Show entire file | Details | Blame | View Log

Rev 25 Rev 163
Line 363... Line 363...
{
{
  bfd_vma bin_low_pc, bin_high_pc;
  bfd_vma bin_low_pc, bin_high_pc;
  bfd_vma sym_low_pc, sym_high_pc;
  bfd_vma sym_low_pc, sym_high_pc;
  bfd_vma overlap, addr;
  bfd_vma overlap, addr;
  unsigned int bin_count;
  unsigned int bin_count;
  unsigned int i, j;
  unsigned int i, j, k;
  double count_time, credit;
  double count_time, credit;
 
 
  bfd_vma lowpc = r->lowpc / sizeof (UNIT);
  bfd_vma lowpc = r->lowpc / sizeof (UNIT);
 
 
  /* Iterate over all sample bins.  */
  /* Iterate over all sample bins.  */
  for (i = 0, j = 1; i < r->num_bins; ++i)
  for (i = 0, k = 1; i < r->num_bins; ++i)
    {
    {
      bin_count = r->sample[i];
      bin_count = r->sample[i];
      if (! bin_count)
      if (! bin_count)
        continue;
        continue;
 
 
Line 387... Line 387...
                    (unsigned long) (sizeof (UNIT) * bin_low_pc),
                    (unsigned long) (sizeof (UNIT) * bin_low_pc),
                    (unsigned long) (sizeof (UNIT) * bin_high_pc),
                    (unsigned long) (sizeof (UNIT) * bin_high_pc),
                    bin_count));
                    bin_count));
      total_time += count_time;
      total_time += count_time;
 
 
      /* Credit all symbols that are covered by bin I.  */
      /* Credit all symbols that are covered by bin I.
      for (j = j - 1; j < symtab.len; ++j)
 
 
         PR gprof/13325: Make sure that K does not get decremented
 
         and J will never be less than 0.  */
 
      for (j = k - 1; j < symtab.len; k = ++j)
        {
        {
          sym_low_pc = symtab.base[j].hist.scaled_addr;
          sym_low_pc = symtab.base[j].hist.scaled_addr;
          sym_high_pc = symtab.base[j + 1].hist.scaled_addr;
          sym_high_pc = symtab.base[j + 1].hist.scaled_addr;
 
 
          /* If high end of bin is below entry address,
          /* If high end of bin is below entry address,

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.