Table of Contents
Fetching ...

Reimagining Disassembly Interfaces with Visualization: Combining Instruction Tracing and Control Flow with DisViz

Shadmaan Hye, Matthew P. LeGendre, Katherine E. Isaacs

TL;DR

This work tackles the difficulty of understanding how multi-file source code maps to large compiled binaries by introducing DisViz, a web-based visualization that integrates disassembly with control-flow structure. The design features a novel loop-aware layout of basic blocks, a block-based mini-map for global context, and coordinated source-disassembly views to preserve instruction order while highlighting structure. Evaluation with ten program-analysis experts across four institutions demonstrated tasks can be completed and that users found the integrated view helpful for identifying loops and reasoning about compiler optimizations. The approach offers a practical tool for performance-critical developers to analyze and optimize code by making the translation from source to binary more transparent and navigable across large codebases.

Abstract

In applications where efficiency is critical, developers may examine their compiled binaries, seeking to understand how the compiler transformed their source code and what performance implications that transformation may have. This analysis is challenging due to the vast number of disassembled binary instructions and the many-to-many mappings between them and the source code. These problems are exacerbated as source code size increases, giving the compiler more freedom to map and disperse binary instructions across the disassembly space. Interfaces for disassembly typically display instructions as an unstructured listing or sacrifice the order of execution. We design a new visual interface for disassembly code that combines execution order with control flow structure, enabling analysts to both trace through code and identify familiar aspects of the computation. Central to our approach is a novel layout of instructions grouped into basic blocks that displays a looping structure in an intuitive way. We add to this disassembly representation a unique block-based mini-map that leverages our layout and shows context across thousands of disassembly instructions. Finally, we embed our disassembly visualization in a web-based tool, DisViz, which adds dynamic linking with source code across the entire application. DizViz was developed in collaboration with program analysis experts following design study methodology and was validated through evaluation sessions with ten participants from four institutions. Participants successfully completed the evaluation tasks, hypothesized about compiler optimizations, and noted the utility of our new disassembly view. Our evaluation suggests that our new integrated view helps application developers in understanding and navigating disassembly code.

Reimagining Disassembly Interfaces with Visualization: Combining Instruction Tracing and Control Flow with DisViz

TL;DR

This work tackles the difficulty of understanding how multi-file source code maps to large compiled binaries by introducing DisViz, a web-based visualization that integrates disassembly with control-flow structure. The design features a novel loop-aware layout of basic blocks, a block-based mini-map for global context, and coordinated source-disassembly views to preserve instruction order while highlighting structure. Evaluation with ten program-analysis experts across four institutions demonstrated tasks can be completed and that users found the integrated view helpful for identifying loops and reasoning about compiler optimizations. The approach offers a practical tool for performance-critical developers to analyze and optimize code by making the translation from source to binary more transparent and navigable across large codebases.

Abstract

In applications where efficiency is critical, developers may examine their compiled binaries, seeking to understand how the compiler transformed their source code and what performance implications that transformation may have. This analysis is challenging due to the vast number of disassembled binary instructions and the many-to-many mappings between them and the source code. These problems are exacerbated as source code size increases, giving the compiler more freedom to map and disperse binary instructions across the disassembly space. Interfaces for disassembly typically display instructions as an unstructured listing or sacrifice the order of execution. We design a new visual interface for disassembly code that combines execution order with control flow structure, enabling analysts to both trace through code and identify familiar aspects of the computation. Central to our approach is a novel layout of instructions grouped into basic blocks that displays a looping structure in an intuitive way. We add to this disassembly representation a unique block-based mini-map that leverages our layout and shows context across thousands of disassembly instructions. Finally, we embed our disassembly visualization in a web-based tool, DisViz, which adds dynamic linking with source code across the entire application. DizViz was developed in collaboration with program analysis experts following design study methodology and was validated through evaluation sessions with ten participants from four institutions. Participants successfully completed the evaluation tasks, hypothesized about compiler optimizations, and noted the utility of our new disassembly view. Our evaluation suggests that our new integrated view helps application developers in understanding and navigating disassembly code.
Paper Structure (25 sections, 9 figures)

This paper contains 25 sections, 9 figures.

Figures (9)

  • Figure 1: A line of assembly has an address, instruction, and operands.
  • Figure 2: Representation of (a) source code, (b) assembly instructions, and (c) instructions divided into basic blocks with edges due to jumps.
  • Figure 3: fooquoteColor!30 Design of our basic block visualization. In this example, the basic block contains four assembly instructions.
  • Figure 4: The tooltip that appears when hovering over the mov instruction.
  • Figure 5: In the ideal case (a), the loop blocks are ordered such that the nesting is intuitive. However, we found that 7.4% of blocks in our test data exhibited the uncommon case (b), where loop blocks are interleaved. In this example, the green loop blocks are split and the nested back edges overlap. Our layout (c) creates a pseudo-block (dashed outline) to communicate this uncommon ordering, preserving both the nesting semantics and memory address order.
  • ...and 4 more figures