Runtime Compiler Virtualizing Control Flow Edges for Dynamic Code Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In Warehouse Scale Computers (WSCs), maximizing server utilization is challenging due to unpredictable dynamism, which can violate quality of service (QoS) needs for latency-sensitive applications, and existing dynamic compilation technologies face high overhead, limited transformation power, and complexity, making them unsuitable for production environments.

Innovation Solution

A near-free, general-purpose approach is introduced, referred to as 'protean' code, which involves a co-designed compiler and runtime system that monitors and dynamically transforms running applications by virtualizing control flow edges and embedding intermediate representation (IR) into the program, allowing for seamless introduction of new code variants and low overhead optimizations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If dynamic compilation is used to optimize code execution, then server utilization is improved, but overhead increases significantly

Engineering Contradiction:
Improveserver utilizationVSAvoidoverhead
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The patent embeds intermediate representation (IR) and control flow graphs into the original executable code at compile time, preparing transformation templates in advance. This allows the runtime system to apply optimizations without performing full compilation operations during execution, significantly reducing overhead while maintaining the ability to adapt code to dynamic conditions.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent creates a runtime copy of the code in intermediate representation form, which can be selectively transformed and executed. This copy mechanism allows the system to apply optimizations to duplicated code structures without affecting the original executable, enabling low-overhead dynamic optimization through selective copying and transformation of code regions.

Inventive Principle:
Principle #26Copying

2Adaptability or versatility

If traditional dynamic compilation frameworks are used, then code transformation capability is provided, but complexity increases

Engineering Contradiction:
Improvecode transformation capabilityVSAvoidsystem complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent segments the code transformation system into distinct components: a runtime compiler that operates on embedded IR, a control flow graph manager that handles virtualized edges, and a code cache that stores transformed functions. This segmentation isolates complexity to manageable modules, making the overall system more maintainable and easier to implement while preserving powerful code transformation capabilities.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediate representation (IR) as a mediator between the original source code and the transformed executable code. This IR layer simplifies the transformation process by providing a standardized intermediate form that the runtime compiler can manipulate without directly modifying the original code or requiring complex direct manipulation of machine instructions.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If static compiler approaches are used, then QoS can be guaranteed, but server utilization is limited

Engineering Contradiction:
Improvequality of service guaranteeVSAvoidserver utilization
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies dynamics by allowing the code transformation strategy to change at runtime based on actual system conditions. The runtime compiler analyzes current workload characteristics and selects appropriate transformations to guarantee QoS for latency-sensitive applications while maximizing server utilization, adapting the optimization strategy dynamically rather than using a fixed static approach.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes execution parameters dynamically by transforming code regions with different characteristics based on runtime conditions. The system can modify memory access patterns, cache allocation strategies, and execution priorities through code transformation, allowing the same application to exhibit different behavior under different workload conditions while maintaining QoS guarantees.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS10223141B2Runtime compiler environment with dynamic co-located code execution
Publication Date: 2019.03.05 THE RGT UNIV OF MICHIGAN
  • US10223141B2 patent drawing
  • US10223141B2 patent drawing
  • US10223141B2 patent drawing

AI summary

A system is provided for monitoring, regenerating and replacing the code of running applications with semantically equivalent, specialized code versions that reflect the demands of the execution environment. The system includes a co-designed compiler and runtime system that virtualizes a selected set of edges in a host program, where these edges provide hooks through which the runtime system may redirect execution into an intermediate representation utilized to optimize introspective and extrospective processes.