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.