Memory Page Markings for Multi-Context Execution Trace Logging
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
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
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.
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
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.
Data Source
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.


