How many times did you study the replay of Michael Phelps winning the 100 meter butterfly by a .01 second margin...
-– and his seventh gold medal -– in the Beijing Olympics this summer? Now developers can do a similar thing with TotalView Technologies' new ReplayEngine, which records and replays programs during execution.
By working backward from a program crash toward the defect, developers and testers can find and correct problematic code more quickly and easily, leading to higher quality and better performing software, according to TotalView, particularly for multicore environments and high-performance computing.
In these complex computing scenarios, "it's more difficult for developers when they try to find bugs and try to figure out why code isn't working," said Rich Collier, CEO of TotalView Technologies. Using a debugging tool to find root cause, developers have to carefully work their way through the scenarios and make guesses, he said.
"The main problem is if a program crashes, a lot of times the point of failure the developer sees is not necessarily where the error occurred," Collier said. "There's a huge risk between where you think the problem is and where the actual problem is. With methods today, you're just troubleshooting, making hypotheses about where the error is."
In contrast, Collier said, with the ReplayEngine "you can see things backward and forward, simplifying the debugging process and making developers more productive. By doing a replay and watching the code, you can easily find the actual crash and root cause. You can see things as variables change, as the stack changes, so you can spot easily where the application went off-track and address the problem."
Innovative debugging improves productivity
Addison Snell, vice president and GM at Tabor Research, called ReplayEngine innovative in that it allows developers to take a more straightforward approach to debugging applications, thereby shortening time to implementation improving organizational productivity.
"This is particularly useful in scalable, multi-core environments in which errors can be hard to track down or reproduce," Snell said. "TotalView is helping to enable more people to effectively develop scalable applications, which our research shows is a prime area of concern for the industry."
ReplayEngine extends the capabilities of TotalView, the company's source code analysis and memory error detection tool. Features include the following:
- Line-by-line reverse execution
- A "run back to" command that reverse-jumps longer distances within the code
- The ability to replay thread context switches exactly as they happened
- The ability to switch between record mode and replay mode
- Debug parallel applications using the MPICH 2.0 Message Passing Interface (MPI) library on x86 32-bit Linux platforms
- The ability to examine the historical state of heap memory in conjunction with TotalView's memory debugging feature
ReplayEngine is currently available on Linux-x86 and Linux-x86-64.
According to Collier, "There are similar products [to ReplayEngine] in the Java world, but for C/C++ and Fortran we haven't found anything at all. As the market moves toward multithreaded, Java is not as well behaved as C, and we find more people are moving back to straight C to take advantage of multicore."
For developers, testers, and QA engineers, Collier said ReplayEngine will help them do their jobs faster and with better-quality results -- concepts that give swimmer Phelps (and development organizations) the competitive margin.