This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: is dump_histogram_value HIST_TYPE_SINGLE_VALUE dump correct ?
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Tomas Bily <tbily at suse dot cz>
- Cc: jh at suse dot cz, gcc-patches at gcc dot gnu dot org, hubicka at ucw dot cz, tomby at ucw dot cz
- Date: Wed, 17 Jan 2007 01:25:13 +0100
- Subject: Re: is dump_histogram_value HIST_TYPE_SINGLE_VALUE dump correct ?
- References: <20070111155027.GA20960@atrey.karlin.mff.cuni.cz>
> Hi,
>
> value-prof.c (dump_histogram_value):
> case HIST_TYPE_SINGLE_VALUE:
> ....
> fprintf (dump_file, "value:"HOST_WIDEST_INT_PRINT_DEC
> " match:"HOST_WIDEST_INT_PRINT_DEC
> " wrong:"HOST_WIDEST_INT_PRINT_DEC,
> (HOST_WIDEST_INT) hist->hvalue.counters[0],
> (HOST_WIDEST_INT) hist->hvalue.counters[1],
> (HOST_WIDEST_INT) hist->hvalue.counters[2]);
>
> If I understand correctly meaning of single value counters then third
> value means count of all occurrences (match and wrong together). Is it
> correct ?
>
> Then the code can be corrected to:
>
> variant 1:
> fprintf (dump_file, "value:"HOST_WIDEST_INT_PRINT_DEC
> " match:"HOST_WIDEST_INT_PRINT_DEC
> " all:"HOST_WIDEST_INT_PRINT_DEC,
> (HOST_WIDEST_INT) hist->hvalue.counters[0],
> (HOST_WIDEST_INT) hist->hvalue.counters[1],
> (HOST_WIDEST_INT) hist->hvalue.counters[2]);
Yes, this is the preferred variant (we just want to print the real
counters with short descriptions, not to compute new values).
The patch is OK.
If you still don't have write access to CVS, I will commit the patches
tomorrow.
Honza