주요 콘텐츠

이 페이지는 기계 번역을 사용하여 번역되었습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.

성능

실행 시간 프로파일링, 메모리 사용량 프로파일링, 최적화된 코드

프로덕션 코드를 생성할 준비가 되면 성능을 개선하기 위해 구성 옵션과 고급 최적화를 활용하십시오. MATLAB® Coder™ 제품 설명서에 설명된 옵션과 최적화를 사용할 수 있습니다. Embedded Coder®를 사용하여 실행 시간 프로파일링과 메모리 사용량 프로파일링을 통해 성능을 분석할 수도 있습니다.

실행 시간 프로파일링을 사용하여 다음을 수행할 수 있습니다.

  • 생성된 코드가 하드웨어의 실시간 요구 사항을 충족하는지 확인합니다.

  • 성능 향상이 필요한 코드 섹션을 확인합니다.

정적 코드 메트릭 리포트에는 파일, 전역 변수 및 함수에 대한 메트릭이 포함됩니다. 정적 코드 메트릭 리포트는 어떤 전역 변수와 함수 호출 경로가 성능에 영향을 미치는지 확인하는 데 도움이 됩니다. 생성된 코드를 실행하는 데 필요한 스택 메모리 크기를 확인하기 위해 스택 사용 프로파일을 생성하는 SIL(Software-in-the-Loop) 및 PIL(Processor-in-the-Loop) 실행을 실행할 수 있습니다.

코드 프로파일 분석기Analyze execution-time and stack usage profiles for generated code (R2023a 이후)

함수

모두 확장

instrumentCodeAdd instrumentation to generated code to perform execution time / memory usage profiling and analyze code coverage (R2023a 이후)
ExecutionTimeInSecondsGet execution time in seconds for profiled section of code (MATLAB code generation)
ExecutionTimeInTicksGet execution times in timer ticks for profiled section of code (MATLAB code generation)
getCoderExecutionProfileExtract execution-time profile for code generated from MATLAB function (MATLAB code generation)
NameGet name of profiled code section (MATLAB code generation)
NumberGet number that uniquely identifies profiled code section (MATLAB code generation)
NumCallsTotal number of calls to profiled code section (MATLAB code generation)
reportOpen code execution profiling report and specify display of time measurements (MATLAB code generation)
scheduleVisualize task scheduling (MATLAB code generation) (R2021b 이후)
SectionsGet array of coder.profile.ExecutionTimeSection objects for profiled code sections (MATLAB code generation)
SelfTimeInTicksGet number of timer ticks recorded for profiled code section, excluding time spent in child functions (MATLAB code generation)
TimeTime over which code section execution time measurements are made (MATLAB code generation)
TimerTicksPerSecondGet and set number of timer ticks per second (MATLAB code generation)
TotalExecutionTimeInTicksGet total number of timer ticks recorded for profiled code section (MATLAB code generation)
TotalSelfTimeInTicksGet total number of timer ticks recorded for profiled code section, excluding time spent in child functions (MATLAB code generation)
TotalTurnaroundTimeInTicksGet total number of timer ticks between start and finish of the profiled code section over the entire execution. (MATLAB code generation)
TurnaroundTimeInTicksGet number of timer ticks between start and finish of the profiled code section (MATLAB code generation)
MaximumExecutionTimeCallNumGet the call number at which maximum number of timer ticks occurred (MATLAB code generation)
MaximumExecutionTimeInTicksGet maximum number of timer ticks for single invocation of profiled code section (MATLAB code generation)
MaximumSelfTimeCallNumGet the call number at which the maximum number of timer ticks occurred, excluding time spent in child functions (MATLAB code generation)
MaximumSelfTimeInTicksGet the maximum number of timer ticks recorded for profiled code section, excluding time spent in child functions (MATLAB code generation)
MaximumTurnaroundTimeCallNumGet call number for the code section invocation with the maximum number of timer ticks between the start and the finish (MATLAB code generation)
MaximumTurnaroundTimeInTicksGet maximum number of timer ticks between start and finish of a single invocation of profiled code section (MATLAB code generation)

객체

모두 확장

coder.profile.StackDriverSpecify driver to obtain stack usage data from target hardware (R2022a 이후)

도움말 항목

실행 시간 프로파일링

메모리 사용량 프로파일링

실행 속도