Please enable JavaScript to view this site.

Thread Validator Help

Navigation: The User Interface > Query and Search

Finding critical sections only used in one thread

Scroll Prev Top Next More

 

Searching for critical sections only used in one thread

 

Using the Single Thread Critical Section Detector dialog below, you can search for potentially unnecessary synchronization objects that have only been used in one thread.

 

If further examination within your program confirms the critical sections are not needed, you may be able to improve performance in your program by removing them.

 

 

The Single Thread Critical Section Detector dialog

 

To show this dialog, choose the menu option below:

 

menu Query menu instructionStep choose Single Thread Critical Section Detector... instructionStep displays the dialog below

 

Or use the following icon on the Query Toolbar.

 

toolbar-critical-sections

 

 

 single-thread-critical-section-detector-dialog

 

 

 

Display options

 

Display one/all entry per critical section instructionStep show just one use of a given critical section by one thread, or show all uses

 

Clear instructionStep remove any existing results from the display

 

 

Finding results

 

Find instructionStep performs the search, displaying results in the list
 

note Results are appended to any previous search results.

 

You can expand the search results, and double click the data items to edit source code in your preferred editor.

 

 


 

Examples of finding objects used in one thread

 

Thread Validator has an example program you can use to safely explore features.

 

In the example program, the Test menu has options for starting deadlock threads:

 

single-thread-detector-example1

 

After starting deadlock Thread 1, that menu option is disabled and clicking Find on the Single Thread dialog shows two results:

 

single-thread-critical-section-detector-dialog-example