diff options
author | Zdenek Dvorak <dvorakz@suse.cz> | 2005-05-17 21:41:38 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2005-05-17 19:41:38 +0000 |
commit | 8d18c628dde98c3706cdce5a4badf9ebfe8173e5 (patch) | |
tree | 512365504e48b610718f9943598dee4de12ad4ba /gcc/ggc-page.c | |
parent | 9caf90a8ea7640c4e869a9d0d3f51bc80a329fa0 (diff) | |
download | gcc-8d18c628dde98c3706cdce5a4badf9ebfe8173e5.tar.gz |
ggc-page.c (ggc_alloc_stat): Record amount of memory allocated.
* ggc-page.c (ggc_alloc_stat): Record amount of memory allocated.
* ggc-zone.c (ggc_alloc_zone_1): Ditto.
* timevar.c (timevar_ggc_mem_total): New variable.
(GGC_MEM_BOUND): New constant.
(get_time): Record ggc memory status.
(timevar_accumulate): Accumulate amount of ggc memory.
(timevar_print): Print consumption of ggc memory.
* timevar.def (TV_FIND_REFERENCED_VARS, TV_TREE_REDPHI,
TV_TREE_LOOP_BOUNDS, TV_TREE_LOOP_IVCANON, TV_TREE_VECTORIZATION,
TV_TREE_LINEAR_TRANSFORM): Shorten strings to fit in 22 characters.
* timevar.h (struct timevar_time_def): Add ggc_mem field.
(timevar_ggc_mem_total): Declare.
From-SVN: r99848
Diffstat (limited to 'gcc/ggc-page.c')
-rw-r--r-- | gcc/ggc-page.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c index c97b84eff03..15f22c9f7f4 100644 --- a/gcc/ggc-page.c +++ b/gcc/ggc-page.c @@ -1203,6 +1203,9 @@ ggc_alloc_stat (size_t size MEM_STAT_DECL) information is used in deciding when to collect. */ G.allocated += object_size; + /* For timevar statistics. */ + timevar_ggc_mem_total += object_size; + #ifdef GATHER_STATISTICS { size_t overhead = object_size - size; |