Memory Page Markings for Multi-Context Execution Trace Logging

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing processor-based tracing techniques struggle to record simultaneous/interleaved execution of plural execution contexts into separate and distinct replayable traces, particularly when these contexts interact with common shared memory, as they cannot determine the appropriate trace data stream for logging cache line data.

Innovation Solution

Implement processor support using cache way-locking and memory page markings to track memory operations and log them into dedicated execution traces, ensuring each trace contains sufficient data to replay the memory operations of its corresponding execution context.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If processor-based tracing techniques record simultaneous/interleaved execution of plural execution contexts into a common trace buffer, then trace data can be captured, but the techniques cannot determine the appropriate trace data stream for logging cache line data when contexts interact with common shared memory

Engineering Contradiction:
Improvetrace data accuracyVSAvoidtracing system complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent segments the trace buffer into multiple independent trace data streams, with each stream dedicated to a specific execution context. This segmentation allows the system to accurately attribute cache line data to the correct execution context while maintaining separate replayable traces for each context, resolving the inability to determine appropriate trace data streams in shared memory scenarios.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary mechanism (trace state information and context identification logic) that mediates between the common shared memory and multiple trace data streams. This intermediary enables the system to correctly route cache line data to the appropriate trace stream by identifying which execution context caused each memory operation, thereby achieving accurate tracing without overwhelming complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If replayable execution traces capture vast amounts of information at tens- to hundreds- of thousands of MIPS, then bit-accurate trace data is obtained, but the traces quickly grow very large in size in memory and/or on disk

Engineering Contradiction:
Improvebit-accurate trace dataVSAvoidtrace data volume
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The patent extracts and records only the essential trace state information needed for replaying execution contexts, rather than capturing every possible detail. By selectively logging only the minimum necessary data (cache line data, trace state, context identification) required to reproduce execution behavior, the system maintains bit-accurate replay capability while significantly reducing the volume of trace data stored in memory and on disk.

Inventive Principle:
Principle #2Taking out (Extraction)

3Loss of time

If conventional diagnostic tools operate on live forward-executing code, then real-time debugging is possible, but historic debugging and time travel debugging cannot be performed

Engineering Contradiction:
Improvereal-time debugging capabilityVSAvoiddebugging mode flexibility
Core Design Contradiction:
Loss of timeVSAdaptability or versatility

Solution Approach 1:

The patent performs preliminary action by recording execution traces during live forward-executing code operation. This preliminary recording of trace state information and cache line data creates a historical record that enables subsequent historic debugging and time travel debugging activities. The system captures execution context information in advance, allowing developers to later replay and analyze past execution behavior without needing the original live execution context.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12596630B2Processor support for using memory page markings as logging cues to simultaneously record plural execution contexts into independent execution traces
Publication Date: 2026.04.07 MICROSOFT TECHNOLOGY LICENSING LLC
  • US12596630B2 patent drawing
  • US12596630B2 patent drawing
  • US12596630B2 patent drawing

AI summary

Using memory markings to record plural execution contexts into independent traces. A processor detects a memory operation and identifies an associated memory marking from among a first marking indicating that a first memory region is logged for the first context, and a second marking indicating that a second memory region is logged for a second context. Based on identifying the memory marking as the second marking, and based the first context causing the memory operation, the processor performs at least one of: when the memory operation causes an influx into a cache, logging the influx to a second trace associated with the second context; when the memory operation is a read, logging the read to a first trace associated with the first context; or when the memory operation is a write, performing one of logging the write to the second trace, or evicting a target cache line.