Does anybody know how to achive the following task.
Application sometimes eats lots of CPU, ProcessExplorer (procexp.exe) shows periodical high kernel CPU load (~60-80). I see in procexp that some threads do something that consumes lots of kernel time. In that moment I would like to print execution stack of those busy threads.
Is there any monitoring tool that can show that kind of information or some WinDbg script, etc?
I would suggest using ProcDump.
A command like:
Which will take a full memory dump when the process exceeds 60% CPU utilization for 3 consecutive seconds and do that up to 5 times. This way you can compare the different dumps and see where the process is spending its time.