I have an Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz with with 10 cores -- Each core has to Virua CPUs
I have an application with multiple threads and I want to measure performance counters for each thread separately. I have specific questions about effects of context switching and relation to counters ...
There are two way to measure counters:
- Non Sampling : Enabled Counter ---- Whatever Logic--- Read Counters
- Overflows: Specify an overflow value and connect the handler --- The handler increment the associated counters
The questions are:
- The effects of thread context switching on performance counters.
- Following on question one:
- Suppose thread A has an overflow counter with a value of 900. The current value of the counter is 700. At this 700 value, the thread left the core (OS Scheduling .. Suppose you have so many threads running). When the other thread comes and uses the same core and virtual processor, what will happen to this value ? Is it lost ?
- Does the CPU cause the counter to overflow if a thread is removed from the CPU ? Can I configure that ?
- Does executing the overflow handler events get counted ? Suppose an overflow handler has 1000 branches, does these 1000 branches get counted in the branch-instructions counter ?