Virtual Machine Branch Count Logging for Replay
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional execution logging and replay systems in virtual machines are slow due to software tracing overhead and require expensive specialized hardware, making them inefficient for debugging and fault tolerance applications.
Innovation Solution
A method for logging non-deterministic events in a virtual machine by tracking execution points, specifically using a tuple {eip, brCnt, ecx} to identify instructions, and recording information about branch counts and execution points, allowing for efficient logging and replay of execution sequences without the need for expensive tracing hardware.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If conventional trace collection techniques using specialized hardware are used, then execution logging and replay can be performed, but the system becomes slow due to software tracing overhead and expensive hardware requirements
Solution Approach 1:
The patent extracts only the essential information needed for replay (branch instruction counts and non-deterministic events) from the complete execution trace, rather than logging every instruction. This selective extraction reduces the logging overhead and storage requirements while maintaining sufficient information for accurate replay.
Solution Approach 2:
Instead of logging all instructions and filtering during replay, the patent inverts the approach by using branch counts to directly identify and log only the critical non-deterministic events that affect replay accuracy. This inversion reduces the volume of logged data and improves both speed and efficiency.
2Loss of information
If specialized tracing hardware is used to monitor and log every instruction, then complete execution traces can be captured, but the system becomes expensive and complex
Solution Approach 1:
The patent uses software-based copying of branch count information and event data instead of specialized hardware tracing. The virtual machine monitor software captures branch instruction counts and non-deterministic events, creating a simplified copy of the essential execution information without requiring complex hardware trace buffers or monitoring circuits.
Solution Approach 2:
The patent changes the parameter being tracked from complete instruction addresses to branch instruction counts. This parameter transformation simplifies the tracing mechanism by using a compact counter that can be maintained in software, eliminating the need for complex hardware address capture and comparison logic.
3Measurement precision
If every instruction is logged for replay purposes, then accurate replay can be achieved, but storage requirements and processing overhead increase significantly
Solution Approach 1:
The patent extracts only the critical subset of execution information needed for replay - specifically branch instruction counts and non-deterministic events - rather than logging all instructions. This extraction reduces log data volume from potentially millions of instructions to a manageable number of branch points and events.
Solution Approach 2:
Instead of logging all instructions and selecting during replay, the patent inverts by using branch counts to directly identify where non-deterministic events occurred. This approach captures only the essential replay information, minimizing storage requirements while maintaining replay accuracy.
Data Source
AI summary
A method and computer program product for logging non-deterministic events of a virtual machine executing a sequence guest instructions, the method including tracking an execution point in the sequence of executing guest instructions, the tracking of the execution point including determining a branch count of executed branch instructions; and detecting an occurrence of a non-deterministic event directed to the virtual machine during execution of the sequence of guest instructions, and recording information which includes an identifier of a current execution point, wherein the identifier includes the branch count.


