# US 9,519,466 B2 · Executable code for constrained computing environments

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 9,519,466 B2
- Document ID: US9519466B2
- Status: Granted
- Kind: B2
- Application number: 14/220,119
- Filed: 2014-03-19
- Published: 2015-06-25
- Granted: 2016-12-13
- Earliest claimed: 2013-12-20
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: M Bertrand Delsart
- Web page: https://patentgrep.com/patent/US9519466B2

## CPC

- G06F 8/41: Compilation
- G06F 8/30: Creation or generation of source code
- G06F 9/45525: {Optimisation or modification within the same instruction set architecture, e.g. HP Dynamo}
- G06F 9/45533: {Hypervisors; Virtual machine monitors}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system and method for facilitating adjusting computer code running in computing environments where writing of executable memory is restricted. An example method includes using a virtual machine to generate a first executable image from software code, and employing the first executable image to selectively modify the virtual machine and the first executable image, resulting in an updated virtual machine and a second executable image. The second executable image represents an updated version of the first executable image. To transform dynamic code, such as natively produced computer code, into one or more executable images for running on constrained devices, embodiments may leverage existing dynamic code generators (e.g., within Java HotSpot Performance Engine, also simply called HotSpot), selectively modifying them to generate different, i.e., updated code that is usable on subsequent runs of the associated software application, thereby effectively enabling modification of executable code used to run the software.

## Claims

### Claim 1

A method for running dynamic code programs in an execution context that does not allow applications to use memory that is both executable and writable, the method performed by a computer system comprising the following acts:
executing a virtual machine to generate first executable code in a first executable image from software code of an application, where the virtual machine includes optimizing functionality that analyzes execution of the first executable image to cache frequently used executable code and modifies executable code for efficient execution on the computer system;
analyzing, using the virtual machine, the first executable code, when executed, to generate modified executable code;
storing, by the computer system, the modified executable code as a second image separate from the first image;
transforming the second image to a second executable image executable by the computer system to run the application;
analyzing, using the virtual machine, the second executable image, when executed, to run the application to generate second modified executable code;
storing, by the computer system, the second modified executable code as a third image separate from the first and second images; and
transforming the third image to a third executable image executable by the computer system to run the application.

### Claim 2 (depends on 1)

The method of claim 1, wherein the first virtual machine includes a Just-In-Time (JIT) compiler adapted to facilitate generating the second executable image.

### Claim 3 (depends on 1)

The method of claim 1, with transforming further including:
reloading the second executable image in future runs of the application.

### Claim 4 (depends on 3)

The method of claim 3, further including selectively running the first executable image to facilitate generating the second executable image.

### Claim 5 (depends on 3)

The method of claim 3, wherein the software code of the application includes bytecode.

### Claim 6 (depends on 5)

The method of claim 5, wherein the virtual machine includes an interpreter and where the first executable image stores executable code of the interpreter.

### Claim 7 (depends on 6)

The method of claim 6, wherein the interpreter includes a code generator adapted to generate modified executable code.

### Claim 8 (depends on 7)

The method of claim 7, further including:
storing the modified executable code in an assembler file.

### Claim 9 (depends on 8)

The method of claim 8, further including:
employing the assembler file to facilitate generating an executable library representative of the modified executable code.

### Claim 10 (depends on 9)

The method of claim 9, further including:
employing a compilation chain and the assembler file to facilitate generating the executable library.

### Claim 11 (depends on 6)

The method of claim 6, wherein the interpreter is a HotSpot interpreter.

### Claim 12 (depends on 11)

The method of claim 11, wherein HotSpot interpreter includes a Just-In-Time (JIT) compiler.

### Claim 13 (depends on 1)

The method of claim 1, further including dynamically generating, on a target device, executable code included in the second executable image.

### Claim 14 (depends on 13)

The method of claim 13, further including adjusting the dynamically generated executable code during generation thereof, based on one or more characteristics of the target device.

### Claim 15 (depends on 14)

The method of claim 14, wherein the one or more characteristics includes a characteristic of a Central Processing Unit (CPU) of the target device.

### Claim 16 (depends on 15)

The method of claim 15, further including discovering the one or more characteristics or information pertaining thereto, during initialization of a code generator used to dynamically generate executable code.

### Claim 17 (depends on 14)

The method of claim 14, wherein the one or more characteristics includes information from a profiler.

### Claim 18

An apparatus for running dynamic code programs in an execution context that does not allow applications to use memory that is both executable and writable, the apparatus comprising:
one or more processors;
a non-transitory processor readable storage device including instructions executable by the one or more processors for:
executing a virtual machine to generate first executable code in a first executable image from software code of an application, where the virtual machine includes optimizing functionality that analyzes execution of the first executable image to cache frequently used executable code and modifies executable code for efficient execution on the computer system;
analyzing, using the virtual machine, the first executable code, when executed, to generate modified executable code;
storing, by the computer system, the modified executable code as a second image separate from the first image;
transforming the second image to a second executable image executable by the computer system to run the application;
analyzing, using the virtual machine, the second executable image, when executed, to run the application to generate second modified executable code;
storing, by the computer system, the second modified executable code as a third image separate from the first and second images; and
transforming the third image to a third executable image executable by the computer system to run the application.

### Claim 19

A non-transitory processor readable storage device including instructions executable by one or more processor for running dynamic code programs in an execution context that does not allow applications to use memory that is both executable and writable, the non-transitory processor readable storage device including instructions for:
executing a virtual machine to generate first executable code in a first executable image from software code of an application, where the virtual machine includes optimizing functionality that analyzes execution of the first executable image to cache frequently used executable code and modifies executable code for efficient execution on the computer system;
analyzing, using the virtual machine, the first executable code, when executed, to generate modified executable code;
storing, by the computer system, the modified executable code as a second image separate from the first image;
transforming the second image to a second executable image executable by the computer system to run the application;
analyzing, using the virtual machine, the second executable image, when executed, to run the application to generate second modified executable code;
storing, by the computer system, the second modified executable code as a third image separate from the first and second images; and
transforming the third image to a third executable image executable by the computer system to run the application.
