I have source to a debugger extension here that walks each thread, captures
the call stack, and then only reports the unique ones at the end:
http://www.osronline.com/OsrDown.cfm/apexts.zip?name=apexts.zip&id=559
Only one way to do it (it leverages !for_each_thread), but it should be easy
enough to modify to capture/sort CPU time instead.
-scott
OSR
“Skywing” wrote in message news:xxxxx@windbg…
Yes, you could write an extension to do it for kernel mode if you can’t get
a user dump. (!runaway only knows how to operate on user mode targets.)
There are some handy wrappers in engextcpp that might be helpful if you
wanted to write something to do that
(ExtNtOsInformation::GetKernelProcessList,
ExtNtOsInformation::GetKernelProcessThreadList).
Or, if you particularly like writing scriptlets in the debugger interpreter
language, see !for_each_thread.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ladislav Zezula
Sent: Wednesday, November 20, 2013 12:00 AM
To: Kernel Debugging Interest List
Subject: RE: [windbg] Extension for CPU time consumed?
Have you tried !runaway (after snapping a user mode dump of the
process in
question) ?
Nope, because I didn’t know it exists
I have kernel dump from the
machine (it’s been reinstalled already), so !runaway does not work. !running
only shows the thread for “bang.sys”
that was used to create the dump.
Since kernel time and user time is stored in KTHREAD, which is part of
kernel memory, it should still be possible to display thread list sorted by
CPU usage, right?
L.
WINDBG is sponsored by OSR
OSR is hiring!! Info at http://www.osr.com/careers
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer