diff options
author | Martin Liska <mliska@suse.cz> | 2018-09-24 13:28:38 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-09-24 11:28:38 +0000 |
commit | e595522aa89d0cd427d5251456ff7cf347319a9c (patch) | |
tree | ae6f720ca763ea624a48d781f72198c4a3737fad /gcc/gcov.c | |
parent | bda815c5972fa6a22967ce5a8acf4181cc320757 (diff) | |
download | gcc-e595522aa89d0cd427d5251456ff7cf347319a9c.zip gcc-e595522aa89d0cd427d5251456ff7cf347319a9c.tar.gz gcc-e595522aa89d0cd427d5251456ff7cf347319a9c.tar.bz2 |
Improve colorization legend in gcov reports.
2018-09-24 Martin Liska <mliska@suse.cz>
* gcov.c (output_lines): Print colorization legend
for both flag_use_colors and flag_use_hotness_colors.
Reword the help.
From-SVN: r264531
Diffstat (limited to 'gcc/gcov.c')
-rw-r--r-- | gcc/gcov.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -2933,9 +2933,19 @@ output_lines (FILE *gcov_file, const source_info *src) FILE *source_file; const char *retval; - /* Print legend of color hotness syntax. */ + /* Print colorization legend. */ + if (flag_use_colors) + fprintf (gcov_file, "%s", + DEFAULT_LINE_START "Colorization: profile count: " \ + SGR_SEQ (COLOR_BG_CYAN) "zero coverage (exceptional)" SGR_RESET \ + " " \ + SGR_SEQ (COLOR_BG_RED) "zero coverage (unexceptional)" SGR_RESET \ + " " \ + SGR_SEQ (COLOR_BG_MAGENTA) "unexecuted block" SGR_RESET "\n"); + if (flag_use_hotness_colors) - fprintf (gcov_file, "%s", DEFAULT_LINE_START "Hotness legend: " \ + fprintf (gcov_file, "%s", + DEFAULT_LINE_START "Colorization: line numbers: hotness: " \ SGR_SEQ (COLOR_BG_RED) "> 50%" SGR_RESET " " \ SGR_SEQ (COLOR_BG_YELLOW) "> 20%" SGR_RESET " " \ SGR_SEQ (COLOR_BG_GREEN) "> 10%" SGR_RESET "\n"); |