Page 2 of 2
Re: Profiling compiling mode
Posted: Tue Sep 12, 2023 11:06 pm
by luis
idle wrote: Wed Mar 15, 2023 3:58 pm
Q How long does it take for a 64 bit counter to roll over runing at 2 and 4 ghz?
I've calculated it this way: 2 ^ 64 * (1 second / CPU freq in Hz) = seconds to rollover
The number of available bits multiplied by the time required to do one cycle in seconds.
So, for a 2 GHz CPU
Code: Select all
Debug Pow(2,64) * (1.0 / (2 * 1000 * 1000 * 1000)) / 60 / 60 / 24 / 365
gives 292 years ... If I'm not mistaken.
Re: Profiling compiling mode
Posted: Tue Sep 12, 2023 11:42 pm
by idle
luis wrote: Tue Sep 12, 2023 11:06 pm
idle wrote: Wed Mar 15, 2023 3:58 pm
Q How long does it take for a 64 bit counter to roll over runing at 2 and 4 ghz?
I've calculated it this way: 2 ^ 64 * (1 second / CPU freq in Hz) = seconds to rollover
The number of available bits multiplied by the time required to do one cycle in seconds.
So, for a 2 GHz CPU
Code: Select all
Debug Pow(2,64) * (1.0 / (2 * 1000 * 1000 * 1000)) / 60 / 60 / 24 / 365
gives 292 years ... If I'm not mistaken.
only that long.
Yes that looks right, thank.
Re: Profiling compiling mode
Posted: Wed Sep 13, 2023 3:12 am
by tored
The new C backend uses GCC, right? Possible to compile with gprof?
Re: Profiling compiling mode
Posted: Wed Sep 13, 2023 3:34 am
by StarBootics
tored wrote: Wed Sep 13, 2023 3:12 am
The new C backend uses GCC, right? Possible to compile with gprof?
Only Fred can answer that. That being said, Fred will probably want a solution that work for both backends (ASM and C).
Best regards
StarBootics
Re: Profiling compiling mode
Posted: Wed Sep 13, 2023 4:54 am
by idle
tored wrote: Wed Sep 13, 2023 3:12 am
The new C backend uses GCC, right? Possible to compile with gprof?
maybe on linux, doesn't work with the supplied gcc compiler on windows