summaryrefslogtreecommitdiff
path: root/gcc/ggc-page.c
diff options
context:
space:
mode:
authorAlex Samuel <samuel@codesourcery.com>2000-04-28 00:59:40 +0000
committerAlex Samuel <samuel@gcc.gnu.org>2000-04-28 00:59:40 +0000
commit2a9a326b172ca61ab8e1c4f60e81fb1df20364a1 (patch)
tree721fcd61f706b846a8cfad4302cec9e16abe799a /gcc/ggc-page.c
parente815887f4d7e3aaa8e68584729c18c9b3c5fef05 (diff)
downloadgcc-2a9a326b172ca61ab8e1c4f60e81fb1df20364a1.tar.gz
Makefile.in (OBJS): Add timevar.o.
hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
Diffstat (limited to 'gcc/ggc-page.c')
-rw-r--r--gcc/ggc-page.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c
index 7fc8b2c3038..924e952b336 100644
--- a/gcc/ggc-page.c
+++ b/gcc/ggc-page.c
@@ -27,6 +27,7 @@ Boston, MA 02111-1307, USA. */
#include "varray.h"
#include "flags.h"
#include "ggc.h"
+#include "timevar.h"
#ifdef HAVE_MMAP_ANYWHERE
#include <sys/mman.h>
@@ -1101,8 +1102,6 @@ poison_pages ()
void
ggc_collect ()
{
- long time;
-
/* Avoid frequent unnecessary work by skipping collection if the
total allocations haven't expanded much since the last
collection. */
@@ -1111,7 +1110,7 @@ ggc_collect ()
return;
#endif
- time = get_run_time ();
+ timevar_push (TV_GC);
if (!quiet_flag)
fprintf (stderr, " {GC %luk -> ", (unsigned long) G.allocated / 1024);
@@ -1136,14 +1135,10 @@ ggc_collect ()
if (G.allocated_last_gc < GGC_MIN_LAST_ALLOCATED)
G.allocated_last_gc = GGC_MIN_LAST_ALLOCATED;
- time = get_run_time () - time;
- gc_time += time;
+ timevar_pop (TV_GC);
if (!quiet_flag)
- {
- fprintf (stderr, "%luk in %.3f}",
- (unsigned long) G.allocated / 1024, time * 1e-6);
- }
+ fprintf (stderr, "%luk}", (unsigned long) G.allocated / 1024);
}
/* Print allocation statistics. */