Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.
1710 Discussions

Questions about Vtune time-sampling when interrupts are disabled.


We have aquestion that is keeping us from ordering more Vtune licenses.

Is there any way to use Vtune's event-based sampling during time intervals when interrupts are disabled?
Does Vtune use an Non-Maskable-Interrupt (NMI)to do the sampling?

We aregetting light-weight hotspot traces. There is a function written in assemblythat unlocks a mutexwith afew instructions and a straightforward logic. Thelight-weight traces indicatethat this functionis taking most of the cpu time.That is contradictory to our expectations.

Let me provide more background:
We have a function that locks a mutex and disables interrupts, call it function lock_mutex, and one that unlocks a mutex and enables interrupts, call it unlock_mutex.
Several functions are executed between the execution of lock_mutex and unlock_mutex. When we use lightweight hotspot analysis, we find thatunlock_mutex is reported as taking up much more time to execute than any other function, though it only unlocks a mutex and enables interruptswitha few number of instructions andstraightforward logic as mentioned above.
We also know that the functions executed betweenlock_mutex andunlock_mutex do much more work thanlock_mutex or unlock_mutex.
Could this be caused by theevent-based samplinginterrupt being held off untilthe functionunlock_mutex enables interrupts? If so, is there a way around this?
This is on a Linux system using Vtune update 9.


0 Kudos
1 Reply
Hi Guillermo,

The Intel VTune Amplifier XE does not use the NMI interrupt - it uses the highest priority available maskable interrupt. Over the past we have found that many OS's use the NMI interrupt for power fail / watch dog timer features and don't necessarily behave well when another piece of software tries to take it over. It's best in general, but also when using an interrupt based profiler like VTune Amplifier XE, to minimize the amount time that processor interrupts are disabled.

0 Kudos