Message ID | 5199603.qFIMbjzvif@polaris |
---|---|
State | New |
Headers | show |
On Wed, Feb 10, 2016 at 10:55 AM, Eric Botcazou <ebotcazou@adacore.com> wrote: > Hi, > > I just ran into a timevar internal consistency failure with -ftime-report: > > Execution times (seconds) > phase setup : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 0%) wall > 114 kB ( 0%) ggc > phase parsing : 0.29 ( 7%) usr 0.01 ( 9%) sys 0.30 ( 7%) wall > [...] > repair loop structures : 0.01 ( 0%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall > 0 kB ( 0%) ggc > TOTAL : 4.06 0.11 4.18 > 58199 kB > Extra diagnostic checks enabled; compiler may run slowly. > Configure with --enable-checking=release to disable checks. > Timing error: total of phase timers exceeds total time. > ggc_mem 59609520 > 59596208 > > This only happens with -g and was probably introduced by the merge of the > early-debug branch. timevar.def reads: > > /* The compiler phases. > > These must be mutually exclusive, and the NAME field must begin > with "phase". > > Also, their sum must be within a millionth of the total time (see > validate_phases). */ > > The problem is that TV_PHASE_DBGINFO is now nested within TV_PHASE_OPT_GEN, > which violates the above mutual exclusivity requirement. Therefore the > attached patch simply gets rid of TV_PHASE_DBGINFO (as well as of the sibling > TV_PHASE_CHECK_DBGINFO which was already unused). > > Tested on x86_64-suse-linux, OK for the mainline? Ok. Richard. > > 2016-02-10 Eric Botcazou <ebotcazou@adacore.com> > > * timevar.def (TV_PHASE_DBGINFO): Delete. > (TV_PHASE_CHECK_DBGINFO): Likewise. > * varpool.c (varpool_node::assemble_decl): Do not change timevar. > > -- > Eric Botcazou
Index: varpool.c =================================================================== --- varpool.c (revision 233237) +++ varpool.c (working copy) @@ -586,9 +586,7 @@ varpool_node::assemble_decl (void) /* After the parser has generated debugging information, augment this information with any new location/etc information that may have become available after the compilation proper. */ - timevar_start (TV_PHASE_DBGINFO); debug_hooks->late_global_decl (decl); - timevar_stop (TV_PHASE_DBGINFO); return true; } Index: timevar.def =================================================================== --- timevar.def (revision 233237) +++ timevar.def (working copy) @@ -43,8 +43,6 @@ DEFTIMEVAR (TV_PHASE_PARSING , " DEFTIMEVAR (TV_PHASE_DEFERRED , "phase lang. deferred") DEFTIMEVAR (TV_PHASE_LATE_PARSING_CLEANUPS, "phase late parsing cleanups") DEFTIMEVAR (TV_PHASE_OPT_GEN , "phase opt and generate") -DEFTIMEVAR (TV_PHASE_DBGINFO , "phase debug info") -DEFTIMEVAR (TV_PHASE_CHECK_DBGINFO , "phase check & debug info") DEFTIMEVAR (TV_PHASE_LATE_ASM , "phase last asm") DEFTIMEVAR (TV_PHASE_STREAM_IN , "phase stream in") DEFTIMEVAR (TV_PHASE_STREAM_OUT , "phase stream out")