Oracle® Solaris Studio 12.4: Performance Analyzer

Exit Print View

Updated: January 2015
 
 

Using System Libraries

The Collector interposes on functions from various system libraries to collect tracing data and to ensure the integrity of data collection. The following list describes situations in which the Collector interposes on calls to library functions.

  • Collecting synchronization wait tracing data. The Collector interposes on functions from the Oracle Solaris C library, libc.so, on Oracle Solaris.

  • Collecting heap tracing data. The Collector interposes on the functions malloc, realloc, memalign and free. Versions of these functions are found in the C standard library, libc.so, and also in other libraries such as libmalloc.so and libmtmalloc.so.

  • Collecting MPI tracing data. The Collector interposes on functions from the specified MPI library.

  • Ensuring the integrity of clock data. The Collector interposes on setitimer and prevents the program from using the profiling timer.

  • Ensuring the integrity of hardware counter data. The Collector interposes on functions from the hardware counter library, libcpc.so, and prevents the program from using the counters. Calls from the program to functions from this library return a value of -1.

  • Enabling data collection on descendant processes. The Collector interposes on the functions fork(2), fork1(2), vfork(2), fork(3F), posix_spawn(3p), posix_spawnp(3p), system(3C), system(3F), sh(3F), popen(3C), and exec(2) and its variants. Calls to vfork are replaced internally by calls to fork1. These interpositions are done for the collect command.

  • Guaranteeing the handling of the SIGPROF and SIGEMT signals by the Collector. The Collector interposes on sigaction to ensure that its signal handler is the primary signal handler for these signals.

    The interposition does not succeed under the following circumstances:

  • Statically linking a program with any of the libraries that contain functions that are interposed.

  • Attaching dbx to a running application that does not have the collector library preloaded.

  • Dynamically loading one of these libraries and resolving the symbols by searching only within the library.

The failure of interposition by the Collector can cause loss or invalidation of performance data.

The er_sync.so, er_heap.so, and er_mpviewn.so (where n indicates the MPI version) libraries are loaded only if synchronization wait tracing data, heap tracing data, or MPI tracing data, respectively, are requested.