Makefile.in (ggc-page.o): Now includes toplev.h.

* Makefile.in (ggc-page.o): Now includes toplev.h.
	* ggc-page.c (toplev.h): Now included.
	(gc_time): Remove declaration.
	(ggc_collect): TIME now long.
	* toplev.c (parse_time, varasm_time, gc_time): Still global; all
	others static.
	* toplev.h (gc_time, parse_time, gc_time): New declarations.
	* cp/decl2.c (parse_time, varconst_time): Delete declarations.
	(finish_file): Delete LINENO declaration.
	START_TIME and THIS_TIME now long.

From-SVN: r33169
This commit is contained in:
Richard Kenner 2000-04-15 19:54:26 +00:00 committed by Richard Kenner
parent 77a02dba35
commit b9bfacf01c
7 changed files with 68 additions and 52 deletions

View file

@ -1,5 +1,13 @@
Sat Apr 15 10:59:19 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* Makefile.in (ggc-page.o): Now includes toplev.h.
* ggc-page.c (toplev.h): Now included.
(gc_time): Remove declaration.
(ggc_collect): TIME now long.
* toplev.c (parse_time, varasm_time, gc_time): Still global; all
others static.
* toplev.h (gc_time, parse_time, gc_time): New declarations.
* toplev.c: Make *_time variable long to reduce chance of overflow.
(TIMEVAR): Likewise for `otime'.
(print_time): Arg is now long; compute percentage in FP and round.

View file

@ -1475,7 +1475,7 @@ ggc-common.o: ggc-common.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
ggc-simple.o: ggc-simple.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
$(GGC_H) varray.h
ggc-page.o: ggc-page.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
ggc-page.o: ggc-page.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h toplev.h \
$(GGC_H) varray.h
ggc-none.o: ggc-none.c $(CONFIG_H) $(RTL_H) $(GGC_H)

View file

@ -1,3 +1,9 @@
Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* decl2.c (parse_time, varconst_time): Delete declarations.
(finish_file): Delete LINENO declaration.
START_TIME and THIS_TIME now long.
2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
* class.c (build_base_field): Reformat comment.

View file

@ -2760,8 +2760,6 @@ build_cleanup (decl)
return temp;
}
extern int parse_time, varconst_time;
static tree
get_sentry (base)
tree base;
@ -2771,6 +2769,7 @@ get_sentry (base)
__snfoo. Since base is already an assembler name, sname should
be globally unique */
tree sentry = IDENTIFIER_GLOBAL_VALUE (sname);
if (! sentry)
{
sentry = build_decl (VAR_DECL, sname, integer_type_node);
@ -3413,8 +3412,7 @@ generate_ctor_and_dtor_functions_for_priority (n, data)
void
finish_file ()
{
extern int lineno;
int start_time, this_time;
long start_time, this_time;
tree vars;
int reconsider;
size_t i;

View file

@ -1,28 +1,29 @@
/* "Bag-of-pages" garbage collector for the GNU compiler.
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "tree.h"
#include "rtl.h"
#include "tm_p.h"
#include "toplev.h"
#include "varray.h"
#include "flags.h"
#include "ggc.h"
@ -97,9 +98,6 @@
#define HOST_BITS_PER_PTR HOST_BITS_PER_LONG
#endif
/* Timing information for collect execution goes into here. */
extern int gc_time;
/* The "" allocated string. */
char *empty_string;
@ -1103,7 +1101,7 @@ poison_pages ()
void
ggc_collect ()
{
int time;
long time;
/* Avoid frequent unnecessary work by skipping collection if the
total allocations haven't expanded much since the last
@ -1115,7 +1113,7 @@ ggc_collect ()
time = get_run_time ();
if (!quiet_flag)
fprintf (stderr, " {GC %luk -> ", (unsigned long)G.allocated / 1024);
fprintf (stderr, " {GC %luk -> ", (unsigned long) G.allocated / 1024);
/* Zero the total allocated bytes. We'll reaccumulate this while
marking. */

View file

@ -1401,38 +1401,40 @@ read_integral_parameter (p, pname, defval)
}
/* Time accumulators, to count the total time spent in various passes. */
/* Time accumulators, to count the total time spent in various passes.
The first three are used in other files; the latter two only here. */
long gc_time;
long parse_time;
long varconst_time;
long integration_time;
long jump_time;
long cse_time;
long gcse_time;
long loop_time;
long cse2_time;
long branch_prob_time;
long flow_time;
long combine_time;
long regmove_time;
long sched_time;
long local_alloc_time;
long global_alloc_time;
long flow2_time;
long peephole2_time;
long sched2_time;
long dbr_sched_time;
long reorder_blocks_time;
long rename_registers_time;
long shorten_branch_time;
long stack_reg_time;
long to_ssa_time;
long from_ssa_time;
long final_time;
long symout_time;
long dump_time;
long gc_time;
long all_time;
static long integration_time;
static long jump_time;
static long cse_time;
static long gcse_time;
static long loop_time;
static long cse2_time;
static long branch_prob_time;
static long flow_time;
static long combine_time;
static long regmove_time;
static long sched_time;
static long local_alloc_time;
static long global_alloc_time;
static long flow2_time;
static long peephole2_time;
static long sched2_time;
static long dbr_sched_time;
static long reorder_blocks_time;
static long rename_registers_time;
static long shorten_branch_time;
static long stack_reg_time;
static long to_ssa_time;
static long from_ssa_time;
static long final_time;
static long symout_time;
static long dump_time;
static long all_time;
/* Return time used so far, in microseconds. */

View file

@ -26,6 +26,10 @@ union tree_node;
struct rtx_def;
#endif
extern long gc_time;
extern long parse_time;
extern long varconst_time;
extern int read_integral_parameter PARAMS ((const char *, const char *,
const int));
extern int count_error PARAMS ((int));