diff options
author | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-13 13:30:31 +0000 |
---|---|---|
committer | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-13 13:30:31 +0000 |
commit | dbb19e66159becfdf5b57b10f562ae0a9472fe92 (patch) | |
tree | 7d6bdf3659c4ca2ac9b6e81c946d8961451da717 /gcc/ggc-common.c | |
parent | c07e5b8b23ee24d8beedae3817de0543490f40e5 (diff) | |
download | gcc-dbb19e66159becfdf5b57b10f562ae0a9472fe92.tar.gz |
2010-04-12 Diego Novillo <dnovillo@google.com>
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158266 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ggc-common.c')
-rw-r--r-- | gcc/ggc-common.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c index fc42f45d59c..28c2b793f22 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 <sys/resource.h> @@ -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++) |