Clock Data

See Also

Why collect clock data?

Clock data tells you where your program is spending time and in what state or mode it spent the time. Analyzing clock-based profiling data is usually the first step toward identifying performance problems in your program.

How is clock data collected by the Collector?

Clock data is collected by taking snapshots of the state of the LWPs (lightweight processes) at regular intervals. The process is called profiling, and the interval is called the profiling interval. At the end of each interval, the microaccounting state for each LWP is recorded along with the call stack of the program, the LWP ID, the thread ID and the processor ID. The time spent in each profiling interval is attributed to the instruction being executed at the end of the interval. The derived timing data is therefore statistical in nature.

What timing metrics can I see in the Performance Analyzer?

Clock data is converted into the following metrics:

Metric Definition
User CPU time LWP (lightweight process) time spent running in user mode on the CPU.
Wall time LWP time spent in LWP 1. This is the "wall clock time"
Total LWP time Sum of all LWP times.
System CPU time LWP time spent running in kernel mode or in a trap state.
Wait CPU time LWP time spent waiting for the 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 lock or for a kernel page, or time spent sleeping or stopped.

Except for wall clock time, all metrics are summed across LWPs. Wall time as defined here is meaningless for multiple-program multiple-data (MPMD) programs. User lock time is accumulated under other wait time if the default threads library is used in the SolarisTM 7 Operating System and the Solaris 8 Operating System.

What are the limitations on clock data collection?

You cannot do clock-based profiling on a program that uses the profiling timer. The Collector intercepts calls to setitimer(3) that set the profiling clock parameters and prevents other programs from using them.

Under the Linux OS, the only metric available is User CPU time.

See also
Choosing a Value For the Profiling Interval
Collecting Performance Data
Collecting Performance Data on a Running Process

Can't find what you are looking for? Submit your comments at http://www.sun.com/hwdocs/feedback.
Legal Notices