Has anyone had success profiling a process? What tools do you use?
I tried using Kernrate but don’t get the breakdown by routine.
I am trying to identify which routines in the process are consuming the
most CPU so that we can identify a serious CPU utilization problem where
the machine locks up and we start seeing network disconnects while the
CPU is out.
Thanks,
Jim
>most CPU so that we can identify a serious CPU utilization problem where
the machine locks up and we start seeing network disconnects while the
TCP receive state machine runs on DISPATCH_LEVEL, so, network disconnects due
to too high CPU load can be caused by driver issue only, not by process
issue.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
I have seen some good results with Intel’s VTUNE for Windows, although not with the kind of issues that you are seeing.? I bought it (~$600), but I believe there is some kind of free eval version you can download for 30 days.
Old fashioned methods first, though.? Go through every while loop and for loop, and make sure there are no stupid mistakes - unintentional modification of the for loop variable, checking an exit condition that never gets set, etc.? Any time you expect a register in your device to change when some operation is completed, and your code?loops on that register, make sure there is an exit condition based on a counter - just in case the register does not get set as expected.? Lastly make sure that?when your device generates an interrupt, then you correctly clear the underlying interrupt condition, so that your ISR routine does not get continually called.
Many of these static methods can also be detected with an analyser on the link to the device, if that is at all possible.? Look to see what registers are being read / written when the device is locked, and reverse engineer the sequence of writes / reads to see where your driver is.