AnsweredAssumed Answered

Measuring thread execution time with GetThreadCycleData

Question asked by FredrikL on Sep 16, 2011
Latest reply on Oct 26, 2011 by BrianW

Dear comunity!

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/

Fredrik L

 

We are fully instrumented.

VisualDSP 5.0 Update 8

Blackfin 537

 

Message was edited by: FredrikL

Outcomes