Using Sun WorkShop

Collecting Performance Data

While running your program in the debugger, you can use the Sampling Collector to collect performance data and write it to experiment files to be used by the Sampling Analyzer. The Sampling Collector can gather program memory-usage data, execution profile data excluding called function times, and execution profile data including called function times. For more information on collecting and analyzing performance data, see Chapter 6, Analyzing Program Performance,"the Analyzing Program Performance With Sun WorkShop manual, and the Sun WorkShop online help.

You can collect performance data only when you are running in the Sun WorkShop Debugging window and runtime checking is turned off.

To collect performance data:

  1. Choose Windows > Sampling Collector.

  2. Type the complete path name for your experiment file in the Experiment File text box.

  3. Select whether you want to collect data for one run only or for all runs.

    If you run the Sampling Collector for one run only, the Collector shuts off after the experiment is created. If you leave the Collector on for all runs, the Collector remains on even after the experiment is created.

  4. Select the type(s) of data you want to collect.

    If you have chosen to collect Execution Profile data, use the Collect Profile data slider to specify an interval at which the Collector gathers samples.

  5. Select either the Manually, on "New Sample" command radio button or the Periodically radio button to determine when the Collector interrupts data gathering to stop and summarize.

    If you have selected the Periodically button, use the Period slider to define the interval at which the Collector summarizes samples.

  6. Start your program running in the debugger by clicking either Start or Go.