Sun Studio 12: Performance Analyzer

Clock-based Profiling Under the Solaris OS

In clock-based profiling under the Solaris OS, the state of each LWP is stored at regular time intervals. This time interval is called the profiling interval. The information is stored in an integer array: one element of the array is used for each of the ten microaccounting states maintained by the kernel. The data collected is converted by the Performance Analyzer into times spent in each state, with a resolution of the profiling interval. The default profiling interval is approximately 10 milliseconds (10 ms). The Collector provides a high-resolution profiling interval of approximately 1 ms and a low-resolution profiling interval of approximately 100 ms, and, where the OS permits, allows arbitrary intervals. Running the collect command with no arguments prints the range and resolution allowable on the system on which it is run.

The metrics that are computed from clock-based data are defined in the following table.

Table 2–1 Solaris Timing Metrics

Metric 

Definition 

User CPU time 

LWP time spent running in user mode on the CPU. 

Wall time 

LWP time spent in LWP 1. This is usually the “wall clock time” 

Total LWP time 

Sum of all LWP times. 

System CPU time 

LWP time spent running in kernel mode on the CPU or in a trap state. 

Wait CPU time 

LWP time spent waiting for a CPU. 

User lock time 

LWP time spent waiting for a lock. 

Text page fault time 

LWP time spent waiting for a text page. 

Data page fault time 

LWP time spent waiting for a data page. 

Other wait time 

LWP time spent waiting for a kernel page, or time spent sleeping or stopped. 

For multithreaded experiments, times other than wall clock time are summed across all LWPs. Wall time as defined is not meaningful for multiple-program multiple-data (MPMD) programs.

Timing metrics tell you where your program spent time in several categories and can be used to improve the performance of your program.