Documentation

SimulinkRealTime.target.getProfilerData

Retrieve profile data object

Syntax

profiler_object = getProfilerData(target_object)
profiler_object = getProfilerData(target_object);

Description

example

profiler_object = getProfilerData(target_object) downloads the profiler files from the target computer to the development computer and assigns the data to profiler_object. It displays an execution profile plot and a code execution profiling report.

The Execution Profile plot shows the allocation of execution cycles across the four processors, indicated by the colored horizontal bars. The Code Execution Profiling Report lists the model sections. The numbers underneath the bars indicate the processor cores.

The Code Execution Profiling Report displays model execution profile results for each task.

  • To display the profile data for a section of the model, click the Membrane button  next to the section.

  • To display the TET data for the section in Simulation Data Inspector, click the Plot time series data button .

  • To view the section in Simulink® Editor, click the link next to the Expand Tree button .

  • To view the lines of generated code corresponding to the section, click the Expand Tree button and then click the View Source button .

example

profiler_object = getProfilerData(target_object); downloads the profiler files from the target computer to the development computer and assigns the data to profiler_object. To display the profiler results, call the plot and report functions with the profiler_object as argument.

Examples

collapse all

Starts the profiler, stops the profiler, and displays results data. The real-time application dxpcmds6t is already loaded.

tg = slrt;
startProfiler(tg);
start(tg);
stopProfiler(tg);
stop(tg);
profiler_object = getProfilerData(tg)
Processing data, please wait ...
Code execution profiling data for model dxpcmds6t.

Starts the profiler, stops the profiler, and retrieves results data. Calls report and plot on the results data. The real-time application dxpcmds6t is already loaded.

tg = slrt;
startProfiler(tg);
start(tg);
stopProfiler(tg);
stop(tg);
profiler_object = getProfilerData(tg);
Processing data, please wait ...
report(profiler_object);

plot(profiler_object);

Input Arguments

collapse all

Object that represents the target computer. Before calling this function, make sure that you start the target computer with the Simulink Real-Time™ kernel and apply the required Ethernet link settings.

Example: tg

Output Arguments

collapse all

MATLAB® variable using which you can access the result of the profiler execution. You access the data itself only by calling the plot and report functions. The structure has the following fields:

  • TargetName — Name of target computer in target computer settings.

  • ModelInfo — Information about model on which profiler ran:

    • ModelName — Name of real-time application.

    • MATLABRelease — MATLAB release under which model was built.

    • KernelStamp — Timestamp of target computer kernel build.

    • Display — Display mode of target computer kernel. One of Graphics and Text.

    • BootMode — Boot mode of target computer kernel. One of Normal and Standalone.

Introduced in R2017b

Was this topic helpful?