Session Settings

The Session Settings specify information that is needed to control performance data collection. Session Settings are persistent and apply to future data collection sessions that are initiated within a project until the Session Settings are again changed.

Click the Show Options>>> button to reveal extended session settings. Click the Hide Options<<< button to hide extended session settings.

 

The main session settings are:

In addition to directly entering path names into the Launch and Working directory fields, you may browse to the desired location by clicking the appropriate Browse button. Each field also offers a drop-down list of the most recently used path names. The drop-down lists retain the last 10 application paths and the last 10 working directory paths, respectively.

Click the Edit button to edit the selected profile configuration. Although predefined profile configurations cannot be accidentally changed and saved under the same name, they can be saved under a new, different name. User-defined configurations can also be edited and saved. See Modifying a Profile Configuration for more details.

The extended Session Settings provide control different aspects of data collection.

Stop data collection when the app exits terminates the sampling process if the application terminates. This option is convenient when profiling small applications or if the shutdown sequence is desired in the profile. Selecting this option enables the (s) Profile Duration option that sets up the profile run-time in seconds. (Profiling large applications over a long time period with this option could create very large profile data files.)

Terminate the app after the profile terminates the application at the completion of the profile sampling duration.

Profile the duration of the app execution allows profiling to continue as long as the specified application is running. When this option is selected, the (s) Profile duration option is disabled and no specific profiling time limit is needed.

Profile duration (sec) sets the profile sampling duration in seconds.

Start with profiling paused This option is included for times when using the profiler API to programmatically control the Pause and Resume functionality.

Start delay (sec) sets the time in seconds of delaying the profile sampling after the target application is launched.

Apply Process Filter Select to filter out processes during data processing unless specified in “Advance Filter”.

Changing the CPU Affinity

CPU affinity limits the execution of a program or process to selected cores in a multicore system. CPU affinity is set through a CPU affinity mask in which each bit of the mask specifies whether the program or process may execute upon a particular core. The number of available cores is system dependent. CPU affinity can be used to perform scalability analysis by limiting the number of cores available to a multi-threaded program.

CPU affinity is defined in the CodeAnalyst Session Settings dialog box. The CPU affinity mask can be specified directly as a hexadecimal value in the CPU affinity mask field as shown in the screen shot below. The CPU affinity mask determines the CPU affinity for the application program that is launched by CodeAnalyst.

It may be more convenient to set CPU affinity using the   button located to the right of the CPU affinity mask field.

To change the CPU affinity:

  1. Open the Session Settings dialog box.
  2. Click the CPU affinity     button.
  3. The CPU Affinity Configuration dialog box appears.
  4. Check a box to enable execution on a core.
  5. Click the Select All button to check all boxes, enabling execution on all cores.
  6. Click the Clear All button remove checks from all boxes.
  7. Click the OK button to activate the CPU affinity settings.

The CPU affinity configuration below limits execution of the application program under test to a single CPU (Core 1.)

The Session Settings dialog box below reflects the change to the CPU affinity mask (0x2.)

When CodeAnalyst launches the application program (/root/classic) using the CPU affinity mask, execution is restricted to core 1. The following screen shot shows that execution was indeed limited to core 1 since all timer samples for classic are attributed to core 1 and no samples were collected for classic on any other core.

Process Filter

When the checkbox “Apply Process Filter” is selected, CodeAnalyst will filter out all other processes except the ones being specified in “Launch”. Users can also specify a list of processes to be included in post-processing using the “Advance Filter”.

Note that a profile is collected for all processes system-wide. However, only the profile specified in the “Advance Filter” is being processed. This can also help reduce the post-processing wait time in some cases. The following figure shows a profiling session with process filter enabled. Here, only "/root/classic" and "/lib64/libc-2.4.so" are shown since application "classic" depends on the standard "libc" library.