Optimization of garbage collection code in the context of...

Data processing: database and file management or data structures – Database design – Data structure types

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

Reexamination Certificate

active

06484188

ABSTRACT:

BACKGROUND OF THE INVENTION
The present invention pertains to the field of software optimization. More particularly, the present invention pertains to a method for optimizing Java software performance by optimizing code containing interface function calls to garbage collection.
Within the last five years there has arisen an ever increasing need to develop methods that allow a single computer program, written in one programming language, to run on various computer platforms or machines and/or operating systems that are either networked together or stand alone. For instance, the ability to run one program or application written in a single programming language on both an Apple® computer running a version of the Apple Operating System® and a personal computer (PC) running a version of the Microsoft® Windows® brand operating system. This “cross-platform” or “portability” need was acerbated by the commercialization of the World Wide Web and the advent of the Internet and the proliferation of Intranet networks. SUN Microsystems® released the JAVA programming language and its associated set of compilers as an answer to programmers' and users' portability needs.
The Java programming language is designed to be a machine-independent programming language. Java source code, as compared with C, C++, or FORTRAN, is compiled into a universal format, called bytecode. Bytecode is a set of instructions for a Virtual Machine (VM) instead of native instructions for a particular model of processor. Native code or native instructions are platform-dependent, i.e. tied to a particular model of processor. A Virtual Machine is software that mimics the performance of a hardware device. The Java bytecode is machine-independent code generated by the Java compiler and executed by the Java interpreter compiled at the last minute by a “just-in-time” compiler (JIT) compiler. The Java bytecode resembles machine code but is not specific to any one model of processor.
However, there exist certain situations when a programmer or a developer or a user (hereinafter programmer) may desire to have an application or program written in both Java language and some other non-Java language like C or C++. The non-Java language is compiled into native code. This situation typically arises when a programmer wants to speed up the execution time of a program or application. Writing certain methods in a non-Java language may speed up execution time because these methods are compiled ahead of time and not at run time and as such have no JIT time and allow much more aggressive optimization techniques to be applied to them at compile time. A programmer can determine the time it takes each method in a program or application to run by profiling the program using any number of software tools and packages, such as Intel's VTune™ 4.0. A programmer can use the resultant profile information to determine which methods are slow to execute and then elect to rewrite these methods in native code, such as C or C++. To compile such mixed language or mixed mode code the programmer uses a mixed mode Java compiler such as Intel's Bytecode Accelerator (described, e.g., in U.S. patent application Ser. No. 09/107,702, now U.S. Pat. No. 6,289,506 filed Jun. 30, 1998).
In a mixed mode environment calling from native code to Java code and vice versa, or from Java code to a Virtual Machine or vice versa, requires certain interface protocols so that the non-Java and Java methods or Java code and VM interact properly, which is required for a program's ultimate functionality. For instance, if a programmer is working in Microsoft® Corporation's Java environment the above interface is called the “raw native interface” (RNI). RNI acts as an interface to the Microsoft® Virtual Machine. However, writing a program in a mixed mode manner means that some of the benefits that the Java language offers the programmer such as Java garbage collection, can be lost. Garbage collection is an automatic system for allocating and freeing memory in Java. Microsoft®, as well as the developers of other Virtual Machines, has developed methods to ensure that objects garbage-collected by the VM are processed correctly. When running on the Microsoft® Virtual Machine the mixed mode compiler needs to issue RNI function calls specifically designed to keep track of these garbage-collected objects. However, these RNI function calls can severely impact program execution performances.
SUMMARY OF THE INVENTION
The present invention introduces a method of optimizing program code performance. The method of the present invention analyzes a set of interface function calls from a native method to a Java Virtual Machine. Then selects a plurality of the set of interface function calls by analyzing a bytecode and/or an intermediate language for at least one of code constructs, including invocation of a native interface function call to perform garbage collection and then either eliminating or moving such inefficient code within the program.


REFERENCES:
patent: 6081665 (2000-06-01), Nilsen et al.
patent: 6110226 (2000-08-01), Bothner
patent: 6253215 (2001-06-01), Agesen et al.
patent: 6282702 (2001-08-01), Ungar

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Optimization of garbage collection code in the context of... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Optimization of garbage collection code in the context of..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Optimization of garbage collection code in the context of... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2935872

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.