Trace Replay Execution Control with Cross-Level Mapping
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional debugging methods face challenges in accurately controlling the execution of a program based on a low-level execution trace, particularly in production environments where pausing the debuggee can be detrimental, and existing trace-based debugging techniques lack the high-level execution control and accuracy needed for efficient bug identification and mitigation.
Innovation Solution
The implementation of a trace replay execution control system that uses a processor, memory, and recorded traces to correlate source code with native code instructions, allowing for precise execution control through breakpoint settings and alignment of trace data with source code statements, enabling forward and reverse execution replay without an executing runtime.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If live process debugging is used to examine state information and control execution, then debugging accuracy is improved, but service agreement violations and system harm occur due to pausing production software
Solution Approach 1:
The system performs preliminary actions by recording execution traces and state information during normal production operation before debugging is needed. This allows developers to later examine and control execution based on pre-recorded data without pausing the live system, thus maintaining debugging accuracy while avoiding service agreement violations.
2Productivity
If execution traces are recorded for later analysis, then system uptime is improved, but trace data alignment with source code becomes inaccurate due to low-level recording
Solution Approach 1:
The system introduces an intermediary layer that records both low-level execution traces and corresponding high-level source code information simultaneously. This intermediary recording mechanism maintains accurate mappings between trace data and source code statements, enabling precise debugging analysis while keeping the system running without pauses.
3Productivity
If low-level execution traces are used for debugging replay, then system performance is improved, but execution control accuracy deteriorates due to lack of high-level information
Solution Approach 1:
The system merges low-level execution traces with high-level source code information into a unified debugging data structure. This combination preserves the performance benefits of low-level tracing while incorporating high-level contextual information that enables accurate execution control operations during replay, making the system both fast and easy to control.
Data Source
Figure 1~3
Figure 4
Figure 5~7
AI summary
Described technologies aid execution control during replays of traced program behavior. Cross-level mapping correlates source code, an intermediate representation, and native instructions in a trace. The trace includes a record of native code instructions which were executed by a runtime-managed program. The trace does not include any executing instance of the runtime. Breakpoints are set to align trace locations with source code expressions or statements, and to skip over garbage collection and other code unlikely to interest a developer. A live debugging environment is adapted to support trace-based reverse execution. An execution controller in a debugger or other tool may utilize breakpoint ranges, cross-level mappings, backward step-out support, and other items to control a replay execution of the trace. Aspects of familiar compilers or familiar runtimes may be re-purposed for innovative execution control which replays previously generated native code, as opposed to their established purpose of generating native code.