Techniques and Tools For Software Analysis: Freescale Semiconductor
Techniques and Tools For Software Analysis: Freescale Semiconductor
Freescale Semiconductor
CONTENTS
Software Visibility
and Analysis Tools
Pre-Hardware Post-Shipment
Simulation Remote Diagnostics
3.1 Development
Software analysis tools augment a debugger when stop mode is not an option. An Instruction Trace tool can
provide performance measurements while clarifying RTOS interactions, context switches and performance
bottlenecks. The most effective tools not only trace function pathways, but provide visibility inside the functions
as well.
Software Trace tools are critical in dealing with failures. Often, with hard-to-detect faults, it is difficult to
determine the string of events that led to the failure. After the fact, it is often impossible to reconstruct an
identical situation. A snapshot of the system at the time of failure is often insufficient; a more complete history is
needed.
Trace tools reveal all of the events that led to the failure. Hardware-based analysis tools can provide an
advantage in most cases, as they collect and store trace data off the system. Therefore, if the system crashes or
experiences an unexpected problem, there is significantly less risk of corruption or loss of trace data.
3.2 Tuning Phase
Just because the software is up and running, that does not mean it is ready to ship. It has to be tuned for
optimum performance. Software analysis tools are an invaluable aid during this phase, when the application's
performance is being measured and tweaked. There are two software analysis methods that are commonly
used:
3.2.1 Instrumentation
By applying tags to specific lines of code, the instrumentation method offers extremely accurate measurements of
application performance. However, the method does increase the size of the code. It is important to find tools that
permit a tight focus on specific problems. There are hardware solutions available that have minimal impact on the
final code.
3.2.2 Sampling Method
The sampling method is non-intrusive to code size, but it cannot offer the 100 percent accuracy of instrumentation.
Sampling also requires some form of monitor, which drains system resources and impacts its performance,
affecting the accuracy of the test.
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other
product or service names are the property of their respective owners.
© Freescale Semiconductor, Inc., 2005.
Document Number: CODETESTTECHWP
Rev. 0
11/2005