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: is dump_histogram_value HIST_TYPE_SINGLE_VALUE dump correct ?


> 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


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