Profiling with Control APIs

CodeXL

PreviousNext
CodeXL User Guide
Profiling with Control APIs

After the compiling the target application, create a project in CodeXL, set the general profile session options, set the CPU profile session options. While setting the CPU profile session options, in step 4, in the Data Collection Schedule section, select Start profile with data collection paused.

Once all the settings done, start the CPU profiling. The CPU Profiler will be in pause state and target application execution begins. When the resume API gets called from target application, CPU Profile starts profiling till stop API gets called from target application. As soon as stop API is called in target application, CPU Profiler stops profiling and waits for next control API call.

To profile from CLI, option ‘-s 0’ should be used to start the profiler in pause state.

Sample command on Windows platforms:

> CodeXLCpuProfiler.exe collect -m tbp -s 0 -o c:\Temp\cpuprof-tbp <target-application.exe>

Sample command on Linux platforms:

$ CodeXLCpuProfiler collect -m tbp -s 0 -o /tmp/cpuprof-tbp <target-application>