Load Time Resolution for AOT Compiled Code

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Real-time applications face significant delays during the first execution of methods in AOT compiled code due to the costly resolution of class, field, and method references, which is restrictive and introduces non-determinism, especially since most references are unresolved at compile time.

Innovation Solution

A method and system for load time resolution of AOT compiled code, where relocation records for already resolved references are updated at loading time, and the updated code is executed to resolve remaining references, reducing the need for first-time execution resolution and minimizing performance variance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If AOT compilation is used to eliminate runtime compilation overhead, then execution performance is improved, but reference resolution time at first execution increases significantly

Engineering Contradiction:
Improveexecution performanceVSAvoidreference resolution time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by performing reference resolution during the class loading phase, before the method is first executed. The system resolves static field references, method references, and interface method references when the class is loaded into the JVM, rather than waiting until first execution. This shifts the resolution cost from runtime to load time, eliminating the performance penalty at first execution while maintaining AOT compilation benefits.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If all references are resolved at first execution in AOT compiled code, then correctness is ensured, but performance variance between first and subsequent executions increases

Engineering Contradiction:
ImprovecorrectnessVSAvoidperformance variance
Core Design Contradiction:
ReliabilityVSStability of the object's composition

Solution Approach 1:

The patent performs reference resolution in advance during class loading, ensuring all references are resolved before first execution. This eliminates the performance variance between first and subsequent executions, as the costly resolution operation is completed during loading. The system maintains correctness by ensuring all references are properly resolved while achieving consistent performance across multiple executions.

Inventive Principle:
Principle #10Preliminary action

3Loss of time

If JIT compilation is used to resolve references before execution, then first execution performance is improved, but non-determinism is introduced into execution behavior

Engineering Contradiction:
Improvefirst execution timeVSAvoidexecution determinism
Core Design Contradiction:
Loss of timeVSReliability

Solution Approach 1:

The patent performs reference resolution during class loading, which occurs before the application starts executing. This preliminary action ensures that by the time the application runs, all references are already resolved, eliminating non-determinism. The system achieves deterministic execution behavior because the same references are resolved at the same loading phase, without introducing the variability associated with JIT compilation timing.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9164783B2Load time resolution for dynamic binding languages
Publication Date: 2015.10.20 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US9164783B2 patent drawing
  • US9164783B2 patent drawing
  • US9164783B2 patent drawing

AI summary

Embodiments of the present invention address deficiencies of the art in respect to load time resolutions and provide a method, system and computer program product for load time resolution of AOT compiled class references in a dynamic binding executing environment. In one embodiment of the invention, a method of resolving class references in AOT compiled code can be provided. The method can include updating AOT code at loading time for already resolved class references in the AOT code, and executing the updated AOT code to resolve remaining unresolved class references in the updated AOT code.