On Wed, 2018-09-12 at 14:36 +0200, Martin Liška wrote:
> Hi.
> 
> This is follow-up of:
> https://gcc.gnu.org/ml/gcc/2018-08/msg00162.html
> 
> I'm suggesting to introduce using colors in order to indicate hotness
> of lines. Legend is printed at the very beginning of the output file.
> Example: https://pasteboard.co/HDxK4Nm.png

One comment: color seems to be being used for two different purposes:
(a) in the left-hand column (presumably the profile count), where e.g.
lines that are 0 are being marked as red
(b) in the middle column (the line number), lines that are > 50% are
being marked as red.

So red seems to be being used both for very hot lines (for the line
number), and for unexecuted lines (for the profile count).

Perhaps the "hotness legend" could instead say something like:

Colorization: profile count: blah blah blah
Colorization: line numbers: hotness: > 50 % > 20% > 10%

to explain both colorization schemes?  (I'm not in love with the above
wording, but hopefully the idea makes sense).

> Patch survives gcov.exp test-suite. Will install next week if no
> objections.
> 
> Martin
> 
> gcc/ChangeLog:
> 
> 2018-09-12  Martin Liska  <mli...@suse.cz>
> 
>       * doc/gcov.texi: Document new option --use-hotness-colors.
>       * gcov.c (struct source_info): Declare new field.
>       (source_info::source_info): Set default for maximum_count.
>       (print_usage): Add new -q option.
>       (process_args): Process it.
>       (accumulate_line_info): Save src->maximum_count.
>       (output_line_beginning): Make color line number if
>       flag_use_hotness_colors is set.
>       (output_line_details): Pass default argument value.
>       (output_lines): Pass src->maximum_count.
> ---
>  gcc/doc/gcov.texi |  8 ++++++-
>  gcc/gcov.c        | 56 +++++++++++++++++++++++++++++++++++++++++--
> ----
>  2 files changed, 56 insertions(+), 8 deletions(-)
> 
> 

Reply via email to