Preferred Compilation Module for Java Virtual Machine

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing systems face performance trade-offs between interpreting and just-in-time compiling code entities in Java Virtual Machines, where compiling too many or too few entities can degrade start-up and overall performance, and there is a need to determine when to switch between interpretation and compilation tiers optimally.

Innovation Solution

A preferred compilation module within the Java Virtual Machine assigns numeric values to code entities based on execution frequency and patterns, comparing these values to thresholds to decide when to compile entities at different optimization levels, persisting annotations for early compilation in subsequent runs.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If more code entities are compiled using JIT compiler, then execution speed is improved, but start-up time and compilation overhead increase

Engineering Contradiction:
Improveexecution speedVSAvoidstart-up time
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The system performs preliminary analysis during runtime to identify frequently invoked code entities, then compiles them in advance before they are actually needed for execution. This preliminary compilation action resolves the contradiction by preparing compiled versions ahead of time, so that when these entities are executed, the system benefits from compilation speed without incurring start-up compilation delays.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system dynamically adjusts which code entities to compile based on runtime execution patterns and frequency analysis. Rather than statically deciding at compile-time or interpreting everything at runtime, the system adapts its compilation strategy dynamically during execution, compiling entities as they are identified as frequently invoked, thus optimizing both execution speed and start-up performance.

Inventive Principle:
Principle #15Dynamics

2Loss of time

If fewer code entities are compiled, then start-up time is reduced, but overall execution performance deteriorates

Engineering Contradiction:
Improvestart-up timeVSAvoidoverall execution performance
Core Design Contradiction:
Loss of timeVSProductivity

Solution Approach 1:

The system implements feedback mechanisms that monitor execution patterns and performance metrics during runtime. Based on this feedback, the system identifies which code entities would benefit most from compilation and adjusts its compilation strategy accordingly. This feedback loop ensures that compilation resources are allocated to entities that will actually improve overall execution performance, rather than compiling arbitrarily or too conservatively.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system changes parameters such as compilation thresholds, optimization levels, and selection criteria based on runtime conditions and observed execution patterns. By dynamically adjusting these parameters, the system can optimize the balance between start-up time and execution performance for different workloads and execution scenarios.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If compilation optimization is applied to all code entities, then execution efficiency is maximized, but compilation overhead and system complexity increase

Engineering Contradiction:
Improveexecution efficiencyVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system applies different compilation strategies and optimization levels to different code entities based on their specific characteristics, such as invocation frequency, execution time contribution, and computational intensity. Rather than applying a uniform compilation approach to all entities, the system tailors its compilation strategy locally to each entity's needs, maximizing execution efficiency while avoiding unnecessary compilation overhead for entities that don't benefit from optimization.

Inventive Principle:
Principle #3Local quality

4Speed

If runtime compilation is performed, then execution speed is improved for frequently invoked entities, but compilation resources are consumed during execution

Engineering Contradiction:
Improveexecution speedVSAvoidcompilation resources
Core Design Contradiction:
SpeedVSUse of energy by moving object

Solution Approach 1:

The system performs partial compilation by selecting only a subset of code entities for JIT compilation based on runtime analysis, rather than compiling all entities. This partial action approach ensures that compilation resources are consumed selectively for entities that will provide the greatest execution speed benefit, avoiding wasteful consumption of compilation resources on entities that would be better served by interpretation.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS9141414B2Preferred compilation
Publication Date: 2015.09.22 SAP SE
  • US9141414B2 patent drawing
  • US9141414B2 patent drawing
  • US9141414B2 patent drawing

AI summary

A method and system to identify code entities suitable for preferred compilation is provided. An example method comprises detecting a request to start up a computer program comprising a plurality of code entities and commence interpreting code entities of the computer program. A numeric value associated with a code entity is compared with a threshold value. The code entity is designated for compilation at a next compilation tier based on a result of the comparing.