This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
your libgcov patch
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: rakdver at atrey dot karlin dot mff dot cuni dot cz, gcc-patches at gcc dot gnu dot org
- Date: Mon, 31 Mar 2003 20:19:01 +0100
- Subject: your libgcov patch
- Organization: Codesourcery LLC
Zdenek,
your patch
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.
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?
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
The voices in my head said this was stupid too
nathan at codesourcery dot com : http://www.cs.bris.ac.uk/~nathan/ : nathan at acm dot org