We are trying to measure the time a function in a thread has executed in total while being interupted by other threads. For this we use GetThreadCycleData which we call first and last in the function and then take the difference. The execution time of the function is constant (e.g. 9ms) but we get thread times that vary (e.g. 4-14ms). When running the functions without interfering threads and reading the CYCLES registers we get constant time (9ms).
We expected a constant time, does anyone have an idea why we do not acheive this?
New info: When decreasing the VDK tick period from 0.250 ms to 0.025 ms I get much more consistent measurements from GetThreadCycleData. Why this helps I still do not understand?
Grateful for any help/
We are fully instrumented.
VisualDSP 5.0 Update 8
Message was edited by: FredrikL