Analyzing Thread Microstates of C/C++/Fortran Applications

See Also 

The IDE provides the Thread Microstates tool for observing the execution states of threads running in C/C++/Fortran projects. The tool shows an overall view of the changing runtime states of your application's threads, and a more detailed view of the state of individual threads. You can detect runtime problems in your applications that might not be detectable when debugging your code.

The microstate data is collected with DTrace, a tool for tracing the activities of running programs in the Oracle Solaris 10 and OpenSolaris operating systems. For this reason, it can only run the Thread Microstates tool on these platforms.

Tip: If you have access to a remote system running Oracle Solaris 10 or OpenSolaris, you can configure the system as a remote development host in the IDE and then use that system to build and run your project.

In order to use the Thread Microstates tool, the Solaris user account that you use when you run the IDE must have sufficient DTrace privileges to observe system behavior. If you are using a remote development host, the DTrace privileges must be assigned to the user account on the remote system. See Enabling DTrace For Profiling C/C++/Fortran Applications.

To enable the Thread Microstates tool:

  1. Right click the project name and select Properties to open the Project Properties dialog box.
  2. Click the Build node.
  3. Optionally, in the Development Host list, select a remote host running Oracle Solaris or OpenSolaris.
  4. Click the Profile node.
  5. Select the checkbox for Show profiling indicators during run.
  6. In the Profile Configuration list, select C/C++ DTrace Extended.
  7. Click OK.

To examine your application's thread microstates:

  1. Run the project by right-clicking the project node and selecting Run.
    The Run Monitor window opens, showing all the profiling tools.
  2. In the Run Monitor window, place the mouse cursor over the Thread Microstates tool to see a tooltip with a description.
    The graph contains aggregated information about the execution states of the threads. The states are grouped into four broad categories: Sleeping, Waiting, Blocked, and Running.
  3. Click the Thread Details button to open the Thread Details window, which provides detailed information about the microstates of each thread running in the program.
  4. In the Thread Details window, place the mouse cursor over any point in a thread to see a popup that shows the percentage of CPU time spent in each state.
  5. Use the Show list to filter the threads to display. You can view all threads, only live threads that are still running, or only threads that have finished.
  6. Use the Detail Level list to specify the level of thread states you want to see. The Advanced level shows ten possible execution states, and Basic and Moderate levels show the state information in a smaller number of groups.
  7. Use the zoom controls and scroll bar to examine various points more closely.
See also
  Managing C/C++/Fortran Profile Configurations
Profiling C/C++/Fortran Projects
C/C++/Fortran Project Properties Dialog Box: Profile

Legal Notices