This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Output of (estimated) remaining compile time for huge source files
- From: Brian Dessent <brian at dessent dot net>
- To: "M. Koehrer" <mathias_koehrer at arcor dot de>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 22 Dec 2006 13:22:00 -0800
- Subject: Re: Output of (estimated) remaining compile time for huge source files
- References: <18795375.1166774048840.JavaMail.ngmail@webmail16>
- Reply-to: gcc-help at gcc dot gnu dot org
"M. Koehrer" wrote:
> I am using gcc 4.1.2 (Debian Linux Etch) on a Pentium 4.
> I have a code generator that generates really huge C source code files
> (up to 5-8 MByte source code in a single file) that have to be compiled with gcc 4.1.2.
> However, the compilation of this huge C source files takes really long,
> sometimes up to 1 hour for a single file.
> Unfortunately I do not get any feedback about the current progress of gcc once
> it is started.
> My question is now, is it somehow possible to force gcc to print out regularly
> a progress information (like: estimated percentage done or the steps that
> are already done and still have to be done or something else)?
>
> I have not found any information about that in the gcc documentation.
I don't think any such thing exists. The closest would be -fmem-report
or -ftime-report, but those are generated at the end of the compile, not
in real time.
The problem is that the compiler itself doesn't know how long any given
stage will take without actually running it, so there is no way to give
any kind of accurate percentage. You could try patching the pass
manager to print something at the beginning of each pass, but that would
only really be an "I'm here" message, it would not indicate anything
about percentage or ETA, since many passes would probably fly by very
quickly and some would take very long.
Brian