When Code Analysis Fails
There are cases where analysis fails and no routes are created.
Endpoint Not Found
Endpoints are invalid if they fail to map to an instruction address. This can be due to a number of reasons.
Invalid Reference
The reference used in the analysis cannot be resolved to a valid PC. This can be due to having made a mistake in the spelling of a label or endpoint, or because of a compiler optimization has eliminated the code being timed.
The Info View of xTIMEcomposer Studio shows which endpoints, labels and calls are available in the binary.
On the console the available endpoints, labels and calls can be listed with:
- list endpoints
- list srclabels
- list calls
Not Found On Active Tiles
The user can configure which of the xCORE tiles in the binary are taken into account when performing analysis. The endpoint reference may not be found on the current subset of tiles being analyzed.
To fix this ensure that the relevant tiles are active for the endpoint (see Active Tiles).
Endpoint In Data Section
The tool only decodes instructions from the executable sections. Therefore, if an endpoint maps to a data section it will not be found. This is usually due to an error in an assembler file so that code is not placed in a .text section.
To fix this place a .text directive before the code.
Out Of Memory
There are cases where the tool can run out of memory when analyzing the requested route or function. This is due to the complexity of the route being analyzed. This can be resolved by either restricting the route (using exclusions) or increasing the JVM size.
Restrict The Route
Generally, when the tool runs out of memory it is because the user is timing code which is not restricted to the code they intended to time. In these cases add exclusions to reduce the complexity of the routes and therefore the memory usage of the tool.
Increase The JVM Size
To increase the amount of memory available to the Java Virtual Machine, change the JVM_ARGS environment variable. The default value for xTIMEcomposer Studio is 1024MB. This is configured through the <tools>/xtimecomposer_bin/xtimecomposer.ini file.
For the command-line tools the <tools>/bin/xtimecomposericon.bat should be edited to configure the JVM size. Adding the following line would give the same memory size as xTIMEcomposer Studio uses.
JVM_ARGS=-Xmx1024m