Cache Trace Logging by Reference to Reduce File Size

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing debugging technologies face challenges in efficiently recording and replaying program execution across multiple processing units due to high performance overhead and large trace file sizes, particularly when dealing with cache misses and data logging across multiple processor caches.

Innovation Solution

The solution involves modifying processor hardware and microcode to detect cache misses in lower-layer caches and utilize upper-layer shared caches to determine if data has already been logged by another processing unit, allowing for logging by reference rather than value, thereby reducing trace file size and performance impact.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If trace data is recorded for every cache miss in lower-layer caches, then trace accuracy is improved, but trace file size increases significantly

Engineering Contradiction:
Improvetrace accuracyVSAvoidtrace file size
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The patent merges trace recording across multiple processing units by having the upper-layer cache coordinate logging activities. When data is logged by one processing unit, other processing units can reference this existing log entry instead of creating duplicate entries, thereby reducing trace file size while maintaining complete trace coverage.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The upper-layer cache serves multiple functions: it acts as a standard cache for data storage and simultaneously serves as a coordination mechanism for trace recording. By checking the upper-layer cache, processing units can determine whether data has already been logged, enabling a universal logging reference system across all processing units.

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Reliability

If comprehensive trace recording is performed across all processing units, then debugging capability is improved, but performance overhead increases

Engineering Contradiction:
Improvedebugging capabilityVSAvoidperformance overhead
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system performs preliminary checking of the upper-layer cache before logging data. This preliminary action determines whether logging is necessary, preventing redundant logging operations and reducing performance overhead while ensuring that all necessary trace data is captured for debugging.

Inventive Principle:
Principle #10Preliminary action

3Device complexity

If trace recording is performed without coordination between processing units, then implementation simplicity is maintained, but trace redundancy increases

Engineering Contradiction:
Improveimplementation simplicityVSAvoidtrace redundancy
Core Design Contradiction:
Device complexityVSQuantity of substance

Solution Approach 1:

The upper-layer cache acts as an intermediary between multiple processing units for trace coordination. It provides a centralized reference point that all processing units can query to determine whether data has already been logged, eliminating the need for complex peer-to-peer coordination while reducing trace redundancy.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentEP3740871B1Trace recording by logging influxes to a lower-layer cache based on entries in an upper-layer cache
Publication Date: 2022.08.24 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP3740871B1 patent drawingFigure 1
  • EP3740871B1 patent drawingFigure 2A~2B
  • EP3740871B1 patent drawingFigure 3

AI summary

Trace recording based on recording an influx to a lower-level cache by reference to prior log data, based on knowledge of an upper-level cache. A computing device includes a plurality of processing units, a plurality of N-level caches, and an (N+i)-level cache that is a backing store for the N-level caches. Based on activity of a first processing unit, the computing device detects an influx of data to a first N-level cache. The computing device checks the (N+i)-level cache to determine if the data was already logged for a second processing unit. Based on the check, the computing device (i) causes the data to be logged for the first processing unit by reference to log data (i.e., when the data was already logged), or causes the data to be logged by value for the first processing unit (i.e., when the data was not already logged).