I've discovered that some code that is very slow (turns a 10 second application into a 60 second application). I found the slow code using the "randomly pause the application and see where it is" trick. The slow code is in a 3rd party licensing function call that is checking a license server for a valid license.
When I try profiling using Intel's VTune amplifier, this slow function call doesn't show up as taking very much time. I'm not sure why, but I would guess that the function call must sleep while waiting on the license server response or something like that, which tricks VTune into not identifying it as a bottle neck. Is there a way to get VTune to identify calls like this?
I was able to get it to show up by using the Locks and Waits profiling mode instead of the Basic Hotspots profiling mode. Using Locks and Waits, I can see that the select
function is one of my top blocking calls, and I can trace that call back into my application code to see how it is getting called.