Profiler-Based Code Optimization for Embedded Systems
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing tools for optimizing embedded code for execution performance on target processors require manual interpretation of profiler feedback, making it cumbersome for users to achieve optimal performance.
Innovation Solution
A technical computing environment (TCE) that automatically generates and regenerates embedded code based on profiler feedback, using target processor information to optimize execution and memory performance through a profiler-based optimizer and automatic code generator.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Manufacturing precision
If manual interpretation of profiler feedback is used, then code optimization can be achieved, but user effort and complexity increase
Solution Approach 1:
The system performs automatic code regeneration based on profiler feedback without requiring manual user intervention. The code generator automatically interprets profiler statistics and regenerates optimized code, allowing the system to serve itself rather than requiring user expertise in interpreting profiler data and setting optimization options.
Solution Approach 2:
An automatic code generation interface acts as an intermediary between the profiler and the code. This intermediary automatically processes profiler feedback statistics and translates them into code regeneration decisions, eliminating the need for users to directly interpret profiler data and manually configure optimization parameters.
2Ease of operation
If profiler feedback is automatically processed, then user effort is reduced, but system complexity increases
Solution Approach 1:
The code generation system is enhanced to perform multiple functions: it not only generates code from models but also automatically processes profiler feedback, analyzes execution performance, and iteratively regenerates optimized code. This multi-functionality consolidates what would otherwise require separate manual tools and processes into a single integrated system.
Solution Approach 2:
The system implements an automatic feedback loop where profiler execution statistics are fed back to the code generator, which then automatically adjusts optimization parameters and regenerates code. This closed-loop feedback mechanism enables the system to self-optimize without increasing operational complexity for users.
3Speed
If iterative code regeneration is performed, then execution performance improves, but processing time increases
Solution Approach 1:
The system performs preliminary code generation with default optimization settings before iterative regeneration based on profiler feedback. This preliminary action provides a baseline that may already be sufficiently optimized, potentially reducing the number of iterative regeneration cycles needed and thus minimizing the time loss while still achieving good execution performance.
Data Source
AI summary
A device generates code with a technical computing environment (TCE) based on a model and information associated with a target processor, registers an algorithm with the TCE, automatically sets optimization parameters applied during generation of the code based on the algorithm, executes the generated code, receives feedback based on execution of the generated code, and uses the feedback to automatically update the optimization parameters and to automatically regenerate the code with the TCE until an optimal code is achieved for the target processor.


