Attach to Process

CodeXL

PreviousNext
CodeXL User Guide
Help > Using CodeXL > CPU Profiler > CPU Profile Session > Attach to Process
Attach to Process

To start a CPU Profile session of an already running process:

1.      Select a CPU profile type. See detailed information for each of CodeXL supported CPU Profile Types.

In the Active Mode toolbar, click the Profile Mode toolbar button to change the mode to Profiling (Profile > Profile Mode). Select any CodeXL CPU type of profile (Profile > CPU: Assess Performance, for example).

2.      Use the CPU Profile Setting dialog to configure the profile session parameters. Note that if a CodeXL project is not opened when changing the profile settings, then a generic new project is automatically created.

3.      Open the “Attach to Process…” dialog from the menu bar (Profile > Attach to Process…). Note that if a CodeXL project is not opened (or created) when the profiling session starts, then a generic new project is automatically created.

4.      Select the desired process from the list of attachable processes and click the “Attach” button to start profiling.

5.      Optional: Pause / Stop the data collection of the profiled application using the execution toolbar buttons: .
Stopping/pausing the profile session is optional. You can let the application run to its end and then the profiling session will automatically end. For long running applications, pausing allows you to control when the profiling data collection occurs so that you can match the stage in your application execution that you want to profile.

6.      When the profiled application execution is over, CodeXL processes the data collected, and a profile session window is opened. See the View and Analyze the Profile Session Data Analysis section.

Attach to Process dialog

 

The dialog shows all the processes in the system, which are divided into 2 groups:

1.      Attachable processes: These are the processes which the current user may attach to. Note that a user may not attach to other users’ processes without having administrative privileges.

2.      Non-attachable processes: These processes cannot be attached to due to certain privilege protections. These processes are not viewed by default, and are viewed only if the “Show non-attachable processes” checkbox is checked.

The list of processes is static, and may be refreshed by clicking the “Refresh” button (or reopening the dialog).