IP Library Granted Patent US 7,051,323
Granted Patent B2
US 7,051,323 · App. 10/267,381 · Granted May 23, 2006

Method and apparatus for initializing romized system classes at virtual machine build time

Assignee: SUN Microsystems, Inc.
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,051,323
App. No.
10/267,381
Granted
May 23, 2006
Kind
B2
Abstract

One embodiment of the present invention provides a system that initializes system classes for a virtual machine during build time for the virtual machine, so that portions of the system classes can be stored in Read Only Memory (ROM). During virtual machine build time, the system loads system classes for the virtual machine. Next, the system identifies which of the system classes can be initialized at build time and then initializes the identified system classes. The system then stores portions of the system classes in a ROM image, so that the portions of the system classes can be accessed from the ROM image during subsequent run-time execution of the virtual machine. In this way, this embodiment of the present invention reduces the amount of time required to initialize system classes during run-time execution of the virtual machine.

Claims (58)

1. A method for initializing system classes for a virtual machine during build time for the virtual machine, so that portions of the system classes can be stored in Read Only Memory (ROM), comprising:

loading the system classes for the virtual machine during build time for the virtual machine;

identifying which of the system classes can be initialized at build time;

initializing the identified system classes; and

storing portions of the system classes in a ROM image, so that the portions of the system classes can be accessed from the ROM image during subsequent run-time execution of the virtual machine, wherein prior to storing the portions of the system classes in the ROM, the method further comprises pre-quickening bytecodes that reference the initialized classes, wherein the pre-quickening involves:

resolving pointers that point to the initialized classes, and

modifying byte codes that access the initialized classes to use the resolved pointers.

2. The method of claim 1 , wherein the method is performed during direct execution of the virtual machine at build time.

3. The method of claim 2 , wherein prior to the direct execution of the virtual machine at build time, the method further comprises:

building the virtual machine;

saving executable code for the virtual machine into a file to be accessed during the direct execution of the virtual machine at build time;

building the system classes; and

saving the system classes so that the system classes can be accessed during the direct execution the virtual machine.

4. The method of claim 1 , wherein identifying which of the system classes can be initialized involves examining information in a configuration file indicating which of the system classes can be initialized, the information having been previously generated based on a set of rules for determining which classes can be initialized.

5. The method of claim 1 , further comprising removing class initialization methods from classes that have been initialized during build time, thereby reducing memory requirements for the initialized classes.

6. The method of claim 1 , further comprising linking the ROM image into the virtual machine, so that portions of the system classes can be accessed from the ROM image during subsequent run-time execution of the virtual machine.

7. A computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for initializing system classes for a virtual machine during build time for the virtual machine, so that portions of the system classes can be stored in Read Only Memory (ROM), the method comprising:

loading the system classes for the virtual machine during build time for the virtual machine;

identifying which of the system classes can be initialized at build time;

initializing the identified system classes; and

storing portions of the system classes in a ROM image, so that the portions of the system classes can be accessed from the ROM image during subsequent run-time execution of the virtual machine, wherein prior to storing the portions of the system classes in the ROM, the method further comprises pre-quickening bytecodes that reference the initialized classes, wherein the pre-quickening involves:

resolving pointers that point to the initialized classes, and

modifying byte codes that access the initialized classes to use the resolved pointers.

8. The computer-readable storage medium of claim 7 , wherein the method is performed during direct execution of the virtual machine at build time.

9. The computer-readable storage medium of claim 8 , wherein prior to the direct execution of the virtual machine at build time, the method further comprises:

building the virtual machine;

saving executable code for the virtual machine into a file to be accessed during the direct execution of the virtual machine at build time;

building the system classes; and

saving the system classes so that the system classes can be accessed during the direct execution the virtual machine.

10. The computer-readable storage medium of claim 7 , wherein identifying which of the system classes can be initialized involves examining information in a configuration file indicating which of the system classes can be initialized, the information having been previously generated based on a set of rules for determining which classes can be initialized.

11. The computer-readable storage medium of claim 7 , wherein the method further comprises removing class initialization methods from classes that have been initialized during build time, thereby reducing memory requirements for the initialized classes.

12. The computer-readable storage medium of claim 7 , wherein the method further comprises linking the ROM image into the virtual machine, so that portions of the system classes can be accessed from the ROM image during subsequent run-time execution of the virtual machine.

13. An apparatus that initializes system classes for a virtual machine during build time for the virtual machine, so that portions of the system classes can be stored in Read Only Memory (ROM), comprising:

a loading mechanism configured to load the system classes for the virtual machine during build time for the virtual machine;

an identification mechanism configured to identify which of the system classes can be initialized at build time;

an initialization mechanism configured to initialize the identified system classes;

a storage mechanism configured to store portions of the system classes in a ROM image, so that the portions of the system classes can be accessed from the ROM image during subsequent run-time execution of the virtual machine; and

a pre-quickening mechanism configured to:

resolve pointers that point to the initialized classes, and to

modify byte codes that access the initialized classes to use the resolved pointers.

14. The apparatus of claim 13 , wherein the apparatus is part of the virtual machine.

15. The apparatus of claim 14 , further comprising a building mechanism for a virtual machine that is configured to:

build the virtual machine; and to

save executable code for the virtual machine into a file to be accessed during the direct execution of the virtual machine at build time;

wherein the building mechanism is additionally configured to,

build the system classes, and to

save the system classes so that the system classes can be accessed during the direct execution of the virtual machine.

16. The apparatus of claim 13 , wherein the identification mechanism is configured to examine information in a configuration file indicating which of the system classes can be initialized, the information having been previously generated based on a set of rules for determining which classes can be initialized.

17. The apparatus of claim 13 , further comprising a removal mechanism configured to remove class initialization methods from classes that have been initialized during build time, thereby reducing memory requirements for the initialized classes.

18. The apparatus of claim 13 , further comprising a linking mechanism configured to link the ROM image into the virtual machine, so that portions of the system classes can be accessed from the ROM image during subsequent run-time execution of the virtual machine.

19. A computer systen for initializing system classes for a virtual machine during build time for the virtual machine, so that portions of the system classes can be stored in Read Only Memory (ROM), comprising:

a loading means for loading the system classes for the virtual machine during build time for the virtual machine;

an identification means for identifying which of the system classes can be initialized at build time;

an initializing means for initializing the identified system classes;

a storing means for storing portions of the system classes in a ROM image, so that the portions of the system classes can be accessed from the ROM image during subsequent run-time execution of the virtual and

a pre-quickening means for:

resolving pointers that point to the initialized classes, and

modifying byte codes that access the initialized classes to use the resolved pointers.

Assignments (3)
MERGER AND CHANGE OF NAME Recorded Dec 16, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037302/0633 →
MERGER AND CHANGE OF NAME Recorded Dec 14, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037280/0232 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 9, 2002
From: LAM, IOI K.; MATHISKE, BERND J.W.
To: SUN MICROSYSTEMS, INC.
Reel/Frame 013375/0808 →
Continuity (1)
Related Publication 20040068480A1 · Apr 8, 2004