Using a statistical method called profiling, which can be based on a clock trigger, or on the overflow of a hardware performance counter
By tracing thread synchronization calls, memory allocation and deallocation calls, IO calls, and Message Passing Interface (MPI) calls
As summary data on the system and the process
On Oracle Solaris platforms, clock profiling data includes microstate accounting data. All recorded profiling and tracing events include call stacks, as well as thread and CPU IDs.
The Collector can collect all kinds of data for C, C++ and Fortran programs, and it can collect profiling data for applications written in the Java programming language. It can collect data for dynamically-generated functions and for descendant processes. See Chapter 2, Performance Data for information about the data collected and Chapter 3, Collecting Performance Data for detailed information about the Collector. The Collector runs when you profile an application in Performance Analyzer, the collect command and the dbx collector command.