Selective Compilation for Virtual Machine Execution Performance

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Dynamic compilers used in virtual machine environments face performance limitations due to time-consuming hot spot detection and limited optimization, leading to suboptimal execution performance, especially in environments like Android where intermediate code is prevalent.

Innovation Solution

A method of selective compilation that generates a software application with two parts: one executed by the virtual machine and another directly executable on the hardware platform, allowing developers to choose which code segments to compile into binary form for improved performance without relying on dynamic compilation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If dynamic compilation is used to optimize intermediate code execution, then execution performance is improved, but compilation time and system complexity increase

Engineering Contradiction:
Improveexecution performanceVSAvoidcompilation time
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The patent applies preliminary action by performing selective compilation of hot spots before runtime execution. The compilation process identifies performance-critical code segments and compiles them to binary code in advance, so that during runtime only the uncompiled portions need to be executed by the virtual machine. This eliminates the need for time-consuming dynamic compilation during execution while still achieving performance optimization.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent segments the application code into two distinct parts: compiled binary code for performance-critical sections and uncompiled intermediate code for other sections. This segmentation allows the system to apply different execution strategies to different parts of the application, running compiled code directly on the hardware platform for speed while maintaining virtual machine execution for the remainder, thus balancing performance and compilation overhead.

Inventive Principle:
Principle #1Segmentation

2Speed

If dynamic compilation is used to optimize intermediate code execution, then execution performance is improved, but the system becomes more complex

Engineering Contradiction:
Improveexecution performanceVSAvoidsystem complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent extracts the compilation functionality from the runtime virtual machine environment and places it in a separate pre-compilation phase. By taking out the compilation process from the execution path, the system avoids the complexity of integrating dynamic compilation mechanisms into the virtual machine while still achieving performance benefits through selective compilation of hot spots before deployment.

Inventive Principle:
Principle #2Taking out (Extraction)

3Speed

If complete compilation of intermediate code is performed, then execution performance is maximized, but memory usage and compilation overhead increase

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

Solution Approach 1:

The patent applies partial action by selectively compiling only the most performance-critical portions of the application (hot spots) rather than the entire codebase. This selective approach compiles approximately 20% of the code to binary format, providing significant performance improvement while avoiding the memory overhead and compilation time associated with complete compilation of all intermediate code.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS10216497B2Selective compiling method, device, and corresponding computer program product
Publication Date: 2019.02.26 GOOGLE LLC
  • US10216497B2 patent drawing
  • US10216497B2 patent drawing
  • US10216497B2 patent drawing

AI summary

A method and compiling device are provided for compiling a software application to be executed on a virtual machine of a physical platform. The software application originally is in the form of a set of codes to be compiled. The method includes a phase of selectively compiling the set of codes to be compiled, outputting a compiled application including a first application part which is executed by the virtual machine using commands from the virtual machine, and a second application part including binary commands which can be executed directly on the physical platform.