+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.
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;
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.
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;
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. */
}
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 ();
}
if (mem_report)
- dump_memory_report ();
+ dump_memory_report ("Final");
if (profile_report)
dump_profile_report ();
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);