summaryrefslogtreecommitdiff
path: root/gcc/hash-table.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2018-09-14 09:26:27 -0400
committerJason Merrill <jason@gcc.gnu.org>2018-09-14 09:26:27 -0400
commitd604907d646023dfbba8aa2f1f8ee89582d6f4f9 (patch)
tree23e946bd3970287410ac9c8c7c5e22b946bd843c /gcc/hash-table.h
parent115b470829a7d3ad0c60ea0e09fefef61d50b437 (diff)
Fix --enable-gather-detailed-mem-stats.
* hash-table.c (hash_table_usage): Change from variable to function. * hash-table.h: Adjust. * Makefile.in: Add missing dependencies on hash-table.h. From-SVN: r264313
Diffstat (limited to 'gcc/hash-table.h')
-rw-r--r--gcc/hash-table.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/hash-table.h b/gcc/hash-table.h
index 706b2370e23..bd83345c7b8 100644
--- a/gcc/hash-table.h
+++ b/gcc/hash-table.h
@@ -561,7 +561,7 @@ private:
#include "mem-stats.h"
#include "hash-map.h"
-extern mem_alloc_description<mem_usage> hash_table_usage;
+extern mem_alloc_description<mem_usage>& hash_table_usage (void);
/* Support function for statistics. */
extern void dump_hash_table_loc_statistics (void);
@@ -580,7 +580,7 @@ hash_table<Descriptor, Allocator>::hash_table (size_t size, bool ggc, bool
size = prime_tab[size_prime_index].prime;
if (m_gather_mem_stats)
- hash_table_usage.register_descriptor (this, origin, ggc
+ hash_table_usage ().register_descriptor (this, origin, ggc
FINAL_PASS_MEM_STAT);
m_entries = alloc_entries (size PASS_MEM_STAT);
@@ -600,7 +600,7 @@ hash_table<Descriptor, Allocator>::hash_table (const hash_table &h, bool ggc,
size_t size = h.m_size;
if (m_gather_mem_stats)
- hash_table_usage.register_descriptor (this, origin, ggc
+ hash_table_usage ().register_descriptor (this, origin, ggc
FINAL_PASS_MEM_STAT);
value_type *nentries = alloc_entries (size PASS_MEM_STAT);
@@ -630,7 +630,7 @@ hash_table<Descriptor, Allocator>::~hash_table ()
ggc_free (m_entries);
if (m_gather_mem_stats)
- hash_table_usage.release_instance_overhead (this,
+ hash_table_usage ().release_instance_overhead (this,
sizeof (value_type) * m_size,
true);
}
@@ -644,7 +644,7 @@ hash_table<Descriptor, Allocator>::alloc_entries (size_t n MEM_STAT_DECL) const
value_type *nentries;
if (m_gather_mem_stats)
- hash_table_usage.register_instance_overhead (sizeof (value_type) * n, this);
+ hash_table_usage ().register_instance_overhead (sizeof (value_type) * n, this);
if (!m_ggc)
nentries = Allocator <value_type> ::data_alloc (n);
@@ -736,7 +736,7 @@ hash_table<Descriptor, Allocator>::expand ()
value_type *nentries = alloc_entries (nsize);
if (m_gather_mem_stats)
- hash_table_usage.release_instance_overhead (this, sizeof (value_type)
+ hash_table_usage ().release_instance_overhead (this, sizeof (value_type)
* osize);
m_entries = nentries;