Click here to learn
about this Sponsor:
Home  |  News  |  Articles  |  Polls  |  Forum

Keywords: Match:
Podcast profiles embedded Linux code analysis tools
Sep. 14, 2007

TimeSys has published another episode in its series of free, half-hour podcasts about embedded Linux development. In the new edition, hosts Gene Sally and Maciej Halasz discuss half a dozen free code analysis tools, including both dynamic and static tools.

Dynamic tools examine code while it's running. The application under test is typically "instrumented" at link time, when special functions are substituted for standard C library calls. For instance, special versions of malloc and free in mpatrol can find memory leaks by discovering memory that is allocated but never freed, the co-hosts note.

They mainly discuss valgrind (pronounced "val grinned"), mpatrol, and electric fence, leaving out discussion of commercial alternatives. They seem to prefer valgrind, in part because it supports extension by user plugins. However, they note that mpatrol has the widest target support.

The penalty of dynamic testing is performance, however; Sally estimates that data generation overhead and processing overhead lead to performance as much as 100 percent slower. He said, "Some instrumentation is okay to leave in applications, but not code analysis instrumentation. It's better to leave home without it."

Next the team takes a look at static code analysis tools, focusing mainly on lint's GNU knock-off (Gnock-off?), "splint."

Not unlike a spell-checker or grammar parser, static code analysis tools work by searching source code for semantic errors -- improper memory handling, scope errors, stack-pointer errors, and array out-of-bounds issues are a few mentioned by the podcasters. Unlike a simple spell-checker, static code analysis tools generally create a "parse tree" first -- a process that can take as long or longer than actually compiling code.

The podcasters sensibly conclude that a mix of static and dynamic tools gives testing teams the best chance of doing their work effectively. Each type can provide code analysis that the other kind can't do.

Then, perhaps realizing they have a few more minutes of airtime remaining, the pair broach the topic of gprof, and the discussion returns once more to dynamic profiling. They note that gcc is rarely built without gprof, and thus adding the -g flag will produce a binary that generates voluminous data about "what line runs when, and how long it took," Sally said. Noting that TimeSys's Eclipse-based IDE integrates gprof, the pair opine that gprof is underutilized, in part due to ignorance of its existence, and in part due to ignorance of how to evaluate its output. "There's fantastic documentation at GNU.org," Sally said, "But you have to read the documentation."

After a brief discussion of uno, a kind of lightweight version of lint that ferrets out only uninitialized data, nil-pointer dereferencing, and out-of-bound array indexing, the pair hint that sparse could be the focus of next week's podcast. Sparse in a tool that's embedded in the kernel itself, and aims to offer static analysis of actual kernel source code.

As per usual, the latest podcast edition can be found here.


-- Henry Kingman




Related Stories:


(Click here for further information)


FUEL Database on MontaVista Linux
Whether building a mobile handset, a car navigation system, a package tracking device, or a home entertainment console, developers need capable software systems, including an operating system, development tools, and supporting libraries, to gain maximum benefit from their hardware platform and to meet aggressive time-to-market goals.

Breaking New Ground: The Evolution of Linux Clustering
With a platform comprising a complete Linux distribution, enhanced for clustering, and tailored for HPC, Penguin Computing¿s Scyld Software provides the building blocks for organizations from enterprises to workgroups to deploy, manage, and maintain Linux clusters, regardless of their size.

Data Monitoring with NightStar LX
Unlike ordinary debuggers, NightStar LX doesn¿t leave you stranded in the dark. It¿s more than just a debugger, it¿s a whole suite of integrated diagnostic tools designed for time-critical Linux applications to reduce test time, increase productivity and lower costs. You can debug, monitor, analyze and tune with minimal intrusion, so you see real execution behavior. And that¿s positively illuminating.

Virtualizing Service Provider Networks with Vyatta
This paper highlights Vyatta's unique ability to virtualize networking functions using Vyatta's secure routing software in service provider environments.

High Availability Messaging Solution Using AXIGEN, Heartbeat and DRBD
This white paper discusses a high-availability messaging solution relying on the AXIGEN Mail Server, Heartbeat and DRBD. Solution architecture and implementation, as well as benefits of using AXIGEN for this setup are all presented in detail.

Understanding the Financial Benefits of Open Source
Will open source pay off? Open source is becoming standard within enterprises, often because of cost savings. Find out how much of a financial impact it can have on your organization. Get this methodology and calculator now, compliments of JBoss.

Embedded Hardware and OS Technology Empower PC-Based Platforms
The modern embedded computer is the jack of all trades appearing in many forms.

Data Management for Real-Time Distributed Systems
This paper provides an overview of the network-centric computing model, data distribution services, and distributed data management. It then describes how the SkyBoard integration and synchronization service, coupled with an implementation of the OMG¿s Data Distribution Service (DDS) standard, can be used to create an efficient data distribution, storage, and retrieval system.

7 Advantages of D2D Backup
For decades, tape has been the backup medium of choice. But, now, disk-to-disk (D2D) backup is gaining in favor. Learn why you should make the move in this whitepaper.

 


Got a HOT tip?   please tell us!
Free weekly newsletter
Enter your email...
Click here for a profile of each sponsor:
PLATINUM SPONSORS
GOLD SPONSORS
(Become a sponsor)

ADVERTISEMENT
(Advertise here)

Check out the latest Linux powered...

mobile phones!

other cool
gadgets



BREAKING NEWS

• First ALP Linux smartphone?
• First Atom-based nano-ITX board?
• New kernel boosts embedded
• First dual-monitor LTSP 5 set-up?
• Understanding Unix spells and curses
• Tools vendor touts low-cost Linux BSPs
• Debugger supports multi-core MIP64 chips
• Webinars tackle VxWorks-to-Linux ports
• Twin POS systems for Linux
• Mobile Firefox ready for download
• Miguel de Icaza on Mono 2.0
• Embedded Linux declining?
• Mobile WiMAX service launches in U.S.
• Euro Linux device conference announces speakers
• POS stack targets Linux netbooks


Most popular stories -- past 90 days:
• Open source phone goes mass-market
• Tinest Linux system, yet?
• Garmin Nav devices run Gnome Linux
• ARM9 board boots Debian in 0.69 seconds
• Low-cost laptop runs Linpus Linux
• Linux-friendly Beagle fetches $150
• Mini Linux PC breaks $100 barrier
• Open source camera records geotagged video to SATA HDD
• Open set-top box ships
• First $100 laptop runs Linux


DesktopLinux headlines:
• Mandriva 2009 debuts with KDE 4 desktop
• Debian Sid-based distro reviewed
• Miguel de Icaza on Mono 2.0
• RIP LinuxWorld
• Testers sought for Blackberry-Linux sync software
• Google updates photo editor for Linux
• Major Mono rev ships
• Intrepid Ibex beta-tests
• Linux netbook returns higher?
• Open-source image editing project launches


Also visit our sister site:


Sign up for LinuxDevices.com's...

news feed

Home  |  News  |  Articles  |  Polls  |  Forum  |  About  |  Contact
 

Ziff Davis Enterprise Home | Contact Us | Advertise | Link to Us | Reprints | Magazine Subscriptions | Newsletters
Tech RSS Feeds | White Papers | ROI Calculators | Tech Podcasts | Tech Video | VARs | Channel News

Baseline | Careers | Channel Insider | CIO Insight | DesktopLinux | DeviceForge | DevSource | eSeminars |
eWEEK | Enterprise Network Security | LinuxDevices | Linux Watch | Microsoft Watch | Mid-market | Networking | PDF Zone |
Publish | Security IT Hub | Strategic Partner | Web Buyer's Guide | Windows for Devices

Developer Shed | Dev Shed | ASP Free | Dev Articles | Dev Hardware | SEO Chat | Tutorialized | Scripts |
Code Walkers | Web Hosters | Dev Mechanic | Dev Archives | igrep

Use of this site is governed by our Terms of Service and Privacy Policy. Except where otherwise specified, the contents of this site are copyright © 1999-2008 Ziff Davis Enterprise Holdings Inc. All Rights Reserved. Reproduction in whole or in part in any form or medium without express written permission of Ziff Davis Enterprise is prohibited. Linux is a registered trademark of Linus Torvalds. All other marks are the property of their respective owners.