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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233722
138bc75d-0d04-0410-961f-
82ee72b054a4
+2016-02-25 Martin Liska <mliska@suse.cz>
+
+ 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.
+
2016-02-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/48795
2016-02-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/48795
ALLOC_POOL_ID_TYPE last_id;
mem_alloc_description<pool_usage> pool_allocator_usage;
ALLOC_POOL_ID_TYPE last_id;
mem_alloc_description<pool_usage> pool_allocator_usage;
+bool after_memory_report = false;
/* Output per-alloc_pool memory usage statistics. */
void
/* Output per-alloc_pool memory usage statistics. */
void
extern void dump_alloc_pool_statistics (void);
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. */
typedef unsigned long ALLOC_POOL_ID_TYPE;
/* Last used ID. */
TBlockAllocator::release (block);
}
TBlockAllocator::release (block);
}
+ if (GATHER_STATISTICS && !after_memory_report)
{
pool_allocator_usage.release_instance_overhead
(this, (m_elts_allocated - m_elts_free) * m_elt_size);
{
pool_allocator_usage.release_instance_overhead
(this, (m_elts_allocated - m_elts_free) * m_elt_size);
finalize_plugins ();
location_adhoc_data_fini (line_table);
finalize_plugins ();
location_adhoc_data_fini (line_table);
+
+ after_memory_report = true;
+
if (seen_error () || werrorcount)
return (FATAL_EXIT_CODE);
if (seen_error () || werrorcount)
return (FATAL_EXIT_CODE);