This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: your libgcov patch
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 31 Mar 2003 21:37:54 +0200
- Subject: Re: your libgcov patch
- References: <3E8894A5.8080601@codesourcery.com>
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?