Steal GCC's --time-report support.

* lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
stolen/adjusted from GCC.
* m4/stage.m4: Remove time related checks.
* m4/timevar.m4: New.
* configure.in: Adjust.
* src/system.h: Adjust to using timevar.h.
* src/getargs.h, src/getargs.c: Support trace_time for
--trace=time.
* src/main.c (stage): Remove.
(main): Replace `stage' invocations with timevar calls.
* src/output.c: Insert pertinent timevar calls.
This commit is contained in:
Akim Demaille
2002-07-31 19:52:13 +00:00
parent 273a74fa89
commit 1509d42fcb
14 changed files with 821 additions and 56 deletions

View File

@@ -1289,6 +1289,7 @@ output_check (void)
XFREE (check);
}
/*-----------------------------------------------------------------.
| Compute and output yydefact, yydefgoto, yypact, yypgoto, yytable |
| and yycheck. |
@@ -1378,7 +1379,9 @@ output_skeleton (void)
fputs ("m4_divert_push(0)dnl\n", out);
xfclose (out);
timevar_push (TV_M4);
m4_invoke (tempfile);
timevar_pop (TV_M4);
/* If `debugging', keep this file alive. */
if (!(trace_flag & trace_tools))
@@ -1451,7 +1454,9 @@ output (void)
prepare_tokens ();
prepare_rules ();
prepare_states ();
timevar_push (TV_ACTIONS);
prepare_actions ();
timevar_pop (TV_ACTIONS);
prepare ();