09/28/2011 3:24 PM
I am seeing some weird behavior when I run ClockCycles tightly in a loop. ClockCycles should always return increasing
values, but sometimes it returns a value that's less than the previously returned value.
For example -
start = ClockCycles();
stop = ClockCycles();
if(start > stop)
diff = start - stop;
printf("??? start-%llu, stop-%llu,diff-%llu, iteration - %d\n",start,stop,diff,iter);
start = stop;
The iteration at which it happens is widely random. Ranging from 50 to 30000.
Could this be because of a wrong setup in init_qtime.c inside startup code ?