BROWSE ARTICLES BY TECHNOLOGY

DIGITAL EDITION

RTC Magazine Digital Edition

INDUSTRY NEWS

RECENT COMMENTS

  • Hi Juan, This article shows you how to implement a quadrature encoder interface on the FPGA using digital lines. It was written for our PCI or P...

    Meghan Meckstroth Kerry - See Article

  • Good coverage on the general advantages of COM, and X86 implementations. It would have been nice to ARM options for lower-power (handheld) applicat...

    Brian Empey, P.Eng. - See Article

  • Your article about Application Service Platforms in RTC April is another example of great reporting by RTC. Can we have a new RTC index category -...

    Kenneth G Blemel - See Article

  • Static analysis tools/scanners are a great arsenal for companies who require high quality code. It does a great job of finding a wide range of pro...

    Andrew Yang - See Article

  • I hope that the microcessor based Insulin Pump riding on my belt would be held to a higher standard. If it quits, I can work around that inconvenie...

    Karl Williamson - See Article

WHITEPAPERS

QUICK DOWNLOADS

RTEC10 is an index made up of 10 public companies which have revenue that is derived primarily from sales in the embedded sector. The companies are made up of both software and hardware companies being traded on public exchanges.

COMPANY PRICECHANGE
Kontron
7.81
4.577%
Adlink
1.54
2.388%
Advantech
2.32
1.505%
Interphase
1.61
-3.012%
Radisys
9.26
-1.016%
-   Performance Technologies2.100.000%
-   Enea5.630.000%
PLX
3.62
-3.209%
Mercury Computer
11.76
-2.931%
Elma
412.98
-0.476%
HIGH LOW MKT CAP
7.85
7.43
435.04
1.58
1.52
185.11
2.33
2.30
1,198.70
1.70
1.61
11.00
9.41
9.24
223.74
2.102.1023.34
5.635.54101.86
3.74
3.61
134.28
12.17
11.76
279.57
412.98
412.98
94.25
RTEC10 Index: 490.94 (1.11%)
RTEC10 is sponsored by VDC research

INDUSTRY INSIGHT

Software Analysis Tools

Analysis Tools Get to the Heart of Software Performance

So now the code runs. Or does it? Only analysis of many factors can reveal hidden problems and provide confidence for time and missioncritical systems.

TOM WILLIAMS, EDITOR-IN-CHIEF

  • Page 1 of 4
    Bookmark and Share

Getting code to run requires programming skill. Making sure that it runs correctly requires that it be exercised and debugged. Assuring that it runs efficiently, optimally, reliably and safely requires in-depth analysis. The tools to achieve these latter goals start from the concepts of debugging but are used to examine code from myriad different aspects. However, for embedded projects that must work and on which human life and safety often depend, they are not an option.

When applying analysis to running code, the developer is very often confronted with a kind of “Heisenberg dilemma.” That is, “What level of intrusiveness into the actual execution can I tolerate and still be confident that what I’m seeing is what will actually happen in the deployed system?” That question applies mostly to timing issues. Among the other issues are assessing the overall performance, making sure that memory is being used efficiently and reliably and finding intermittent glitches that may not always show up in a standard debugging session.

In addition to the level of intrusiveness, one must also consider the specificity of the tool. Generally speaking, and of necessity, the deeper a tool delves into the inner workings of a system, the more intrusive it tends to become as well as more specific to the underlying operating system. There was a time when a certain tool loaded instrumentation tags into the source code, which then produced instructions that shot analysis data off to a connected development host or some attached probe. That has since largely fallen out of favor—at least for embedded development, although a certain amount of instrumentation may be needed in some cases.

Generally, however, the overhead on the target is caused by a relatively non-intrusive monitor or interface that buffers and sends execution data to the host. The least intrusive and deepest analysis is possible using tools that have a hardware assist, such as a JTAG probe, and take advantage of on-chip debug facilities such as the Traceports or embedded trace macrocells (EMTs). When not relying on instrumentation, a tool must be able to reproduce the timing characteristics as they would be without the overhead introduced by the tool.

Thus, when running a profiler, for example, the code may run slower overall than the deployed system, but the results displayed must reflect the actual execution times of the various functions. Most profilers can generate accurate results whether the code is running on the target or under an instruction set simulator on the host. In the latter case, it certainly runs slower, but is able to get an accurate instruction count and deliver performance measurements that can be used to identify areas that may be bottlenecks. It is these routines that the developer will want to zero in on to try to make more efficient.

A rich set of analysis tools, known as ScopeTools is available from both Wind River Systems and from Real-Time Innovations. Targeted at Wind River platforms using the Tornado development environment, the suite consists of five tools that are representative of the kinds of analysis tasks that need to be done for quality embedded software. They examine the code and its behavior from different aspects.

StethoScope is a tool that can monitor a running system and watch a set of variables, of any memory location. It lets you trigger data collection on specific events, change variables in a running program, see peak values and save all the data to disk. The purpose of StethoScope is to provide live data analysis on a running system without interfering with the code.

ProfileScope, on the other hand, is used to diagnose the execution speed of a program on a function-by-function basis. The profiler produces histograms of the execution times of the various routines so that you can zoom in on those that represent bottlenecks and concentrate on the areas that appear to be taking the most CPU resources in an effort to improve the overall performance of the application (Figure 1).

MemScope is a visual memory analysis tool that helps to efficiently manage memory use by identifying memory leaks as they occur and to check memory consistency and find errors that may occur in the memory pool. It offers Aggregate, Tree, Time and Fragmentation views and can track the allocation and deallocation of memory. This includes a view of the full stack of allocation to help figure out why memory was allocated. The tool can be used with a running system with no need for instrumentation using special compilations.

LEAVE A COMMENT