From ea11ca7ec12df7f53d437a738f984e26ef7ab85b Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 9 Jun 2000 16:23:47 +0000 Subject: timevar.def: Add TV_EXPAND. * timevar.def: Add TV_EXPAND. * timevar.c (timevar_print): Update timing information. * calls.c (try_to_integrate): Push to TV_INTEGRATION for inlining. * stmt.c (expand_return): Check for error_mark_node. cp/: * semantics.c (expand_body): Push to TV_EXPAND. * optimize.c (optimize_function): Push to TV_INTEGRATION. * decl.c (start_function): Always call announce_function. * tinfo2.cc: Just declare abort. From-SVN: r34470 --- gcc/timevar.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'gcc/timevar.c') diff --git a/gcc/timevar.c b/gcc/timevar.c index 756365bad5a..44ea96f35ab 100644 --- a/gcc/timevar.c +++ b/gcc/timevar.c @@ -405,10 +405,28 @@ timevar_print (fp) #if defined (HAVE_USER_TIME) || defined (HAVE_SYS_TIME) || defined (HAVE_WALL_TIME) timevar_id_t id; struct timevar_time_def *total = &timevars[TV_TOTAL].elapsed; + struct timevar_time_def now; if (!TIMEVAR_ENABLE) return; + /* Update timing information in case we're calling this from GDB. */ + + if (fp == 0) + fp = stderr; + + /* What time is it? */ + get_time (&now); + + /* If the stack isn't empty, attribute the current elapsed time to + the old topmost element. */ + if (stack) + timevar_accumulate (&stack->timevar->elapsed, &start_time, &now); + + /* Reset the start time; from now on, time is attributed to + TIMEVAR. */ + start_time = now; + fprintf (fp, "\nExecution times (seconds)\n"); for (id = 0; id < TIMEVAR_LAST; ++id) { -- cgit v1.2.1