VM Execution Tracing With Causality-Preserving Trace Chunks

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing VM execution tracing techniques face challenges in being convenient to implement, having a low impact on performance, maintaining causality for concurrent multiprocessing VMs, and being usable with or without VM visibility or actions.

Innovation Solution

A virtualization layer captures replayable execution traces by tracing instructions, memory inputs/outputs, and register data, with causality preserved across chunks using ordering markers, and supports transparent tracing for guest software.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of information

If execution tracing is performed on VMs managed by the virtualization layer, then detailed execution information can be captured, but the complexity of the virtualization layer increases

Engineering Contradiction:
Improveexecution informationVSAvoidvirtualization layer complexity
Core Design Contradiction:
Loss of informationVSDevice complexity

Solution Approach 1:

A trace buffer is introduced as an intermediary component between the virtualization layer and the traced execution units. The trace buffer receives execution traces from multiple VMs and manages their storage and retrieval, allowing the virtualization layer to capture execution information without directly managing complex tracing logic for each VM individually. This mediator approach reduces the complexity burden on the virtualization layer while maintaining comprehensive execution information capture.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Loss of information

If trace data is captured in chunks with causality preservation, then ordering information is maintained between chunks, but ordering within chunks is not preserved

Engineering Contradiction:
Improvecausality informationVSAvoidordering precision
Core Design Contradiction:
Loss of informationVSMeasurement precision

Solution Approach 1:

The execution trace is segmented into discrete chunks that are captured at specific boundaries (e.g., context switches). Each chunk contains execution information up to a certain point, and causality is preserved between chunks through boundary markers. While ordering within individual chunks may not be preserved, the segmentation approach maintains causality across the entire trace by ensuring that chunks are retrieved and processed in the correct sequential order based on their boundaries and markers.

Inventive Principle:
Principle #1Segmentation

3Loss of information

If monotonically increasing markers are inserted between context switches, then chunks are relatively ordered, but the overhead of marker insertion increases

Engineering Contradiction:
Improveordering informationVSAvoidoverhead
Core Design Contradiction:
Loss of informationVSLoss of energy

Solution Approach 1:

The trace buffer autonomously manages the insertion and processing of monotonically increasing markers between context switches without requiring external intervention. The system automatically detects context switch boundaries, inserts appropriate markers to maintain ordering information, and manages chunk retrieval based on these markers. This self-service approach minimizes the overhead of marker insertion by automating the process within the trace buffer itself, reducing the need for additional manual coordination or complex external management mechanisms.

Inventive Principle:
Principle #25Self-service

Data Source

PatentEP4462260B1Virtual machine execution tracing
Publication Date: 2026.04.29 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP4462260B1 patent drawingFigure 1
  • EP4462260B1 patent drawingFigure 2
  • EP4462260B1 patent drawingFigure 3

AI summary

Abstract: Embodiments relate to a virtualization layer capturing replayable execution traces of VMs managed by the virtualiza-tion layer. Execution tracing can be performed on any unit of execution managed by the virtualization layer, e.g., threads, processes, virtual processors, individual VMs, multiple VMs, etc. Traced execution units may be executing in parallel. Execution tracing involves capturing to a buffer: executed instructions, memory inputted to instructions, memory outputted by instructions, registers touched by instructions, and ordering markers. Trace data can be captured in chunks, where causality is preserved and ordering is preserved between chunks but not necessarily within chunks. The chunks may be delineated by inserting monotonically increasing markers between context switches, thus relatively ordering the chunks. Determinism may be partially provided by identifying nondeterministic events. VM tracing may be transparent to guest software, which need not be instrumented. Alternatively, guests may interface with the virtualization layer to control tracing functionality.