Main Content

Generate Execution Time Profile

Before running a software-in-the-loop (SIL) or processor-in-the-loop (PIL) execution, to enable execution time profiling:

  1. To open the MATLAB® Coder™ app, on the MATLAB Toolstrip Apps tab, under Code Generation, click the app icon. The app opens the Create MATLAB Coder Project dialog box.

  2. To open your project, click Open, navigate to the folder that contains your MATLAB Coder project file, and select the file. For example, kalman_filter01.coderprj.

  3. Select the Enable entry point execution profiling check box.

  4. If you also want to generate execution time profiles for functions that are called within entry-point functions, select the Enable function execution profiling check box.

    Note

    Function profiling does not support the OpenMP library. Before you generate code, clear the Enable OpenMP library if possible check box.

    On a Mac operating system, SIL and PIL execution does not support execution-time profiling for functions that are called within entry-point functions.

Or, from the Command Window, specify properties of your coder.EmbeddedCodeConfig object. For example:

% Enable entry point execution profiling
config.CodeExecutionProfiling = true;

% Enable function execution profiling
config.CodeProfilingInstrumentation = true;

% Disable OpenMP
config.EnableOpenMP = false;

See Also

Topics