vtune function call count

1.7k views Asked by At

What technique does the vtune amplifier 2015 uses to estimate function call count ?

I know that it does not give accurate information. I thought , it uses call count = total clock cycles taken by function / clock cycles for single function run

Is it that way ? or there is any profiler which gives call count information without causing much overhead.

1

There are 1 answers

0
user2638717 On

Collecting estimated call counts is based on BTS (Branch Trace Store) usage. This is hardware functionality in Intel® processors to automatically store information into a memory buffer about all taken branches. Function calls are considered as branches and are taken from this buffer.

If a function is hot, it is statistically visible. So it is interrupted by a performance monitoring interrupt (PMI) which occurs once a hardware event counter overflows. Once interrupted, the collection of branches is initiated, and when the memory buffer containing branch records overflows, the information is saved on disk (into a trace file) upon reception of a branch tracing interrupt (BTI). Then collection waits for the next sample and gathers another “branch bunch”, and so on.

After collection is finished, trace files are analyzed and call counts are separated from other branching info. Taking into account call counts in trace files, the frequency of samples and the total number of branches in a program VTune Amplifier XE estimates statistical call counts. Rarely called functions appear only in few samples or don’t appear at all – estimating call counts from these data would be too far from reality, so call counts for them are shown as zeros.

More information is available here: https://software.intel.com/en-us/articles/calculating-estimated-call-counts-with-intel-vtune-amplifier-xe-2013

Intel® VTune™ Amplifier XE 2015 also uses Intel® Processor Trace technology (https://intel.activeevents.com/sf14/connect/fileDownload/session/64115DDAD8D7174736E4D82C5FA3A42C/SF14_ARCS001_100f.pdf) where available to estimate call counts in a similar manner.