Method for accelerating java virtual machine bytecode verification, just-in-time compilation and garbage collection by using a dedicated co-processor
First Claim
1. A system that performs overhead functions of a Java virtual machine in parallel with execution of the Java virtual machine, the system comprising:
- a host processor that executes the Java virtual machine;
a memory unit accessible by the host processor; and
a coprocessor connected for communication with the host processor, the memory unit also being accessible by the coprocessor, the coprocessor comprising;
(i) memory access circuitry configured to access the memory unit;
(ii) pointer receiving circuitry configured to receive at least one pointer to data stored in the memory unit that is pertinent to an overhead function;
(iii) function performing circuitry configured to perform the overhead function to operate on the data stored in the memory unit that is pointed to by the at least one pointer; and
(iv) result passing circuitry configured to communicate a result of the performance of the overhead function to the host processor.
1 Assignment
0 Petitions
Accused Products
Abstract
A coprocessor performs an overhead function of a Java virtual machine executing in a main processor. The coprocessor includes memory access circuitry configured to access a memory also accessible by the host processor. Pointer receiving circuitry is configured to receive at least one pointer to data in the memory pertinent to the overhead function. Function performing circuitry is configured to perform the overhead function to operate on the data in the memory pointed to by the at least one pointer. Result passing circuitry configured to pass a result back to the main processor. For example, overhead functions that may be performed by the coprocessor include bytecode verification, just-in-time compiling and garbage collection.
-
Citations
11 Claims
-
1. A system that performs overhead functions of a Java virtual machine in parallel with execution of the Java virtual machine, the system comprising:
-
a host processor that executes the Java virtual machine;
a memory unit accessible by the host processor; and
a coprocessor connected for communication with the host processor, the memory unit also being accessible by the coprocessor, the coprocessor comprising;
(i) memory access circuitry configured to access the memory unit;
(ii) pointer receiving circuitry configured to receive at least one pointer to data stored in the memory unit that is pertinent to an overhead function;
(iii) function performing circuitry configured to perform the overhead function to operate on the data stored in the memory unit that is pointed to by the at least one pointer; and
(iv) result passing circuitry configured to communicate a result of the performance of the overhead function to the host processor. - View Dependent Claims (2, 3, 4)
the overhead function is garbage collection functions of the Java virtual machine; and
whereinthe data in the memory unit to which the at least one pointer points includes an object list indicating active root Java objects that exist in the memory unit; and
whereinthe coprocessor further comprises thread following circuitry configured to follow threads from the indicated root objects to determine which, if any, of a plurality of active objects, which include root objects, are unreachable because said active objects are not a part of any thread, and designating circuitry configured to designate the active objects that are determined to be not a part of any thread as garbage objects and providing the designation back to the main processor as the result.
-
-
3. The system of claim 1, and wherein:
-
the overhead function is bytecode verification functions of the Java virtual machine; and
whereinthe data in the memory unit to which the at least one pointer points includes a class structure; and
whereinthe coprocessor further comprises verification circuitry that performs the bytecode verification overhead function and provides to the main processor an indication of the verification as the result.
-
-
4. The system of claim 1, and wherein:
-
the overhead function is a just-in-time (JIT) compilation of a method of the Java virtual machine to generate, from Java bytecodes of the method, native instructions corresponding to the Java bytecodes; and
whereinthe data in the memory unit to which the at least one pointer points includes a constants pool of a class to which the method belongs and the bytecodes of the method; and
whereinthe coprocessor further comprises JIT overhead circuitry configured to perform the just-in-time overhead function by generating the native instructions corresponding to the Java bytecodes and storing the native instructions into the memory unit.
-
-
5. A dedicated coprocessor that performs garbage collection functions of a Java virtual machine executing in a host processor, the coprocessor comprising:
-
object list receiving circuitry configured to receive a root object list indicating an active root Java object that exists in a memory unit shared between the host processor and the coprocessor;
thread following circuitry configured to follow threads from the indicated active root object in order to determine which, if any, of a plurality of active objects, which includes the root object, are unreachable because they are not a part of any thread;
garbage object designating circuitry configured to designate the active object that is determined to be not a part of any thread as a garbage object and to provide the designation back to the host processor.
-
-
6. A dedicated coprocessor that performs a portion of bytecode verification functions of class structures for a Java virtual machine executing in a host processor, the coprocessor comprising:
-
class structure pointer receiving circuitry configured to receive from the main processor a pointer to a class structure in a memory unit shared between the host processor and the coprocessor;
verifying circuitry configured to verify at least some of the portions of the pointed-to class structure that do not require reference to another class structure; and
indication providing circuitry configured to provide to the host processor an indication of a result of the verification.
-
-
7. A dedicated coprocessor that performs a just-in-time (JIT) compilation for a method of a Java virtual machine executing in a host processor, to generate, from Java bytecodes of the method, native instructions of the host processor corresponding to the Java bytecodes, the coprocessor comprising:
-
constants pool receiving circuitry configured to receive a pointer to a constants pool, of a class to which the method belongs, in a memory unit shared between the host processor and the coprocessor;
bytecodes pointer receiving circuitry configured to receive a pointer to the bytecodes of the method in the memory unit; and
instructions generating circuitry configured to generate the native instructions corresponding to the Java bytecodes and to store the native instructions into the memory unit.
-
-
8. A method of performing functions of a Java virtual machine in a computer system, the computer system including a host processor, a coprocessor, and a memory unit shared between the host processor and the coprocessor, the method comprising:
-
performing first functions of the Java virtual machine utilizing the host processor;
passing from the host processor to the coprocessor at least one pointer to data in the memory unit pertinent to an overhead function of the Java virtual machine;
receiving the at least one pointer at the coprocessor and performing the overhead function by the coprocessor operating on the data in the memory unit pointed to by the at least one pointer;
passing the result of the performance of the overhead function from the coprocessor to the main processor; and
utilizing the main processor to continue to perform the first functions, using the result passed from the coprocessor. - View Dependent Claims (9, 10, 11)
the overhead function is garbage collection functions of the Java virtual machine; and
whereinthe data in the memory to which the at least one pointer passed by the host processor points includes an object list indicating active root Java objects that exist in the memory unit;
the method further comprising;
utilizing the coprocessor to perform the garbage collection overhead function by following threads from the indicated root objects in order to determine which, if any, of a plurality of active objects, which include root objects, are unreachable because they are not a part of any thread; and
designating the active objects that are determined to be not a part of any thread as garbage objects and providing the designation back to the host processor.
-
-
10. The system of claim 8, and wherein:
-
the overhead function is bytecode verification functions of the Java virtual machine; and
whereinthe data in the memory unit to which the at least one pointer passed by the host processor points includes a class structure the method further comprising;
utilizing the coprocessor to perform the bytecode verification overhead function on the class structure.
-
-
11. The method of claim 8, and wherein:
-
the overhead function is a just-in-time (JIT) compilation of a method of the Java virtual machine to generate, from Java bytecodes of the method, native instructions corresponding to the Java bytecodes;
the data in the memory unit to which the at least one pointer passed by the host processor points includes a constants pool of a class to which the method belongs and the bytecodes of the method, the method further comprising;
utilizing the coprocessor to perform the just-in-time overhead function by generating the native instructions corresponding to the Java bytecodes and storing the native instructions into the memory unit.
-
Specification