aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-10-29 09:44:40 +0100
committerMartin Liska <marxin@gcc.gnu.org>2019-10-29 08:44:40 +0000
commit58cc99af1d829d545299c9958f0666b837914cee (patch)
tree18570707ea1d94d89543590a98b05b91c5ce988b
parentc5281d5013c76f0959a6a9b7952c044aaed7932f (diff)
downloadgcc-58cc99af1d829d545299c9958f0666b837914cee.zip
gcc-58cc99af1d829d545299c9958f0666b837914cee.tar.gz
gcc-58cc99af1d829d545299c9958f0666b837914cee.tar.bz2
Move Leak in GCC memory report to the first column.
2019-10-29 Martin Liska <mliska@suse.cz> * ggc-common.c: Move Leak to the first column. From-SVN: r277558
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/ggc-common.c9
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1942f4e..6f5c26e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
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>
+
* cgraphunit.c (symbol_table::compile): Remove argument
for dump_memory_report.
* ggc-common.c (dump_ggc_loc_statistics): Likewise.
diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c
index 8bc77a0..37d3c5d 100644
--- a/gcc/ggc-common.c
+++ b/gcc/ggc-common.c
@@ -887,10 +887,11 @@ public:
fprintf (stderr,
"%-48s " PRsa (9) ":%5.1f%%" PRsa (9) ":%5.1f%%"
PRsa (9) ":%5.1f%%" PRsa (9) ":%5.1f%%" PRsa (9) "\n",
- prefix, SIZE_AMOUNT (m_collected),
+ prefix,
+ SIZE_AMOUNT (balance), get_percent (balance, total.get_balance ()),
+ SIZE_AMOUNT (m_collected),
get_percent (m_collected, total.m_collected),
SIZE_AMOUNT (m_freed), get_percent (m_freed, total.m_freed),
- SIZE_AMOUNT (balance), get_percent (balance, total.get_balance ()),
SIZE_AMOUNT (m_overhead),
get_percent (m_overhead, total.m_overhead),
SIZE_AMOUNT (m_times));
@@ -937,8 +938,8 @@ public:
static inline void
dump_header (const char *name)
{
- fprintf (stderr, "%-48s %11s%17s%17s%16s%17s\n", name, "Garbage", "Freed",
- "Leak", "Overhead", "Times");
+ fprintf (stderr, "%-48s %11s%17s%17s%16s%17s\n", name, "Leak", "Garbage",
+ "Freed", "Overhead", "Times");
}
/* Freed memory in bytes. */