From 10d43c2d1b58300b12209abc980ea2ed3a414be6 Mon Sep 17 00:00:00 2001 From: Diego Novillo Date: Tue, 13 Apr 2010 09:30:31 -0400 Subject: Makefile.in (c-pch.o, [...]): Depend on timevar.h. 2010-04-12 Diego Novillo * Makefile.in (c-pch.o, ggc-common.o): Depend on timevar.h. * c-pch.c: Include timevar.h. (c_common_write_pch): Use TV_PCH_SAVE and TV_PCH_CPP_SAVE timers. (c_common_read_pch): Use TV_PCH_RESTORE and TV_PCH_CPP_RESTORE timers. * ggc-common.c: Include timevar.h. (gt_pch_save): Use TV_PCH_PTR_REALLOC and TV_PCH_PTR_SORT timers. * timevar.def (TV_PCH_SAVE): Define. (TV_PCH_CPP_SAVE): Define. (TV_PCH_PTR_REALLOC): Define. (TV_PCH_PTR_SORT): Define. (TV_PCH_RESTORE): Define. (TV_PCH_CPP_RESTORE): Define. From-SVN: r158266 --- gcc/ggc-common.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gcc/ggc-common.c') diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c index fc42f45..28c2b79 100644 --- a/gcc/ggc-common.c +++ b/gcc/ggc-common.c @@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see #include "hosthooks-def.h" #include "plugin.h" #include "vec.h" +#include "timevar.h" #ifdef HAVE_SYS_RESOURCE_H # include @@ -501,6 +502,7 @@ gt_pch_save (FILE *f) gt_pch_save_stringpool (); + timevar_push (TV_PCH_PTR_REALLOC); saving_htab = htab_create (50000, saving_htab_hash, saving_htab_eq, free); for (rt = gt_ggc_rtab; *rt; rt++) @@ -532,8 +534,13 @@ gt_pch_save (FILE *f) state.ptrs = XNEWVEC (struct ptr_data *, state.count); state.ptrs_i = 0; + htab_traverse (saving_htab, call_alloc, &state); + timevar_pop (TV_PCH_PTR_REALLOC); + + timevar_push (TV_PCH_PTR_SORT); qsort (state.ptrs, state.count, sizeof (*state.ptrs), compare_ptr_data); + timevar_pop (TV_PCH_PTR_SORT); /* Write out all the scalar variables. */ for (rt = gt_pch_scalar_rtab; *rt; rt++) -- cgit v1.1