aboutsummaryrefslogtreecommitdiff
path: root/gcc/alloc-pool.h
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2016-02-25 17:57:39 +0100
committerMartin Liska <marxin@gcc.gnu.org>2016-02-25 16:57:39 +0000
commitbd545bcf1c351c0460a3e9b6185dc1065baf002f (patch)
treeae7953ecabcf41b831608122c46292ebbe7c921d /gcc/alloc-pool.h
parentbd28a34f33a84524d8c61fbf23d88d1158c579a7 (diff)
downloadgcc-bd545bcf1c351c0460a3e9b6185dc1065baf002f.zip
gcc-bd545bcf1c351c0460a3e9b6185dc1065baf002f.tar.gz
gcc-bd545bcf1c351c0460a3e9b6185dc1065baf002f.tar.bz2
Do not gather mem stats in run_exit_handles (PR
PR middle-end/69919 * alloc-pool.c (after_memory_report): New variable. * alloc-pool.h (base_pool_allocator ::release): Do not use the infrastructure if after_memory_report. * toplev.c (toplev::main): Mark after memory report. From-SVN: r233722
Diffstat (limited to 'gcc/alloc-pool.h')
-rw-r--r--gcc/alloc-pool.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/alloc-pool.h b/gcc/alloc-pool.h
index 8ccf089..3ead101 100644
--- a/gcc/alloc-pool.h
+++ b/gcc/alloc-pool.h
@@ -25,6 +25,9 @@ along with GCC; see the file COPYING3. If not see
extern void dump_alloc_pool_statistics (void);
+/* Flag indicates whether memory statistics are gathered any longer. */
+extern bool after_memory_report;
+
typedef unsigned long ALLOC_POOL_ID_TYPE;
/* Last used ID. */
@@ -306,7 +309,7 @@ base_pool_allocator <TBlockAllocator>::release ()
TBlockAllocator::release (block);
}
- if (GATHER_STATISTICS)
+ if (GATHER_STATISTICS && !after_memory_report)
{
pool_allocator_usage.release_instance_overhead
(this, (m_elts_allocated - m_elts_free) * m_elt_size);