In our previous episode, Henry Vermaak said: > On Wed, May 28, 2014 at 02:00:06PM +0200, Marco van de Voort wrote: > > - Is rdtsc safe for CPUs that can vary clock of cores independently like > > Core Mono? What if the process changed CPU to a different clocked core? > > I've read that on recent CPUs, the TSC is unaffected by the actual clock > rate of the CPU.
Yes, on Nehalem and newer afaik the clock is on the uncore. But that is still to new a requirement to assume for general purpose code like RTL and FCL, if you agree to clip real old stuff. Both the Core2 generations (Conroe and Wolfdale) are still too common. > On linux, The TSC gets calibrated and the synchronisation is tested, which > may result in the TSC clock source being marked as unstable and disabled. > In this case, it will fall back to using other clock sources (HPET is next > in line on my computer). I assume the same system underlies queryperformancecounter and family on Windows. But that means you need to use OS timing functions, and not ASM. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal