diff options
author | Martin Liska <mliska@suse.cz> | 2019-10-29 09:44:28 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2019-10-29 08:44:28 +0000 |
commit | c5281d5013c76f0959a6a9b7952c044aaed7932f (patch) | |
tree | 9f23eb7e05b8668df00c87c25029d83f412bef5f /gcc/mem-stats.h | |
parent | 6bc67182b6500b942674d6031c1bf0f02c779cbd (diff) | |
download | gcc-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/mem-stats.h')
-rw-r--r-- | gcc/mem-stats.h | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/gcc/mem-stats.h b/gcc/mem-stats.h index 9ceb9cc..c2329c2 100644 --- a/gcc/mem-stats.h +++ b/gcc/mem-stats.h @@ -361,14 +361,11 @@ public: are filtered by ORIGIN type, LENGTH is return value where we register the number of elements in the list. If we want to process custom order, CMP comparator can be provided. */ - mem_list_t *get_list (mem_alloc_origin origin, unsigned *length, - int (*cmp) (const void *first, - const void *second) = NULL); + mem_list_t *get_list (mem_alloc_origin origin, unsigned *length); /* Dump all tracked instances of type ORIGIN. If we want to process custom order, CMP comparator can be provided. */ - void dump (mem_alloc_origin origin, - int (*cmp) (const void *first, const void *second) = NULL); + void dump (mem_alloc_origin origin); /* Reverse object map used for every object allocation mapping. */ reverse_object_map_t *m_reverse_object_map; @@ -593,9 +590,7 @@ mem_alloc_description<T>::~mem_alloc_description () template <class T> inline typename mem_alloc_description<T>::mem_list_t * -mem_alloc_description<T>::get_list (mem_alloc_origin origin, unsigned *length, - int (*cmp) (const void *first, - const void *second)) +mem_alloc_description<T>::get_list (mem_alloc_origin origin, unsigned *length) { /* vec data structure is not used because all vectors generate memory allocation info a it would create a cycle. */ @@ -608,7 +603,7 @@ mem_alloc_description<T>::get_list (mem_alloc_origin origin, unsigned *length, if ((*it).first->m_origin == origin) list[i++] = std::pair<mem_location*, T*> (*it); - qsort (list, i, element_size, cmp == NULL ? T::compare : cmp); + qsort (list, i, element_size, T::compare); *length = i; return list; @@ -637,15 +632,13 @@ mem_alloc_description<T>::get_sum (mem_alloc_origin origin) template <class T> inline void -mem_alloc_description<T>::dump (mem_alloc_origin origin, - int (*cmp) (const void *first, - const void *second)) +mem_alloc_description<T>::dump (mem_alloc_origin origin) { unsigned length; fprintf (stderr, "\n"); - mem_list_t *list = get_list (origin, &length, cmp); + mem_list_t *list = get_list (origin, &length); T total = get_sum (origin); T::print_dash_line (); |