How does Intel's VTune works?

I need to optimize a program on Intel's XScale, so I use VTune to find the hot spot. I use sampling to locate the hot spot. At first, the functions lists according to its used time Function A B C D E

But after I have written assembly source for A, and run VTune again, but the result is confusing C B A E D

XScale hardware provides several performance counter. Each counter can trigger interrupts, and VTune do the time statistics in ISR. Using sampling, VTune interrupts the program at interval. For example, there are two functions in a souce file: void A { a1; a2;

-------------- trigger a interrupt a3; a4;

}

void B { b1; b2;

--------------- trigger a interrupt b3; b4;

}

VTune will consider the time between interrupts is consumed by B? How does VTune do?

Reply to
joggingsong
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.