Commit 3518424d by Martin Liska Committed by Martin Liska

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
parent 58cc99af
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>
......@@ -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. */
......
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>
......
......@@ -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. */
......
......@@ -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 ();
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment