开发者

Debug Delphi multi-thread app - how to get the one consuming 100% CPU

I'm debugg开发者_C百科ing a multi-thread delphi app. We are having a trouble that, after connect to the server, the client app is getting 100% of the CPU. Is there a way for me to debug and know shich thread is dois that?


Process Explorer will give you usage details down to the thread level for any process.

  1. Run your app
  2. Run Process Explorer (after downloading it ;-)
  3. Double click on your executable in the process list
  4. Select the Threads tab and there you will see:
    1. The Thread ID
    2. CPU Usage
    3. Cycles Delta
    4. And the start address

The TID ought to be enough to nail down your CPU hogging thread.


As Paul Sasik suggests, Process Explorer is probably what you want to do. If your debugging strategy involves monitoring code that is in your application itself, use GetThreadTimes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜