diff options
author | Martin Liska <mliska@suse.cz> | 2019-02-26 18:27:52 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2019-02-26 17:27:52 +0000 |
commit | 60448173c4fc67032eb30e6e189055d7c97ceafd (patch) | |
tree | 4418776fc5d2c76154a2e422ee0e2dbd0379bf37 /gcc/mem-stats.h | |
parent | 24f0c84247c433826b6309b59151985d1e8893d5 (diff) | |
download | gcc-60448173c4fc67032eb30e6e189055d7c97ceafd.zip gcc-60448173c4fc67032eb30e6e189055d7c97ceafd.tar.gz gcc-60448173c4fc67032eb30e6e189055d7c97ceafd.tar.bz2 |
Improve memory statistics report readability.
2019-02-26 Martin Liska <mliska@suse.cz>
* alloc-pool.h (struct pool_usage): Remove extra
print_dash_line.
* bitmap.h (struct bitmap_usage): Likewise.
* ggc-common.c (struct ggc_usage): Likewise.
* mem-stats.h (struct mem_usage): Likewise.
(mem_alloc_description::dump): Print dash lines
here and repeat header at the end of a table report.
It's then more readable.
* tree-phinodes.c (phinodes_print_statistics): Make
horizontal alignment.
* tree-ssanames.c (ssanames_print_statistics): Likewise.
* vec.c (struct vec_usage): Remove extra print_dash_line.
* vec.h (vec_safe_grow_cleared): Pass PASS_MEM_STAT.
2019-02-26 Martin Liska <mliska@suse.cz>
* symtab.c (ht_dump_statistics): Make
horizontal alignment for statistics.
From-SVN: r269221
Diffstat (limited to 'gcc/mem-stats.h')
-rw-r--r-- | gcc/mem-stats.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/mem-stats.h b/gcc/mem-stats.h index cbc328f..7612e7d 100644 --- a/gcc/mem-stats.h +++ b/gcc/mem-stats.h @@ -219,10 +219,8 @@ struct mem_usage inline void dump_footer () const { - print_dash_line (); fprintf (stderr, "%s" PRsa (53) PRsa (26) "\n", "Total", SIZE_AMOUNT (m_allocated), SIZE_AMOUNT (m_times)); - print_dash_line (); } /* Return fraction of NOMINATOR and DENOMINATOR in percent. */ @@ -247,7 +245,6 @@ struct mem_usage { fprintf (stderr, "%-48s %11s%16s%10s%17s\n", name, "Leak", "Peak", "Times", "Type"); - print_dash_line (); } /* Current number of allocated bytes. */ @@ -631,11 +628,17 @@ mem_alloc_description<T>::dump (mem_alloc_origin origin, mem_list_t *list = get_list (origin, &length, cmp); T total = get_sum (origin); + T::print_dash_line (); T::dump_header (mem_location::get_origin_name (origin)); + T::print_dash_line (); for (int i = length - 1; i >= 0; i--) list[i].second->dump (list[i].first, total); + T::print_dash_line (); + T::dump_header (mem_location::get_origin_name (origin)); + T::print_dash_line (); total.dump_footer (); + T::print_dash_line (); XDELETEVEC (list); |