Even though the original source code might not be that long, the compiler generated executable can be very big. That generated executable could be too big to fit your embedded device. So how do you know if it is or isn’t?

Compiler generated code is complex. It can also be large. This is because the original code is duplicated and specialized for optimal functionality and efficiency. But if there is more code, the processor of an embedded device may need more memory than what is available. Power consumption may also go up due to an increase in instruction cache misses. Which ultimately may require a switch to a bigger – and therefore more expensive – processor. Or cut application features. That is something nobody wants, right?

Measuring code size
What if you, when you are evaluating the compiler, can measure and compare the effect of optimization options on generated compiler code size? Or, measure the change in generated code size between an old and a new compiler? Even better, what if that is done automatically, instead of having to run a separate test for that?

We have heard from several SuperTest users that this would be a great feature. That is why the latest update of SuperTest now comes with such a feature, called Code Size Tracking. With it, you can easily verify the generated code size as part of a regular SuperTest run.

Code Size Tracking

The code size tracking report generator makes it easy to see the size report of one run, or compare size measurements of one SuperTest run with another. That is useful to compare new runs with a golden reference too. The default output will give you a simple summary with the average code size, and a histogram to give you an idea of the code size deviation. Alternatively, the report generator can create a spreadsheet compatible CSV file containing the detailed results and comparison for every test in the run. This is a great basis for additional automated analysis, or just as a source to create graphs from.

Code Size Tracking allows you to focus on specific segments in the binary as well. You can look at the linked executable or at individual object files. You can select the whole binary, or just the code, data or BSS segment.

Code Size Tracking comes standard with the latest update of SuperTest, which is now available. If you want to know more about it and all the other advantages of the SuperTest, don’t hesitate to contact us. To try it for yourself, get the SuperTest demo, which includes code size tracking as well.

Subscribe to our monthly blog!