views:

729

answers:

4

In Windows, is there a tool to monitor the status of process synchronisation objects? ie.

  • event/mutex : signaled or not signaled
  • semaphore : count

Better yet, to log which thread did what, eg. "thread #5421 Signal Event - testevt"

+1  A: 

Take a look at Intel's ThreadChecker and Parallel Studio. Most of their tools sit on top of Visual Studio.

http://software.intel.com/en-us/intel-vtune/

http://software.intel.com/en-us/intel-thread-checker/

http://software.intel.com/en-us/intel-vtune/

Sean Turner
+3  A: 

Memory Validator

Process Explorer

Handle usage: handle -s ==> Print count of each type of handle open.

[EDIT]:

How to monitor the status of process synchronization objects using Process Explorer.

Open Process Explorer

  • Click on your exe in the process section( for ex: MyApp.exe )
  • Click Show Lower Pane Press. This will show all synchronization objects. ( For ex: myEvent)
  • Right click on synchronization object(ex:myEvent) and click Properties... in context menu.
  • This brings the details of the synchronization object . In the Details tab, you can see

    Event Info (if synch object is event): Gives information about the state (whether the synchronization object is signaled)

    Semaphore info (if synch object is Semaphore): Provides the Count of the semaphore.

aJ
+1 for Process Explorer - this is what I'd used to explore NT objects
Preet Sangha
Thanks for the edit. Now I really know Process Explorer meets my needs.
sep
A: 

Windbg can be helpful but you have to learn how to use it.

Alien01
+1  A: 

Thread Validator does what you are describing.

Monitor threads, status of locks, individual thread objects. Much faster than Intel's Thread Checker, but different level of detail.

Stephen Kellett