Replayable Execution Trace Diffing for Software Debugging

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Identifying and debugging undesired software behaviors, such as execution crashes and performance issues, is challenging due to their rarity and difficulty in reproduction, especially when triggered by various factors like data inputs and race conditions, requiring efficient tools to analyze and compare execution traces across different code versions and environments.

Innovation Solution

The development of methods and systems for diffing replayable execution traces, which group sequences of instructions and perform diffing based on attributes to determine equivalence, even across different binaries and processor architectures, using tree-based diffing and emulation techniques to compare execution traces at various levels of detail.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If execution traces are captured at high granularity (individual instructions), then measurement precision is improved, but device complexity and processing overhead increase significantly

Engineering Contradiction:
Improvetrace granularityVSAvoidprocessing overhead
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent segments execution traces into functional groups of instructions rather than analyzing individual instructions. This segmentation allows the system to maintain high measurement precision by capturing detailed trace data while reducing processing overhead by analyzing grouped functional units instead of every individual instruction, directly resolving the contradiction between trace granularity and processing complexity

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a new dimension of analysis by creating visual representations that map execution traces across multiple dimensions (instruction flow, data flow, functional groups). This dimensional transformation allows precise trace analysis to be performed at a higher level of abstraction, reducing the computational burden while maintaining analytical precision

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Measurement precision

If detailed instruction-level tracing is performed, then measurement precision is improved, but loss of time increases due to vast amounts of data to analyze

Engineering Contradiction:
Improveexecution analysis detailVSAvoidanalysis time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

By segmenting instruction sequences into functional groups, the patent reduces the time required to analyze execution traces while preserving measurement precision. The segmentation allows analysts to focus on high-level functional behavior rather than manually examining every individual instruction, significantly reducing analysis time while maintaining the ability to drill down into detailed instruction-level information when needed

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent creates visual copies and representations of execution trace data in multiple formats and levels of detail. These visual copies allow analysts to perform high-level analysis on simplified representations while maintaining access to the complete detailed trace data, thereby reducing analysis time without sacrificing measurement precision

Inventive Principle:
Principle #26Copying

3Ease of operation

If conventional debugging tools operate on live forward-executing code, then ease of operation is maintained, but ability to reproduce rare behaviors worsens

Engineering Contradiction:
Improvedebugging simplicityVSAvoidbehavior reproduction capability
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent implements preliminary action by recording and capturing execution traces before rare undesired behaviors occur. This allows the system to preserve evidence of rare events for later analysis, combining the ease of operation of conventional debugging tools with the reliability of being able to reproduce and analyze rare behaviors that would otherwise be lost

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces execution trace recording as an intermediary mechanism between the running application and the debugging analysis. This intermediary captures detailed execution information without interfering with the normal operation of the application, allowing rare behaviors to be reproduced and analyzed while maintaining the simplicity of conventional debugging workflows

Inventive Principle:
Principle #24Intermediary (Mediator)

4Measurement precision

If execution traces are compared at instruction level, then measurement precision is improved, but productivity decreases due to computational complexity

Engineering Contradiction:
Improvetrace comparison accuracyVSAvoiddiffing efficiency
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent applies segmentation by grouping related instructions into functional units for comparison purposes. This allows the diffing process to operate at a higher level of abstraction, improving productivity by reducing the number of individual instruction comparisons needed while maintaining measurement precision through the ability to analyze grouped functional behavior and drill down into detailed instruction-level differences when necessary

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS11669434B2Diffing of replayable execution traces
Publication Date: 2023.06.06 MICROSOFT TECHNOLOGY LICENSING LLC
  • US11669434B2 patent drawing
  • US11669434B2 patent drawing
  • US11669434B2 patent drawing

AI summary

Diffing subject and comparison traces. A first call tree representing function calls made by a first executable entity is created based on subject trace, and a second call tree representing function calls made by a second executable entity is created based on a comparison trace. A differencing tree is created from the call trees, with differencing tree nodes indicate a differencing status between the first and second call trees. A differencing cost is assigned to each differencing tree node, based at least on the nodes' differencing status. A differencing tree node is identified based on following nodes that most contribute to differences between the first and second call trees, and it is used to provide an indicia of a difference between the first and second function calls.