System Emulator Trace Reuse via Dropped Table

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

System Virtual Machines (SVMs) face inefficiencies in reusing invalidated traces due to memory relocation, leading to stale native code that no longer reflects the execution state of the guest system, resulting in the need for full recompilation.

Innovation Solution

The method involves identifying and resurrecting invalidated traces by updating their associated native code to reflect new address locations, using a signature comparison and address updates to ensure accurate execution, allowing SVMs to reuse native code without full recompilation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the SVM caches JIT-compiled native code for recently compiled traces to reuse without recompilation cost, then execution performance is improved, but the native code becomes stale when guest instructions are overwritten in memory, requiring invalidation and recompilation

Engineering Contradiction:
Improveexecution performanceVSAvoidcode validity
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies preliminary action by establishing a dropped trace table before traces are actually needed again. When a trace is invalidated due to memory overwriting, its information is preliminarily stored in the dropped trace table with its signature and host PC. This preliminary storage enables quick recovery and reuse of the trace when the same guest code is encountered again, avoiding full recompilation while ensuring code validity is maintained through signature verification.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses copying by creating and maintaining a copy of trace information in the dropped trace table. Instead of immediately discarding invalidated traces, the system copies essential trace data (signature, host PC, guest PC) to the dropped trace table. This copy can be quickly retrieved and reused when the same trace is needed again, improving performance while maintaining reliability through signature-based validation.

Inventive Principle:
Principle #26Copying

2Reliability

If the SVM invalidates dropped traces from the code cache when guest instructions are overwritten, then code reliability is maintained, but the SVM must perform full recompilation on subsequent executions, increasing computational overhead

Engineering Contradiction:
Improvecode validityVSAvoidcomputation overhead
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent implements discarding and recovering by temporarily discarding invalidated traces from the main code cache while recovering them later from the dropped trace table. When a trace is invalidated, it is discarded from the cache but its metadata is preserved in the dropped trace table. When the same trace is encountered again, it is recovered from the dropped trace table through signature matching, avoiding full recompilation while maintaining code validity through verification.

Inventive Principle:
Principle #34Discarding and recovering

3Measurement precision

If the SVM recompiles every trace that may have been overwritten in guest memory, then execution accuracy is ensured, but the compilation time and processing overhead increase significantly

Engineering Contradiction:
Improveexecution accuracyVSAvoidcompilation time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent uses copying to create a dropped trace table that stores copies of invalidated trace information. Instead of recompiling from scratch, the system copies trace metadata from the dropped trace table and reuses it when the same trace is detected through signature matching. This copying mechanism ensures execution accuracy by verifying trace signatures while dramatically reducing compilation time by avoiding redundant compilation work.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent applies preliminary action by pre-storing trace information in the dropped trace table before it is needed again. When traces are invalidated, their signatures and metadata are preliminarily saved in the dropped trace table. This preliminary storage enables fast recovery and reuse, ensuring execution accuracy through signature verification while minimizing compilation time by avoiding redundant compilation.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS8364461B2Reusing invalidated traces in a system emulator
Publication Date: 2013.01.29 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US8364461B2 patent drawing
  • US8364461B2 patent drawing
  • US8364461B2 patent drawing

AI summary

Native code corresponding to an invalidated trace is re-used in a system emulator. A first trace is identified. A dropped second trace is identified. The dropped second trace is associated with a first native code for emulating the second trace. If the identified first trace corresponds to the dropped second trace, the first native code is associated to the first trace, and the first native code is executed. If the identified first trace does not correspond to the dropped second trace, a second native code for emulating the first trace is created, the second native code is associated with the first trace, and the second native code is executed.