Oracle® Solaris Studio 12.4: Performance Analyzer

Exit Print View

Updated: January 2015

Limitations on Clock Profiling

The minimum value of the profiling interval and the resolution of the clock used for profiling depend on the particular operating environment. The maximum value is set to 1 second. The value of the profiling interval is rounded down to the nearest multiple of the clock resolution. To display the minimum and maximum value and the clock resolution can be found, type the collect command with no additional arguments.

You cannot do clock 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.

On Linux platforms, the clock data can only be shown as Total CPU time. Linux CPU time is the sum of user CPU time and system CPU time.

On Linux systems, clock-profiling of multithreaded applications might report inaccurate data for threads. The profile signal is not always delivered by the kernel to each thread at the specified interval; sometimes the signal is delivered to the wrong thread. If available, hardware counter profiling using the cycle counter will usually give more accurate data for threads.

Runtime Distortion and Dilation With Clock Profiling

Clock profiling records data when a SIGPROF signal is delivered to the target. It causes dilation to process that signal, and unwind the call stack. The deeper the call stack and the more frequent the signals, the greater the dilation. To a limited extent, clock profiling shows some distortion, deriving from greater dilation for those parts of the program executing with the deepest stacks.

Where possible, a default value is set not to an exact number of milliseconds, but to slightly more or less than an exact number (for example, 10.007 ms or 0.997 ms) to avoid correlations with the system clock, which can also distort the data. Set custom values the same way on Oracle Solaris platforms (not possible on Linux platforms).