Parallel Replay of Executable Code for Multi-Threaded Debugging

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional time travel debuggers enforce single-threaded and single-processor restrictions on traced program code, leading to slow replay performance when debugging multi-threaded software applications.

Innovation Solution

The solution involves recording traces of different executable entities independently, allowing for parallel replay on multiple processing units, enabling fast replay performance by processing sections of trace data in parallel.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If conventional time travel debuggers enforce single-threaded and single-processor restrictions on traced program code, then correctness of trace data is ensured, but replay performance becomes slow when debugging multi-threaded software applications

Engineering Contradiction:
Improvecorrectness of trace dataVSAvoidreplay performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the trace data into multiple independent trace files, with each trace file corresponding to a specific thread or processing unit. This segmentation allows parallel processing of trace data during replay while maintaining the correctness guarantees of individual thread traces, thereby resolving the contradiction between data correctness and replay performance.

Inventive Principle:
Principle #1Segmentation

2Reliability

If conventional time travel debuggers enforce single-threaded restrictions, then trace data correctness is maintained, but the time required to locate breakpoints increases significantly

Engineering Contradiction:
Improvetrace data correctnessVSAvoidtime to locate breakpoint
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

By dividing the traced program into multiple independent thread traces stored in separate files, the system can replay multiple trace sections simultaneously using multiple processing units. This parallel replay approach maintains trace correctness while dramatically reducing the time required to locate breakpoints compared to sequential single-threaded replay.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent transitions from single-dimensional sequential replay to multi-dimensional parallel replay by utilizing multiple processing units simultaneously. Each processing unit handles a different trace file or section, effectively adding a parallelism dimension that reduces breakpoint location time while preserving correctness through coordinated replay management.

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

3Reliability

If single-processor restrictions are enforced during tracing, then trace correctness is ensured, but replay speed decreases for multi-threaded applications

Engineering Contradiction:
Improvecorrectness of trace dataVSAvoidreplay speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The trace data is segmented into separate trace files for different threads or processing units, enabling parallel replay execution. Each segment maintains its correctness independently, while the collective parallel replay of all segments achieves high-speed replay performance that was impossible with single-processor restrictions.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent creates independent copies of trace data for each thread or processing unit in separate trace files. These copies can be replayed simultaneously on multiple processing units without interfering with each other, thereby achieving fast parallel replay speed while ensuring each copy maintains trace correctness independently.

Inventive Principle:
Principle #26Copying

Data Source

PatentEP3559813B1Parallel replay of executable code
Publication Date: 2021.07.28 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP3559813B1 patent drawingFigure 1
  • EP3559813B1 patent drawingFigure 2
  • EP3559813B1 patent drawingFigure 3~4

AI summary

Embodiments herein are directed to parallel replay of code execution. An embodiment parses trace data comprising a plurality of trace data streams that each represents execution of a corresponding one of a plurality of executable entities, and identifies a plurality of trace sections that each represents one or more events executed by one of the executable entities over a period of time. The embodiment defines an ordering among the trace sections, identifies a point of interest in at least one of the executable entities, and identifies a subset of the trace sections that, when replayed linearly according to the ordering, would encounter the point of interest. The embodiment queues the subset of trace sections in an execution pool for replay by one or more processors. Then, based on the trace data, the embodiment uses the processor(s) to replay two or more of the subset of trace sections in parallel.