This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC's trunk, it is necessary to improve the timings from gprof/gcc -pg.


2007/5/15, Joe Buck <Joe.Buck@synopsys.com> wrote:
On Tue, May 15, 2007 at 10:32:09PM +0200, J.C. Pizarro wrote:
> For the current trunk of GCC, thinking about
> the related thing of gprof and option -pg of GCC,
>
> it's important to output correctly the data with non-fatal accuracy,
> preferably 4 digits decimal instead of 2, e.g 0.0000 ms instead of 0.00 s.

On many platforms, there is only a timer tick 60 times per second.
Reporting the result to four places will still give a zero if no
timer tick occurred during the execution of a given function.
The output is printing to the approximate precision of the data,
so printing two places is the correct thing to do.

It's not well reasoned. Is this the reason to use only 2 digits decimal because a timer only exists?


For more accuracy, you need to run the program for a longer time.



It's false, it's like a false positive. There are cases in that stretching the run time does not improve accuracy of the program. For a better accuracy, it's slowering the CPU clock to stretch the accuracy,

This is obtained of several ways:
* to use an old PC of few MHz.
* to lower the frequency of clock of a modern PC.
* or to use a slow emulator, but in the reality, its real timings are
unpredictable
due to the difficulty to complete all its necessary logic like predicting the
timings of the scheduling of the instructions and of the memories like
the caches
and the DRAMs.

Most of your queries would be better suited to gcc-help than to gcc,
because you don't understand the compiler well enough to make
useful contributions to its development.

Are you saying me that I don't understand compilers? and if I am clever?.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]