bin_low_pc = lowpc + (bfd_vma) (hist_scale * i); bin_high_pc = lowpc + (bfd_vma) (hist_scale * (i + 1)); time = bin_count; DBG (SAMPLEDEBUG, printf ( "[assign_samples] bin_low_pc=0x%lx, bin_high_pc=0x%lx, bin_count=%d\n", sizeof (UNIT) * bin_low_pc, sizeof (UNIT) * bin_high_pc, bin_count)); total_time += time;    for (j = j - 1; j < symtab.len; ++j) { sym_low_pc = symtab.base[j].hist.scaled_addr; sym_high_pc = symtab.base[j + 1].hist.scaled_addr;  if (bin_high_pc < sym_low_pc) { break; }  if (bin_low_pc >= sym_high_pc) { continue; } overlap = MIN (bin_high_pc, sym_high_pc) - MAX (bin_low_pc, sym_low_pc); if (overlap > 0) { DBG (SAMPLEDEBUG, printf ( "[assign_samples] [0x%lx,0x%lx) %s gets %f ticks %ld overlap\n", symtab.base[j].addr, sizeof (UNIT) * sym_high_pc, symtab.base[j].name, overlap * time / hist_scale, overlap)); addr = symtab.base[j].addr; credit = overlap * time / hist_scale;  if (sym_lookup (&syms[INCL_FLAT], addr) || (syms[INCL_FLAT].len == 0 && !sym_lookup (&syms[EXCL_FLAT], addr))) { symtab.base[j].hist.time += credit; } else { total_time -= credit; } } }
DEFUN_VOID (scale_and_align_entries){  Sym *sym;#if OFFSET_TO_CODE > 0  bfd_vma bin_of_entry;  bfd_vma bin_of_code;#endif  for (sym = symtab.base; sym < symtab.limit; sym++)    {      sym->hist.scaled_addr = sym->addr / sizeof (UNIT);#if OFFSET_TO_CODE > 0      bin_of_entry = (sym->hist.scaled_addr - lowpc) / hist_scale;      bin_of_code = (sym->hist.scaled_addr + UNITS_TO_CODE - lowpc) / hist_scale;      if (bin_of_entry < bin_of_code)	{	  DBG (SAMPLEDEBUG,	       printf ("[scale_and_align_entries] pushing 0x%lx to 0x%lx\n",		 sym->hist.scaled_addr, sym->aligned_addr + UNITS_TO_CODE));	  sym->aligned_addr += UNITS_TO_CODE;	}#endif /* OFFSET_TO_CODE > 0 */    }}