Decoupling Trace Data Streams via Cache Coherence Protocol

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing debugging tools for multi-threaded applications face performance degradation during replay due to inter-thread dependencies in CCP-based traces, which limits parallelization and increases trace file size.

Innovation Solution

The solution involves decoupling trace data streams by identifying and removing inter-thread dependencies using cache coherence protocol (CCP) data, allowing each thread to be replayed independently by recording new or augmenting trace data streams.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If CCP-based traces are used to reduce trace file size and recording overhead, then trace file size and overhead are reduced, but inter-thread dependencies are created that limit parallelization during replay

Engineering Contradiction:
Improvetrace file sizeVSAvoidreplay performance
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

The patent segments the trace file into multiple independent thread trace files by analyzing CCP data to identify thread-specific memory accesses. Each thread's trace file contains only the memory accesses relevant to that thread, eliminating inter-thread dependencies and enabling parallel replay of multiple threads without synchronization overhead.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts inter-thread dependencies from the trace data by using CCP information to determine which memory accesses are shared between threads. By removing these shared accesses from individual thread traces and handling them separately, the patent enables independent parallel replay of each thread while maintaining correctness.

Inventive Principle:
Principle #2Taking out (Extraction)

2Use of energy by moving object

If CCP data is used to determine what data to log, then recording overhead is reduced, but the ability to parallelize replay is limited due to inter-thread dependencies

Engineering Contradiction:
Improverecording overheadVSAvoidparallelization capability
Core Design Contradiction:
Use of energy by moving objectVSEase of operation

Solution Approach 1:

The patent segments the recording process into thread-specific components by using CCP data to identify which memory accesses belong to which thread. This segmentation allows each thread's trace to be recorded and replayed independently, maintaining low recording overhead while enabling parallel replay execution.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary analysis of CCP data during the recording phase to pre-identify thread-specific memory accesses and inter-thread dependencies. This preliminary action allows the trace files to be structured in advance for optimal parallel replay, reducing the need for complex runtime dependency resolution.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If inter-thread dependencies are removed to enable thread-independent replay, then replay performance is enhanced, but additional processing is required to identify and remove dependencies

Engineering Contradiction:
Improvereplay performanceVSAvoidtrace processing complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent uses CCP data as an intermediary to automatically identify and remove inter-thread dependencies from trace files. The CCP information serves as a mediator that provides the necessary information about thread-specific memory accesses, simplifying the dependency removal process compared to analyzing all possible thread interactions.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent creates simplified copies of the original trace data that are tailored for parallel replay. By generating thread-specific trace files that copy only the necessary memory accesses for each thread, the patent reduces replay complexity while maintaining the ability to reconstruct the original execution behavior.

Inventive Principle:
Principle #26Copying

Data Source

PatentEP3740872B1Decoupling trace data streams using cache coherence protocol data
Publication Date: 2023.12.06 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP3740872B1 patent drawingFigure 1
  • EP3740872B1 patent drawingFigure 2
  • EP3740872B1 patent drawingFigure 3

AI summary

Decoupling trace data streams using cache coherence protocol (CCP) data. One or more trace data streams include cache activity trace data and CCP trace data relating to executing a plurality of threads. The cache activity trace data includes inter-thread data dependencies comprising dependent cache activity trace entries, which each record a corresponding memory access by a corresponding thread in reliance on traced CCP dependence between threads. The inter-thread data dependencies are removed to create independent cache activity trace data for each of the plurality of threads that enables each thread to be replayed independently. The removal includes, for each dependent cache activity trace entry (i) identifying a corresponding value of the corresponding memory access by the corresponding thread based on the traced CCP dependence between threads, and (ii) recording the corresponding value of the corresponding memory access on behalf of the corresponding thread.