diff options
author | Martin Liska <mliska@suse.cz> | 2019-10-29 09:44:52 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2019-10-29 08:44:52 +0000 |
commit | 3518424d4bf6a9654c7fea7f046ed839e888b1d6 (patch) | |
tree | 4d388155baecc27cb214fe9e5777075963377fe7 /gcc | |
parent | 58cc99af1d829d545299c9958f0666b837914cee (diff) | |
download | gcc-3518424d4bf6a9654c7fea7f046ed839e888b1d6.zip gcc-3518424d4bf6a9654c7fea7f046ed839e888b1d6.tar.gz gcc-3518424d4bf6a9654c7fea7f046ed839e888b1d6.tar.bz2 |
Print header in dump_memory_report.
2019-10-29 Martin Liska <mliska@suse.cz>
* cgraphunit.c (symbol_table::compile): Pass
title as dump_memory_report argument.
* toplev.c (dump_memory_report): New argument.
(finalize): Pass new argument.
* toplev.h (dump_memory_report): Add argument.
2019-10-29 Martin Liska <mliska@suse.cz>
* lto.c (do_whole_program_analysis): Pass
title as dump_memory_report argument.
From-SVN: r277559
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/cgraphunit.c | 10 | ||||
-rw-r--r-- | gcc/lto/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/lto/lto.c | 12 | ||||
-rw-r--r-- | gcc/toplev.c | 13 | ||||
-rw-r--r-- | gcc/toplev.h | 3 |
6 files changed, 31 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6f5c26e..51097bb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2019-10-29 Martin Liska <mliska@suse.cz> + * cgraphunit.c (symbol_table::compile): Pass + title as dump_memory_report argument. + * toplev.c (dump_memory_report): New argument. + (finalize): Pass new argument. + * toplev.h (dump_memory_report): Add argument. + +2019-10-29 Martin Liska <mliska@suse.cz> + * ggc-common.c: Move Leak to the first column. 2019-10-29 Martin Liska <mliska@suse.cz> diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 9873b9b..6ec2443 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -2602,10 +2602,7 @@ symbol_table::compile (void) timevar_push (TV_CGRAPHOPT); if (pre_ipa_mem_report) - { - fprintf (stderr, "Memory consumption before IPA\n"); - dump_memory_report (); - } + dump_memory_report ("Memory consumption before IPA"); if (!quiet_flag) fprintf (stderr, "Performing interprocedural optimizations\n"); state = IPA; @@ -2637,10 +2634,7 @@ symbol_table::compile (void) symtab->dump (dump_file); } if (post_ipa_mem_report) - { - fprintf (stderr, "Memory consumption after IPA\n"); - dump_memory_report (); - } + dump_memory_report ("Memory consumption after IPA"); timevar_pop (TV_CGRAPHOPT); /* Output everything. */ diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 2aefc36..3592dda 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,5 +1,10 @@ 2019-10-29 Martin Liska <mliska@suse.cz> + * lto.c (do_whole_program_analysis): Pass + title as dump_memory_report argument. + +2019-10-29 Martin Liska <mliska@suse.cz> + * lto.c (do_whole_program_analysis): Remove argument. 2019-10-24 Jan Hubicka <hubicka@ucw.cz> diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 5dca73f..27ea341 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -455,10 +455,7 @@ do_whole_program_analysis (void) timevar_push (TV_WHOPR_WPA); if (pre_ipa_mem_report) - { - fprintf (stderr, "Memory consumption before IPA\n"); - dump_memory_report (); - } + dump_memory_report ("Memory consumption before IPA"); symtab->function_flags_ready = true; @@ -537,16 +534,13 @@ do_whole_program_analysis (void) timevar_stop (TV_PHASE_STREAM_OUT); if (post_ipa_mem_report) - { - fprintf (stderr, "Memory consumption after IPA\n"); - dump_memory_report (); - } + dump_memory_report ("Memory consumption after IPA"); /* Show the LTO report before launching LTRANS. */ if (flag_lto_report || (flag_wpa && flag_lto_report_wpa)) print_lto_report_1 (); if (mem_report_wpa) - dump_memory_report (); + dump_memory_report ("Final"); } /* Create artificial pointers for "omp declare target link" vars. */ diff --git a/gcc/toplev.c b/gcc/toplev.c index 8a152b8..00a5e83 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1994,8 +1994,17 @@ target_reinit (void) } void -dump_memory_report () +dump_memory_report (const char *header) { + /* Print significant header. */ + fputc ('\n', stderr); + for (unsigned i = 0; i < 80; i++) + fputc ('#', stderr); + fprintf (stderr, "\n# %-77s#\n", header); + for (unsigned i = 0; i < 80; i++) + fputc ('#', stderr); + fputs ("\n\n", stderr); + dump_line_table_statistics (); ggc_print_statistics (); stringpool_statistics (); @@ -2058,7 +2067,7 @@ finalize (bool no_backend) } if (mem_report) - dump_memory_report (); + dump_memory_report ("Final"); if (profile_report) dump_profile_report (); diff --git a/gcc/toplev.h b/gcc/toplev.h index 91e3465..8814a5e 100644 --- a/gcc/toplev.h +++ b/gcc/toplev.h @@ -66,7 +66,8 @@ extern bool wrapup_global_declarations (tree *, int); extern void global_decl_processing (void); -extern void dump_memory_report (); +extern void +dump_memory_report (const char *); extern void dump_profile_report (void); extern void target_reinit (void); |