diff options
author | Richard Henderson <rth@cygnus.com> | 1998-05-09 16:13:01 +0000 |
---|---|---|
committer | Richard Henderson <rth@cygnus.com> | 1998-05-09 16:13:01 +0000 |
commit | 9d5a2e461bbdbe2f2e99af1937a462ed2b27d47a (patch) | |
tree | 2f1ca22c1cbfae29435249d33f4f5c2c0f688b82 | |
parent | c97fae26960456fcf8606493dd53328c26f3bb8a (diff) |
* toplev.c (all_time): New variable.
(print_time): Calculate percentage of the whole.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/egcs_gc_branch@19646 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/toplev.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index fae1ebce9be..b0946a148a7 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -983,6 +983,7 @@ int final_time; int symout_time; int dump_time; int gc_time; +int all_time; /* Return time used so far, in microseconds. */ @@ -1062,8 +1063,9 @@ print_time (str, total) int total; { fprintf (stderr, - "time in %s: %d.%06d\n", - str, total / 1000000, total % 1000000); + "time in %s: %d.%06d (%.0f%%)\n", + str, total / 1000000, total % 1000000, + (double)total / (double)all_time * 100.0); } /* Count an error or warning. Return 1 if the message should be printed. */ @@ -2824,9 +2826,11 @@ compile_file (name) if (! quiet_flag) { + all_time = get_run_time (); + fprintf (stderr,"\n"); - print_time ("parse", parse_time); + print_time ("parse", parse_time); print_time ("integration", integration_time); print_time ("jump", jump_time); print_time ("cse", cse_time); |