Dynamic Binary Translation Warm Code Compression

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Dynamic binary translation environments face inefficiencies in processing 'warm' code regions, which are executed semi-frequently and consume a significant portion of processor clocks, as current methods either slow down execution by interpreting or require excessive memory by translating and caching these regions like 'hot' code.

Innovation Solution

Implementing a compression scheme that identifies and compresses 'warm' code regions, allowing them to be translated just-in-time and stored in memory for quick reuse, balancing memory usage and execution speed by distinguishing them from 'hot' and 'cold' code regions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If warm code regions are interpreted, then memory usage is reduced, but execution speed deteriorates

Engineering Contradiction:
Improvememory usageVSAvoidexecution speed
Core Design Contradiction:
Quantity of substanceVSSpeed

Solution Approach 1:

The patent segments code into three categories: hot code (translated and cached), cold code (interpreted), and warm code (compressed). This segmentation allows each category to be handled differently, with warm code being compressed to achieve a balance between memory efficiency and execution speed, resolving the contradiction between using less memory and maintaining fast execution.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent changes the state of warm code from uncompressed to compressed form. By applying compression to warm code regions, the system reduces memory usage while avoiding the full translation overhead of hot code, thus improving execution speed compared to interpretation while consuming less memory than full translation.

Inventive Principle:
Principle #35Parameter changes

2Speed

If warm code regions are translated and cached like hot code, then execution speed is improved, but memory usage increases excessively

Engineering Contradiction:
Improveexecution speedVSAvoidmemory usage
Core Design Contradiction:
SpeedVSQuantity of substance

Solution Approach 1:

The patent divides code into hot, warm, and cold segments, applying different handling strategies. Warm code is compressed rather than fully translated and cached like hot code, which reduces memory consumption while still providing faster execution than interpretation, thus resolving the memory usage issue.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Instead of creating full copies of warm code for caching (as done with hot code), the patent uses compressed representations. This copying approach with compression achieves quick reuse without the excessive memory overhead of storing complete translated versions.

Inventive Principle:
Principle #26Copying

3Quantity of substance

If compression is applied to warm code, then memory efficiency is improved, but device complexity increases

Engineering Contradiction:
Improvememory efficiencyVSAvoiddevice complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The patent introduces a classification mechanism that segments code into hot, warm, and cold categories based on execution frequency. This segmentation enables targeted compression of only warm code, improving memory efficiency while limiting the complexity increase to specific code regions rather than the entire system.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent changes the compression parameter applied to different code types. By applying compression specifically to warm code (which has moderate execution frequency), the system achieves good memory efficiency without the full complexity of implementing compression for all code types, thus managing device complexity.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS7703088B2Compressing “warm” code in a dynamic binary translation environment
Publication Date: 2010.04.20 INTEL CORP
  • US7703088B2 patent drawing
  • US7703088B2 patent drawing
  • US7703088B2 patent drawing

AI summary

Selected regions of native instructions translated in a DBT environment from non-native instructions are compressed based on the independent compression of different fields of selected instructions using compression tables to reduce a length of selected fields. The regions of compressed instructions are stored and de-compressed into the native instructions during subsequent execution using de-compression tables. Specifically, for native instructions of a selected region, selected types of opcodes and/or operands may be compressed independently. The types may be selected by profiling the opcodes using benchmark programs and creating an opcode conversion table prior to compression, and scanning of the operands and creating an operand conversion table during compression of the opcodes.