Oracle® Solaris Studio 12.4: Performance Analyzer

Exit Print View

Updated: January 2015

C, C++, Fortran, and Java API Functions

This section provides descriptions of the API functions.

  • C and C++: collector_sample(char *name)

    Fortran: collector_sample(string name)

    Java: CollectorAPI.sample(String name)

    Record a sample packet and label the sample with the given name or string. The label is displayed by Performance Analyzer in the Selection Details window when you select a sample in the Timeline view. The Fortran argument string is of type character.

    Sample points contain data for the process and not for individual threads. In a multithreaded application, the collector_sample() API function ensures that only one sample is written if another call is made while it is recording a sample. The number of samples recorded can be less than the number of threads making the call.

    Performance Analyzer does not distinguish between samples recorded by different mechanisms. If you want to see only the samples recorded by API calls, you should turn off all other sampling modes when you record performance data.

  • C, C++, Fortran: collector_pause()

    Java: CollectorAPI.pause()

    Stop writing event-specific data to the experiment. The experiment remains open, and global data continues to be written. The call is ignored if no experiment is active or if data recording is already stopped. This function stops the writing of all event-specific data even if it is enabled for specific threads by the collector_thread_resume() function.

  • C, C++, Fortran: collector_resume()

    Java: CollectorAPI.resume()

    Resume writing event-specific data to the experiment after a call to collector_pause() . The call is ignored if no experiment is active or if data recording is active.

  • C, C++, Fortran: collector_terminate_expt()

    Java: CollectorAPI.terminate

    Terminate the experiment whose data is being collected. No further data is collected, but the program continues to run normally. The call is ignored if no experiment is active.