Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm debugging 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?

like image 602
ronaldosantana Avatar asked Dec 21 '22 20:12

ronaldosantana


1 Answers

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.

like image 65
Paul Sasik Avatar answered Jan 04 '23 23:01

Paul Sasik