Open janjust opened 7 years ago
@janjust thank you for sharing your observation. Do you see issue with sys_rdtsc() or __get_cpu_clocks_per_sec()?
@igor-ivanov I think sys_rdtsc, that's intel specific.
@janjust @igor-ivanov I'm not completely sure how it stable or not on PPC but I would propose following:
timespec time;
int result = clock_gettime(CLOCK_MONOTONIC, &time);
return time.tv_sec * 1E9 + time.tv_nsec;
It shows good, stable results at least on modern Intel architectures.
It seems on ppc systems the following is not compatible.
I had to disable the CONF_TIMESTAMP define and rely solely on sys_time to get correct timing data.