Go to main content
Oracle® Developer Studio 12.5: Performance Analyzer

Exit Print View

Updated: June 2016
 
 

Collecting Tracing Data From a Running Program

If you want to collect any kind of tracing data, you must preload the Collector library, libcollector.so , before you run your program. To collect heap tracing data or synchronization wait tracing data, you must also preload er_heap.so and er_sync.so, respectively. These libraries provide wrappers to the real functions that enable data collection to take place. In addition, the Collector adds wrapper functions to other system library calls to guarantee the integrity of performance data. If you do not preload the libraries, these wrapper functions cannot be inserted. See Using System Libraries for more information on how the Collector interposes on system library functions.

To preload libcollector.so, you must set both the name of the library and the path to the library using environment variables, as shown in the table below. Use the environment variable LD_PRELOAD to set the name of the library. Use the environment variables LD_LIBRARY_PATH, LD_LIBRARY_PATH_32, or LD_LIBRARY_PATH_64 to set the path to the library . LD_LIBRARY_PATH is used if the _32 and _64 variants are not defined. If you have already defined these environment variables, add new values to them.

Table 7  Environment Variable Settings for Preloading libcollector.so, er_sync.so, and er_heap.so
Environment Variable
Value
LD_PRELOAD
libcollector.so
LD_PRELOAD
er_heap.so
LD_PRELOAD
er_sync.so
LD_LIBRARY_PATH
/opt/developerstudio12.5/lib/analyzer/runtime
LD_LIBRARY_PATH_32
/opt/developerstudio12.5/lib/analyzer/runtime
LD_LIBRARY_PATH_64
/opt/developerstudio12.5/lib/analyzer/v9/runtime
LD_LIBRARY_PATH_64
/opt/developerstudio12.5/lib/analyzer/amd64/runtime

If your Oracle Developer Studio software is not installed in /opt/developerstudio12.5, ask your system administrator for the correct path. You can set the full path in LD_PRELOAD, but doing this can create complications when using SPARC® V9 64-bit architecture.


Note -  Remove the LD_PRELOAD and LD_LIBRARY_PATH settings after the run, so they do not remain in effect for other programs that are started from the same shell.