aboutsummaryrefslogtreecommitdiff
path: root/gcc/ggc-common.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-10-29 09:44:28 +0100
committerMartin Liska <marxin@gcc.gnu.org>2019-10-29 08:44:28 +0000
commitc5281d5013c76f0959a6a9b7952c044aaed7932f (patch)
tree9f23eb7e05b8668df00c87c25029d83f412bef5f /gcc/ggc-common.c
parent6bc67182b6500b942674d6031c1bf0f02c779cbd (diff)
downloadgcc-c5281d5013c76f0959a6a9b7952c044aaed7932f.zip
gcc-c5281d5013c76f0959a6a9b7952c044aaed7932f.tar.gz
gcc-c5281d5013c76f0959a6a9b7952c044aaed7932f.tar.bz2
Remove misleading sorting function in ggc memory report.
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. (compare_final): Remove in order to make report better readable. * ggc.h (dump_ggc_loc_statistics): Remove argument. * mem-stats.h (mem_alloc_description::get_list): Do not pass cmp. (mem_alloc_description::dump): Likewise here. * toplev.c (dump_memory_report): Remove final argument. (finalize): Likewise. * toplev.h (dump_memory_report): Remove argument. 2019-10-29 Martin Liska <mliska@suse.cz> * lto.c (do_whole_program_analysis): Remove argument. From-SVN: r277557
Diffstat (limited to 'gcc/ggc-common.c')
-rw-r--r--gcc/ggc-common.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c
index 0968d97..8bc77a0 100644
--- a/gcc/ggc-common.c
+++ b/gcc/ggc-common.c
@@ -933,21 +933,6 @@ public:
return s.second->get_balance () - f.second->get_balance ();
}
- /* Compare rows in final GGC summary dump. */
- static int
- compare_final (const void *first, const void *second)
- {
- typedef std::pair<mem_location *, ggc_usage *> mem_pair_t;
-
- const ggc_usage *f = ((const mem_pair_t *)first)->second;
- const ggc_usage *s = ((const mem_pair_t *)second)->second;
-
- size_t a = f->m_allocated + f->m_overhead - f->m_freed;
- size_t b = s->m_allocated + s->m_overhead - s->m_freed;
-
- return a == b ? 0 : (a < b ? 1 : -1);
- }
-
/* Dump header with NAME. */
static inline void
dump_header (const char *name)
@@ -970,7 +955,7 @@ static mem_alloc_description<ggc_usage> ggc_mem_desc;
/* Dump per-site memory statistics. */
void
-dump_ggc_loc_statistics (bool final)
+dump_ggc_loc_statistics ()
{
if (! GATHER_STATISTICS)
return;
@@ -978,7 +963,7 @@ dump_ggc_loc_statistics (bool final)
ggc_force_collect = true;
ggc_collect ();
- ggc_mem_desc.dump (GGC_ORIGIN, final ? ggc_usage::compare_final : NULL);
+ ggc_mem_desc.dump (GGC_ORIGIN);
ggc_force_collect = false;
}