When I do开发者_JAVA百科 some modifications in my code that runs on Microblaze, I sometimes see a large discrepancy in runtime for the execution of code that follows the same path. To illustrate, what I really mean by same path, take this example,
if ( condition )
execute_this();
else
execute_that(); // Modified this function
So say if I modified the code for function execute_that
, I would see change in runtime even when condition
was set and function execute_this
has not been modified. What can cause this? Memory Alignment of Functions? Cache? Any clue?
Does the timing only change when you change the other function, or is it variable anyway?
Are you running an OS? Could other tasks pre-empt yours?
Are interrupts running? An interrupt during your function will change the runtime.
And, yes, cache effects could cause this.
精彩评论