Main Content

stopProfiler

Stop profiling service on target computer

Since R2020b

Description

stopProfiler(target_object) stops the profiler from running on the Speedgoat® target computer.

If the profiler collected data, the data is available for download to the MATLAB® development computer.

If the profiler did not collect data, the profiler is ready to restart.

If you stop execution of the real-time application, the profiler stops.

When the profiler starts and stops, there is an increase in task execution time (TET) that can cause a CPU overload condition. If using profiler causes CPU overload, you can increase the sample time in order to use the profiler.

example

Examples

collapse all

Start the profiler, and then start the real-time application. After collecting execution profile data, stop the profiler.

  1. tg = slrealtime;
    mdlSTF = getSTFName(tg);
    mdlName = 'slrt_ex_mds_and_tasks';
    mdlNameSub1 = 'slrt_ex_mds_subsystem1';
    mdlNameSub2 = 'slrt_ex_mds_subsystem2';
    openExample(mdlName);
    open_system(mdlNameSub1);
    open_system(mdlNameSub2);
    set_param(mdlName,"SystemTargetFile",mdlSTF);
    set_param(mdlNameSub1,"SystemTargetFile",mdlSTF);
    set_param(mdlNameSub2,"SystemTargetFile",mdlSTF);
    slbuild(mdlName);
    load(tg,mdlName);
    startProfiler(tg);
    
    % start profiler before starting application
    
    start(tg);
    
    % let application run until its stop time
    % or stop the profiler by calling stopProfiler
    
    stopProfiler(tg);
  2. At this point, call either the getProfilerData function or the resetProfiler function.

Input Arguments

collapse all

Provides access to methods that manipulate the target computer properties.

Example: tg

Version History

Introduced in R2020b