Advanced RTOS, embedded real-time OS, compact OS, IDE, Software development toolkits, embedded c compilers, Multicore debugger, hardware probes, static source code analysis tool, secure hypervisor, virtual prototyping platform
CodeBalance® Code Optimizer

CodeBalance

The CodeBalance® Code Optimizer enables embedded developers to achieve an optimum balance of small code size and high performance.
 
In ARM/Thumb® and MIPS16® architectures, both 16-bit and 32-bit instructions are supported, giving the developer a choice. In general, 16-bit instructions will yield smaller total code size for a given function, compared with 32-bit instructions. However, in general, 16-bit instructions will not perform the function as fast as 32-bit instructions would. This presents a dilemma to the developer: Should I optimize for "Smaller" or "Faster"? needs.
 
 Optimize for Samller Faster Code
 
With CodeBalance, Green Hills Software offers an automated method of making this trade-off easily and effectively, based on the developer's priorities. Here's what CodeBalance can do:
  • CodeBalance can optimize for Highest Performance with at least X% Code Size reduction, where the user specifies "X."
  • CodeBalance also can optimize for Smallest Code Size but with the top Y% of execution time compiled in 32-bit mode, where the user specifies "Y."
This means that the user can put a limit on the performance he or she is willing to give up in order to achieve the smallest possible code size. Alternately, he or she can specify a code size reduction and ask CodeBalance to generate the fastest possible code within that size constraint.

Here's how CodeBalance works:

First, CodeBalance compiles the whole application in 32-bit mode. This is intended to produce the highest possible performance without regard for code size. Then, CodeBalance profiles the application, finding out how long each function executes as a percentage of overall execution time. Next, CodeBalance recompiles those functions that take up the smallest amount of execution time into 16-bit mode, reducing their code size. CodeBalance continues recompiling individual functions until it reaches the user-specified limit of code size reduction ("X") or execution-time guarantee ("Y"). Finally, CodeBalance reprofiles the application and shows the user the results. For example, "By reducing code 37%, execution time increased by 4%".

CodeBalance performs these steps automatically, even with hundreds of functions in the application. This provides the developer with a powerful, easy to use tool for creating a program to meet the needs of the application.

UNIQUE CAPABILITIES CodeBalance can optimize code because of two unique capabilities:
  • MULTI's advanced profiling capability
  • Green Hills Compilers' ability to generate 16-bit or 32-bit code on a function by function basis



» More on CodeBalance

» RTOS
» MULTI IDE
» AdaMULTI IDE
» Compilers
» Communications Software
» Custom Development