This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: your libgcov patch


Hello,

> 2003-02-26  Zdenek Dvorak  <rakdver at atrey dot karlin dot mff dot cuni dot cz>
> replaced the in-place increment of counters with a separate buffer.

no, the increment is still done in place.  On rtlopt branch we have a
few more things that can be measured (histograms of first few iterations
of loops, histograms of register values and sometimes in future we might
want to have path profiles and other more detailed profiling
information); counters for them are stored in separate sections of the
.da file.  The counters field is used just as a dispatch between those
counters (i.e. its size is currently always exacly one).

Zdenek

> these bits ...
> >       counters = malloc (sizeof (gcov_type *) * ptr->n_counter_sections);
> >       for (ix = 0; ix < ptr->n_counter_sections; ix++)
> > 	counters[ix] = ptr->counter_sections[ix].counters;
> and
> 	
> <		for (jx = fn_info->n_arc_counts; jx--; count_ptr++)
> < 		  if (gcov_read_counter (da_file, &count))
>   		    goto read_error;
> < 		  else
> < 		    *count_ptr += count;
> ---
> > 		  for (jx = 
> fn_info->counter_sections[f_sect_index].n_counters;
> > 		       jx--; counters[sect_index]++)
> > 		    if (gcov_read_counter (da_file, &count))
> > 		      goto read_error;
> > 		    else
> > 		      *counters[sect_index] += count;
> 
> why is that necessary?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]