diffViz: Observe “diff” in an aligned visualization

1 minute read

Published:

Why diffing?

If I want to explain my Ph.D. work for my nephew in his sixth grade in the simplest way, I would say “I am making software for other computer programmers to understand their program and its behavior”. That would pretty much wrap up my work as I am applying different techniques to convert raw execution traces to meaningful information that brings insight into the actual behavior of the program.

Programmers often have a general picture of the program characteristics in their mind and on the way to its completion, they gradually check the behavior with their expectations using simple features like printf debugging:

“The most effective debugging tool is still careful thought, coupled with judiciously placed print statements.” — Brian Kernighan, “Unix for Beginners” (1979)

The process of printf debugging is to virtually compare (i.e., diff) the expected vs. executed behavior. This is the core idea of DiffTrace, the tool-chain that we designed and implemented to locate flaws in HPC applications. We used different techniques to find trace files (or source codes) that has changed the most when a bug is introduced or the program misbehaved. Then we wanted to see what are the actual points of differences between a good (or successful) execution and its counterpart bad (or buggy) execution. That is why we implemented diffViz.

diffViz

To highlight the differences in an easy-to-understand manner, diffViz visually separates the common and different blocks of a pair of pre-processed traces (or any pair of text-based files) by implementing the diff algorithm. diff takes two sequences A and B and computes the minimal edit to convert A to B. This algorithm is used in the GNU diff utility to compare two text files and in git for efficiently keeping track of file changes. diffViz aligns common and different blocks of a pair of sequences (e.g., traces) horizontally and vertically, making it easier for the analyst to see the differences at a glance.

alt text

diffViz is now available from this Github repository.