Oracle® Solaris Studio 12.4: Performance Analyzer

Exit Print View

Updated: January 2015

Profiling the Kernel for Hardware Counter Overflows

The er_kernel utility can collect hardware counter overflow profiles for the kernel using the DTrace cpc provider, which is available only on systems running Oracle Solaris 11.

You can perform hardware counter overflow profiling of the kernel with the –h option for the er_kernel command as you do with the collect command.

As with the collect command, if no explicit -p off argument is given, clock-based profiling is turned on by default. If -h high or -h low is specified requesting the default counter set for that chip at high- or low-frequency, the default clock-profiling will also be set to high or low; an explicit -p argument will be respected.

The er_kernel -h command collects hardware-counter overflow profiles using the DTrace cpc provider. Hardware-counter profiling is not available on systems prior to Oracle Solaris 11. If the overflow mechanism on the chip allows the kernel to tell which counter overflowed, as many counters as the chip provides may be used; otherwise, only one counter may be specified.

Dataspace profiling is supported on SPARC systems running DTrace version 1.8 or later, only for precise counters. If requested on a system where it is not supported, the dataspace flag will be ignored, but the experiment will still be run.

The system hardware-counter mechanism can be used by multiple processes for user profiling, but can not be used for kernel profiling if any user process, or cputrack, or another er_kernel is using the mechanism. In that case, er_kernel will report "HW counters are temporarily unavailable; they may be in use for system profiling."

To display hardware counters on a machine whose processor supports hardware counter overflow profiling, run the er_kernel —h command with no additional arguments.

If the overflow mechanism on the chip allows the kernel to tell which counter overflowed, you can profile as many counters as the chip provides; otherwise, you can only specify one counter. The er_kernel -h output specifies whether you can use more than one counter by displaying a message such as "specify HW counter profiling for up to 4 HW counters."

For more information about hardware counter profiling, see Hardware Counter Profiling Data and Hardware Counter Profiling with collect -h .

Also see the er_print man page for more information about hardware counter overflow profiling.